CN104811613A - Camera focusing method - Google Patents

Camera focusing method Download PDF

Info

Publication number
CN104811613A
CN104811613A CN201510166255.XA CN201510166255A CN104811613A CN 104811613 A CN104811613 A CN 104811613A CN 201510166255 A CN201510166255 A CN 201510166255A CN 104811613 A CN104811613 A CN 104811613A
Authority
CN
China
Prior art keywords
subject
terminal
ultrasonic signal
generator
built
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
Application number
CN201510166255.XA
Other languages
Chinese (zh)
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment Co 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201510166255.XA priority Critical patent/CN104811613A/en
Publication of CN104811613A publication Critical patent/CN104811613A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention provides a camera focusing method. The method comprises the following steps: when detecting that a camera is started, transmitting a first ultrasonic signal to a determined photographed object through a built-in generator by a terminal; receiving a second ultrasonic signal reflected back by the first ultrasonic signal transmitted to the photographed object; acquiring transmission time for transmitting the first ultrasonic signal through the built-in generator; acquiring receiving time for receiving the second ultrasonic signal; acquiring distance between the terminal and the photographed object according to a time difference value between the transmitting time and the receiving time; focusing the camera according to the distance between the terminal and the photographed object. According to the embodiment of the invention, ultrasonic focusing can be realized by using the built-in generator, so that the photographing effect is improved and the picture quality is improved.

Description

A kind of camera focusing method
Technical field
The present invention relates to electronic technology field, particularly relate to a kind of camera focusing method.
Background technology
Along with the fast development of electronic technology and image processing techniques, the camera function of terminal from strength to strength.In the process of taking pictures, in order to the photo obtaining better definition can be taken, need to focus, namely come the position of automatic adjustable lens according to current scene to reach the photo of most high definition.It is poor to there is effect of taking pictures under the environment of low contrast, decreased light in existing focusing method, the problem that the photographic quality of acquisition is not high.
Summary of the invention
The embodiment of the present invention provides a kind of camera focusing method, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
Embodiments provide a kind of camera focusing method, comprising:
When detecting that camera starts, terminal launches the first ultrasonic signal in the subject determined by built-in generator;
Described terminal receives the second ultrasonic signal being transmitted into described first ultrasonic signal in described subject and reflecting;
Described terminal obtains the transmitting time of being launched described first ultrasonic signal by described built-in generator;
Described terminal obtains the time of reception receiving described second ultrasonic signal;
Described terminal, according to the time difference between described transmitting time and described time of reception, obtains the distance between described terminal and described subject;
Described terminal, according to the distance between described terminal and described subject, carries out camera focusing.
In the embodiment of the present invention, when detecting that camera starts, terminal launches the first ultrasonic signal in the subject determined by built-in generator, receive the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting, obtain the transmitting time of being launched the first ultrasonic signal by built-in generator, and receive the time of reception of the second ultrasonic signal, according to the time difference between transmitting time and time of reception, obtain the distance between terminal and subject, according to the distance between terminal and subject, carry out camera focusing, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, 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 the schematic flow sheet of a kind of camera focusing method provided in first embodiment of the invention;
Fig. 2 is the schematic flow sheet of a kind of camera focusing method provided in second embodiment of the invention;
Fig. 3 is the schematic flow sheet of a kind of camera focusing method provided in third embodiment of the invention;
Fig. 4 is the structural representation of a kind of terminal provided in first embodiment of the invention;
Fig. 5 is the structural representation of the signal transmitting unit of Fig. 4 in first embodiment of the invention;
Fig. 6 is the structural representation of the signal transmitting unit of Fig. 4 in second embodiment of the invention;
Fig. 7 is the structural representation of the signal transmitting unit of Fig. 4 in third embodiment of the invention;
Fig. 8 is the structural representation of the detecting unit of Fig. 4 in the embodiment of the present invention;
Fig. 9 is the structural representation of a kind of terminal provided in second embodiment of the 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.
Embodiments provide a kind of camera focusing method, when detecting that camera starts, terminal launches the first ultrasonic signal in the subject determined by built-in generator, receive the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting, obtain the transmitting time of being launched the first ultrasonic signal by built-in generator, and receive the time of reception of the second ultrasonic signal, according to the time difference between transmitting time and time of reception, obtain the distance between terminal and subject, according to the distance between terminal and subject, carry out camera focusing, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
The camera that the embodiment of the present invention is mentioned to can comprise front-facing camera or post-positioned pick-up head etc.
The audible frequency of the built-in generator that the embodiment of the present invention is mentioned to reaches ultrasonic frequency, and wherein built-in generator can comprise loudspeaker or receiver etc.Optionally, when detecting that front-facing camera starts, terminal can launch the first ultrasonic signal in subject by receiver; When detecting that post-positioned pick-up head starts, terminal can by horn launch first ultrasonic signal in subject.
The subject that the embodiment of the present invention is mentioned to is the theme that terminal needs shooting, can comprise target person, target object or object scene, such as fruit, cup, flower, the water surface or high mountain etc.
The camera focusing method that the embodiment of the present invention provides may operate in the terminals such as smart mobile phone (as Android phone, iOS mobile phone etc.), panel computer or wearable intelligent equipment.
Fig. 1 is the schematic flow sheet of a kind of camera focusing method provided in first embodiment of the invention, and as shown in the figure, the camera focusing method in the embodiment of the present invention at least can comprise:
S101, when detecting that camera starts, terminal launches the first ultrasonic signal in the subject determined by built-in generator.
When terminal detects that camera starts, the first ultrasonic signal can be launched in the subject determined by built-in generator.Wherein, the audible frequency of built-in generator reaches ultrasonic frequency, and built-in generator can comprise loudspeaker or receiver etc.Such as, user clicks camera applications icon, and terminal starts camera applications and camera, when terminal detects that camera starts, launches the first ultrasonic signal in subject by built-in generator.And for example, user starts camera and carries out video calling in use MSN process, when terminal detects that camera starts, can launch the first ultrasonic signal in subject by built-in generator.And for example, when user starts camera scanning target Quick Response Code, when terminal detects that camera starts, the first ultrasonic signal can be launched in subject by built-in generator.
In an alternative embodiment, when terminal detects that camera starts, can judge whether the camera started is front-facing camera, when the camera started is front-facing camera, terminal launches the first ultrasonic signal in subject by the receiver that front-facing camera is corresponding.Such as, user starts camera when carrying out video calling, needs to take user by camera, then terminal can determine that the camera started is front-facing camera, and then launches the first ultrasonic signal in subject by receiver.In prior art terminal receiver and front-facing camera towards usually identical, when front-facing camera starts, subject is positioned at the front of front-facing camera, the first ultrasonic signal accurately can be transmitted in subject by receiver, improves the accuracy that signal is launched.
Further alternative, after whether the camera that terminal judges starts is front-facing camera, when the camera started is post-positioned pick-up head, terminal passes through horn launch first ultrasonic signal corresponding to post-positioned pick-up head in subject.Such as, when user starts camera scanning target Quick Response Code, need by camera photographic subjects Quick Response Code, then terminal can determine that the camera started is post-positioned pick-up head, and then by horn launch first ultrasonic signal in subject.In prior art terminal loudspeaker and post-positioned pick-up head towards usually identical, when post-positioned pick-up head starts, subject is positioned at the front of post-positioned pick-up head, the first ultrasonic signal accurately can be transmitted in subject by loudspeaker, improves the accuracy that signal is launched.
In an alternative embodiment, when terminal detects that camera starts, the first ultrasonic signal stored can be transmitted in subject by built-in generator in memory.The embodiment of the present invention generates ultrasonic signal without the need to built-in generator, directly obtains the first ultrasonic signal stored in memory, is transmitted in subject, can improves resource utilization by the first ultrasonic signal got.
In an alternative embodiment, when terminal detects that camera starts, the first ultrasonic signal can be generated by built-in generator, the first ultrasonic signal is transmitted in subject by built-in generator.The audible frequency of built-in generator reaches ultrasonic frequency, terminal can generate the first ultrasonic signal by built-in generator, first ultrasonic signal is transmitted in subject by built-in generator, without the need to increasing extra hardware device, such as ultrasonic motor, Design of Hardware Architecture difficulty can be reduced, reduce hardware cost.
In an alternative embodiment, terminal can show preview picture, receives the subject determination instruction that user inputs in preview picture, according to subject determination instruction, determines subject, launch the first ultrasonic signal in subject by built-in generator.Such as, when preview picture comprises multiple theme, user can choose subject in preview picture, the subject determination instruction that terminal inputs according to user, determines subject.
Further alternative, terminal according to subject determination instruction, can obtain the positional information of subject, according to the positional information of subject, launches the first ultrasonic signal in subject by built-in generator.Such as, the subject that user chooses in preview picture is positioned at the middle of preview picture, terminal can according to subject determination instruction, obtain the positional information of subject, the positional information of subject can comprise the latitude and longitude coordinates of subject, and then the first ultrasonic signal that built-in generator is launched by terminal is towards subject, so that subject accurately receives the first ultrasonic signal.
In an alternative embodiment, when terminal detects that camera starts, can the motion state of sense terminals, when terminal remains static, launch the first ultrasonic signal in subject by built-in generator.From the mode of taking a picture and custom, user have shooting intention take pictures time, the usual mobile terminal of user aims at subject, that is, before user takes pictures, all need one to select and aim at the process of subject, when after basic aligning subject, user is by no longer frequent or large-scale mobile terminal, and terminal progressively will become inactive state from motion state.Based on this, the embodiment of the present invention, by the motion state of sense terminals, when detecting that terminal remains static, launches the first ultrasonic signal in subject by built-in generator, reduces camera focusing time delay, promotes Consumer's Experience.
Further alternative, terminal can obtain terminal at the axial motion state parameters of X, Y, Z tri-, when three axial motion state parameterses be in preset time period zero or be less than parameter preset threshold value time, determine that terminal remains static.Wherein, motion state parameters can be acceleration, speed or displacement etc.
S102, terminal receives the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting.
Terminal can receive the second ultrasonic signal that the first ultrasonic signal be transmitted in subject reflects after launching on the first ultrasonic signal to subject by built-in generator.When ultrasonic wave runs into the interface be made up of the medium that acoustic impedance is different, reflex will be there is, when then the first ultrasonic signal is transmitted in subject by terminal, the first ultrasonic signal be transmitted in subject will be reflected back the second ultrasonic signal, and then terminal receives the second ultrasonic signal.Optionally, after terminal is launched on the first ultrasonic signal to subject by built-in generator, the second ultrasonic signal that first ultrasonic signal that can be transmitted in subject by microphones is reflected.
S103, terminal obtains the transmitting time of being launched the first ultrasonic signal by built-in generator.
Terminal can obtain the transmitting time of being launched the first ultrasonic signal by built-in generator after launching on the first ultrasonic signal to subject by built-in generator.Such as, terminal in 12 time 30 points within 12 seconds, launch the first ultrasonic signal by built-in generator, then when the transmitting time that terminal gets can be 12 30 points 12 seconds.
S104, terminal obtains the time of reception of reception second ultrasonic signal.
Terminal can obtain the time of reception of reception second ultrasonic signal after receiving and being transmitted into the second ultrasonic signal that the first ultrasonic signal in subject reflects.Such as, terminal in 12 time 30 points within 16 seconds, receive the second ultrasonic signal, then when the time of reception that terminal gets can be 12 30 points 14 seconds.
S105, terminal, according to the time difference between transmitting time and time of reception, obtains the distance between terminal and subject.
After terminal gets transmitting time and time of reception, according to the time difference between transmitting time and time of reception, the distance between terminal and subject can be obtained.Such as, when the transmitting time that terminal gets is 12 30 points 12 seconds, when time of reception is 12 30 points 14 seconds, time difference then between transmitting time and time of reception is 2 seconds, terminal can get the first ultrasonic signal, and to be transmitted in subject the required time be the half of time difference, namely 1 second, and then the first ultrasonic signal to be transmitted in subject the required time and to be multiplied with default velocity of sound by terminal, obtain the distance between terminal and subject, when default velocity of sound is 340m/s, the distance between terminal and subject is 340m.
S106, terminal, according to the distance between terminal and subject, carries out camera focusing.
After terminal gets the distance between terminal and subject, according to the distance between terminal and subject, camera focusing can be carried out.
In the embodiment of the present invention, each second, the number of times of vibration was the frequency of sound, the frequency of sound wave that human ear can hear is 20Hz-20000Hz, ultrasonic frequency is higher than 20000HZ, due to the maximum frequency of sound wave that ultrasonic frequency can be heard higher than human ear, therefore realizing camera focusing by launching hyperacoustic mode, can disturb by noise decrease, improving Consumer's Experience.
In the camera focusing method shown in Fig. 1, when detecting that camera starts, terminal launches the first ultrasonic signal in the subject determined by built-in generator, receive the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting, obtain the transmitting time of being launched the first ultrasonic signal by built-in generator, and receive the time of reception of the second ultrasonic signal, according to the time difference between transmitting time and time of reception, obtain the distance between terminal and subject, according to the distance between terminal and subject, carry out camera focusing, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
Fig. 2 is the schematic flow sheet of a kind of camera focusing method provided in second embodiment of the invention, and as shown in the figure, the camera focusing method in the embodiment of the present invention can comprise:
S201, when terminal detects that camera starts, judges whether the camera started is front-facing camera.
When terminal detects that camera starts, can judge whether the camera started is front-facing camera, when the camera started is front-facing camera, perform step S202 further; When the camera started is post-positioned pick-up head, perform step S203 further.Such as, user starts camera when carrying out video calling, needs to take user by camera, then terminal can determine that the camera started is front-facing camera.And for example, when user starts camera scanning target Quick Response Code, need by camera photographic subjects Quick Response Code, then terminal can determine that the camera started is post-positioned pick-up head.
S202, terminal launches the first ultrasonic signal in subject by the receiver that front-facing camera is corresponding.
When the camera judging to start is front-facing camera, terminal can launch the first ultrasonic signal in subject by the receiver that front-facing camera is corresponding.Wherein, the audible frequency of receiver reaches ultrasonic frequency.In prior art terminal receiver and front-facing camera towards usually identical, when front-facing camera starts, subject is positioned at the front of front-facing camera, the first ultrasonic signal accurately can be transmitted in subject by receiver, improves the accuracy that signal is launched.
S203, terminal passes through horn launch first ultrasonic signal corresponding to post-positioned pick-up head in subject.
When the camera judging to start is post-positioned pick-up head, terminal can pass through horn launch first ultrasonic signal corresponding to post-positioned pick-up head in subject.Wherein, the audible frequency of loudspeaker reaches ultrasonic frequency.In prior art terminal loudspeaker and post-positioned pick-up head towards usually identical, when post-positioned pick-up head starts, subject is positioned at the front of post-positioned pick-up head, the first ultrasonic signal accurately can be transmitted in subject by loudspeaker, improves the accuracy that signal is launched.
S204, terminal receives the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting.
Terminal can receive the second ultrasonic signal that the first ultrasonic signal be transmitted in subject reflects after launching on the first ultrasonic signal to subject by built-in generator.Optionally, after terminal is launched on the first ultrasonic signal to subject by built-in generator, the second ultrasonic signal that first ultrasonic signal that can be transmitted in subject by microphones is reflected.
S205, terminal obtains the transmitting time of being launched the first ultrasonic signal by built-in generator.
Terminal can obtain the transmitting time of being launched the first ultrasonic signal by built-in generator after launching on the first ultrasonic signal to subject by built-in generator.Such as, terminal in 12 time 30 points within 12 seconds, launch the first ultrasonic signal by built-in generator, then when the transmitting time that terminal gets can be 12 30 points 12 seconds.
S206, terminal obtains the time of reception of reception second ultrasonic signal.
Terminal can obtain the time of reception of reception second ultrasonic signal after receiving and being transmitted into the second ultrasonic signal that the first ultrasonic signal in subject reflects.Such as, terminal in 12 time 30 points within 16 seconds, receive the second ultrasonic signal, then when the time of reception that terminal gets can be 12 30 points 14 seconds.
S207, terminal, according to the time difference between transmitting time and time of reception, obtains the distance between terminal and subject.
After terminal gets transmitting time and time of reception, according to the time difference between transmitting time and time of reception, the distance between terminal and subject can be obtained.Such as, when the transmitting time that terminal gets is 12 30 points 12 seconds, when time of reception is 12 30 points 14 seconds, time difference then between transmitting time and time of reception is 2 seconds, terminal can get the first ultrasonic signal, and to be transmitted in subject the required time be the half of time difference, namely 1 second, and then the first ultrasonic signal to be transmitted in subject the required time and to be multiplied with default velocity of sound by terminal, obtain the distance between terminal and subject, when default velocity of sound is 340m/s, the distance between terminal and subject is 340m.
S208, terminal, according to the distance between terminal and subject, carries out camera focusing.
After terminal gets the distance between terminal and subject, according to the distance between terminal and subject, camera focusing can be carried out.
In the camera focusing method shown in Fig. 2, when the camera that judgement starts is front-facing camera, terminal launches the first ultrasonic signal in subject by the receiver that front-facing camera is corresponding, when the camera that judgement starts is post-positioned pick-up head, terminal passes through horn launch first ultrasonic signal corresponding to post-positioned pick-up head in subject, receive the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting, obtain the transmitting time of being launched the first ultrasonic signal by built-in generator, and receive the time of reception of the second ultrasonic signal, terminal is according to the time difference between transmitting time and time of reception, obtain the distance between terminal and subject, terminal is according to the distance between terminal and subject, carry out camera focusing, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
Fig. 3 is the schematic flow sheet of a kind of camera focusing method provided in third embodiment of the invention, and as shown in the figure, the camera focusing method in the embodiment of the present invention can comprise:
S301, when terminal detects that camera starts, the motion state of sense terminals.
When terminal detects that camera starts, can the motion state of sense terminals.Such as, user clicks camera applications icon, and terminal starts camera applications and camera, when terminal detects that camera starts, and the motion state of sense terminals.And for example, user starts camera and carries out video calling in use MSN process, when terminal detects that camera starts, and can the motion state of sense terminals.And for example, when user starts camera scanning target Quick Response Code, when terminal detects that camera starts, can the motion state of sense terminals.
In an alternative embodiment, terminal can obtain terminal at the axial motion state parameters of X, Y, Z tri-, when three axial motion state parameterses be in preset time period zero or be less than parameter preset threshold value time, determine that terminal remains static.Wherein, motion state parameters can be acceleration, speed or displacement etc.
S302, when terminal remains static, terminal launches the first ultrasonic signal in subject by built-in generator.
When terminal remains static, terminal can launch the first ultrasonic signal in subject by built-in generator.Wherein, the audible frequency of built-in generator reaches ultrasonic frequency, and built-in generator can comprise loudspeaker or receiver etc.
In an alternative embodiment, when terminal detects that camera starts, the first ultrasonic signal stored can be transmitted in subject by built-in generator in memory.The embodiment of the present invention generates ultrasonic signal without the need to built-in generator, directly obtains the first ultrasonic signal stored in memory, is transmitted in subject, can improves resource utilization by the first ultrasonic signal got.
In an alternative embodiment, when terminal detects that camera starts, the first ultrasonic signal can be generated by built-in generator, the first ultrasonic signal is transmitted in subject by built-in generator.The audible frequency of built-in generator reaches ultrasonic frequency, terminal can generate the first ultrasonic signal by built-in generator, first ultrasonic signal is transmitted in subject by built-in generator, without the need to increasing extra hardware device, such as ultrasonic motor, Design of Hardware Architecture difficulty can be reduced, reduce hardware cost.
S303, terminal receives the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting.
Terminal can receive the second ultrasonic signal that the first ultrasonic signal be transmitted in subject reflects after launching on the first ultrasonic signal to subject by built-in generator.Optionally, after terminal is launched on the first ultrasonic signal to subject by built-in generator, the second ultrasonic signal that first ultrasonic signal that can be transmitted in subject by microphones is reflected.
S304, terminal obtains the transmitting time of being launched the first ultrasonic signal by built-in generator.
Terminal can obtain the transmitting time of being launched the first ultrasonic signal by built-in generator after launching on the first ultrasonic signal to subject by built-in generator.Such as, terminal in 12 time 30 points within 12 seconds, launch the first ultrasonic signal by built-in generator, then when the transmitting time that terminal gets can be 12 30 points 12 seconds.
S305, terminal obtains the time of reception of reception second ultrasonic signal.
Terminal can obtain the time of reception of reception second ultrasonic signal after receiving and being transmitted into the second ultrasonic signal that the first ultrasonic signal in subject reflects.Such as, terminal in 12 time 30 points within 16 seconds, receive the second ultrasonic signal, then when the time of reception that terminal gets can be 12 30 points 14 seconds.
S306, terminal, according to the time difference between transmitting time and time of reception, obtains the distance between terminal and subject.
After terminal gets transmitting time and time of reception, according to the time difference between transmitting time and time of reception, the distance between terminal and subject can be obtained.Such as, when the transmitting time that terminal gets is 12 30 points 12 seconds, when time of reception is 12 30 points 14 seconds, time difference then between transmitting time and time of reception is 2 seconds, terminal can get the first ultrasonic signal, and to be transmitted in subject the required time be the half of time difference, namely 1 second, and then the first ultrasonic signal to be transmitted in subject the required time and to be multiplied with default velocity of sound by terminal, obtain the distance between terminal and subject, when default velocity of sound is 340m/s, the distance between terminal and subject is 340m.
S307, terminal, according to the distance between terminal and subject, carries out camera focusing.
After terminal gets the distance between terminal and subject, according to the distance between terminal and subject, camera focusing can be carried out.
In the camera focusing method shown in Fig. 3, when terminal detects that camera starts, the motion state of sense terminals, when terminal remains static, the first ultrasonic signal is launched in subject by built-in generator, receive the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting, obtain the transmitting time of being launched the first ultrasonic signal by built-in generator, and receive the time of reception of the second ultrasonic signal, according to the time difference between transmitting time and time of reception, obtain the distance between terminal and subject, according to the distance between terminal and subject, carry out camera focusing, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
Fig. 4 is the structural representation of a kind of terminal provided in first embodiment of the invention, terminal as shown in the figure in the embodiment of the present invention at least can comprise: signal transmitting unit 401, signal receiving unit 402, transmitting time acquiring unit 403, time of reception acquiring unit 404, distance acquiring unit 405 and focusing unit 406, wherein:
Signal transmitting unit 401, during for detecting that camera starts, launches the first ultrasonic signal in the subject determined by built-in generator.Wherein, the audible frequency of built-in generator reaches ultrasonic frequency, and built-in generator can comprise loudspeaker or receiver etc.
Such as, user clicks camera applications icon, and terminal starts camera applications and camera, when signal transmitting unit 401 detects that camera starts, launches the first ultrasonic signal in subject by built-in generator.And for example, user starts camera and carries out video calling in use MSN process, when signal transmitting unit 401 detects that camera starts, can launch the first ultrasonic signal in subject by built-in generator.And for example, when user starts camera scanning target Quick Response Code, when signal transmitting unit 401 detects that camera starts, the first ultrasonic signal can be launched in subject by built-in generator.
Signal receiving unit 402, for receiving the second ultrasonic signal that the first ultrasonic signal be transmitted in subject reflects.When ultrasonic wave runs into the interface be made up of the medium that acoustic impedance is different, reflex will be there is, when then the first ultrasonic signal is transmitted in subject by signal transmitting unit 401, the first ultrasonic signal be transmitted in subject will be reflected back the second ultrasonic signal, and then signal receiving unit 402 receives the second ultrasonic signal.Optionally, after signal transmitting unit 401 is launched on the first ultrasonic signal to subject by built-in generator, the second ultrasonic signal that the first ultrasonic signal that signal receiving unit 402 can be transmitted in subject by microphones reflects.
Transmitting time acquiring unit 403, for obtaining the transmitting time of being launched the first ultrasonic signal by built-in generator.Such as, signal transmitting unit 401 in 12 time 30 points within 12 seconds, launch the first ultrasonic signal by built-in generator, then when the transmitting time that transmitting time acquiring unit 403 gets can be 12 30 points 12 seconds.
Time of reception acquiring unit 404, for obtaining the time of reception of reception second ultrasonic signal.Such as, signal receiving unit 402 in 12 time 30 points within 16 seconds, receive the second ultrasonic signal, then when the time of reception that time of reception acquiring unit 404 gets can be 12 30 points 14 seconds.
Distance acquiring unit 405, for according to the time difference between transmitting time and time of reception, obtains the distance between terminal and subject.Such as, when the transmitting time that transmitting time acquiring unit 403 gets is 12 30 points 12 seconds, when the time of reception that time of reception acquiring unit 404 gets is 12 30 points 14 seconds, time difference then between transmitting time and time of reception is 2 seconds, distance acquiring unit 405 can get the first ultrasonic signal, and to be transmitted in subject the required time be the half of time difference, namely 1 second, and then the first ultrasonic signal is transmitted into the time required in subject and is multiplied with default velocity of sound, obtain the distance between terminal and subject, when default velocity of sound is 340m/s, distance between terminal and subject is 340m.
Focusing unit 406, for according to the distance between terminal and subject, carries out camera focusing.
In an alternative embodiment, built-in generator is receiver, and the audible frequency of receiver reaches ultrasonic frequency, then the signal transmitting unit 401 in the embodiment of the present invention can as shown in Figure 5, comprise further:
Judging unit 501, during for detecting that camera starts, judges whether the camera started is front-facing camera.
First signal transmitting unit 502, for when the camera started is front-facing camera, launches the first ultrasonic signal in subject by the receiver that front-facing camera is corresponding.
Such as, user starts camera when carrying out video calling, need to take user by camera, then judging unit 501 can determine that the camera started is front-facing camera, and the first signal transmitting unit 502 launches the first ultrasonic signal in subject by receiver.In prior art terminal receiver and front-facing camera towards usually identical, when front-facing camera starts, subject is positioned at the front of front-facing camera, the first ultrasonic signal accurately can be transmitted in subject by receiver, improves the accuracy that signal is launched.
Further alternative, built-in generator is loudspeaker, and the audible frequency of loudspeaker reaches ultrasonic frequency, then signal transmitting unit 401 can also comprise:
Secondary signal transmitting element 503, for when the camera started is post-positioned pick-up head, by horn launch first ultrasonic signal corresponding to post-positioned pick-up head in subject.
Such as, when user starts camera scanning target Quick Response Code, need by camera photographic subjects Quick Response Code, then judging unit 501 can determine that the camera started is post-positioned pick-up head, and secondary signal transmitting element 503 passes through horn launch first ultrasonic signal in subject.In prior art terminal loudspeaker and post-positioned pick-up head towards usually identical, when post-positioned pick-up head starts, subject is positioned at the front of post-positioned pick-up head, the first ultrasonic signal accurately can be transmitted in subject by loudspeaker, improves the accuracy that signal is launched.
In an alternative embodiment, signal transmitting unit 401, for being transmitted into subject by the store in memory first ultrasonic signal by built-in generator.The embodiment of the present invention generates ultrasonic signal without the need to built-in generator, directly obtains the first ultrasonic signal stored in memory, is transmitted in subject, can improves resource utilization by the first ultrasonic signal got.
In an alternative embodiment, the signal transmitting unit 401 in the embodiment of the present invention can as shown in Figure 6, comprise further:
Signal generation unit 601, for generating the first ultrasonic signal by built-in generator.
3rd signal transmitting unit 602, for being transmitted into subject by the first ultrasonic signal by built-in generator.
The audible frequency of built-in generator reaches ultrasonic frequency, signal generation unit 601 can generate the first ultrasonic signal by built-in generator, first ultrasonic signal is transmitted in subject by built-in generator by the 3rd signal transmitting unit 602, without the need to increasing extra hardware device, such as ultrasonic motor, Design of Hardware Architecture difficulty can be reduced, reduce hardware cost.
In an alternative embodiment, the signal transmitting unit 401 in the embodiment of the present invention can as shown in Figure 7, comprise further:
Display unit 701, for showing preview picture.
Instruction reception unit 702, for receiving the subject determination instruction that user inputs in preview picture.
Subject determining unit 703, for according to subject determination instruction, determines subject.
4th signal transmitting unit 704, for launching the first ultrasonic signal to subject by built-in generator.
Such as, when preview picture comprises multiple theme, user can choose subject in preview picture, the subject determination instruction that subject determining unit 703 inputs according to user, determine subject, the 4th signal transmitting unit 704 launches the first ultrasonic signal in subject by built-in generator.
Further alternative, subject determining unit 703, for according to subject determination instruction, obtains the positional information of subject.
4th signal transmitting unit 704, for the positional information according to subject, launches the first ultrasonic signal in subject by built-in generator.
Such as, the subject that user chooses in preview picture is positioned at the middle of preview picture, subject determining unit 703 can according to subject determination instruction, obtain the positional information of subject, the positional information of subject can comprise the latitude and longitude coordinates of subject, the first ultrasonic signal that built-in generator is launched by the 4th signal transmitting unit 704 is towards subject, so that subject accurately receives the first ultrasonic signal.
In an alternative embodiment, the terminal in the embodiment of the present invention can also comprise:
Detecting unit 407, before signal transmitting unit 401 is launched on the first ultrasonic signal to subject by built-in generator, the motion state of sense terminals.
Signal transmitting unit 401, also for when terminal remains static, launches the first ultrasonic signal in subject by built-in generator.
From the mode of taking a picture and custom, user have shooting intention take pictures time, the usual mobile terminal of user aims at subject, that is, before user takes pictures, all need one to select and aim at the process of subject, when after basic aligning subject, user is by no longer frequent or large-scale mobile terminal, and terminal progressively will become inactive state from motion state.Based on this, the embodiment of the present invention is by the motion state of detecting unit 407 sense terminals, and when detecting that terminal remains static, signal transmitting unit 401 launches the first ultrasonic signal in subject by built-in generator, reduce camera focusing time delay, promote Consumer's Experience.
Further alternative, the detecting unit 407 in the embodiment of the present invention can as shown in Figure 8, comprise further:
Parameter acquiring unit 801, for obtaining terminal at the axial motion state parameters of X, Y, Z tri-.Wherein, motion state parameters can be acceleration, speed or displacement etc.
Status determining unit 802, for be in preset time period when three axial motion state parameterses zero or be less than parameter preset threshold value time, determine that terminal remains static.
In the terminal shown in Fig. 4, when signal transmitting unit 401 detects that camera starts, the first ultrasonic signal is launched in the subject determined by built-in generator, signal receiving unit 402 receives the second ultrasonic signal being transmitted into the first ultrasonic signal in subject and reflecting, transmitting time acquiring unit 403 obtains the transmitting time of being launched the first ultrasonic signal by built-in generator, time of reception acquiring unit 404 obtains the time of reception of reception second ultrasonic signal, distance acquiring unit 405 is according to the time difference between transmitting time and time of reception, obtain the distance between terminal and subject, focusing unit 406 is according to the distance between terminal and subject, carry out camera focusing, built-in generator can be used to realize ultrasonic wave focusing, thus improve effect of taking pictures, improve photographic quality.
Fig. 9 is the structural representation of a kind of terminal provided in second embodiment of the invention, and as shown in the figure, described terminal can comprise: at least one input unit 903, at least one output device 904, at least one processor 901, such as CPU, memory 905 and at least one bus 902.
Wherein, above-mentioned bus 902 is for connecting above-mentioned input unit 903, output device 904, processor 901 and memory 905.
Wherein, above-mentioned input unit 903 specifically can be microphone, for receiving the second ultrasonic signal.Input unit 903 specifically can be the contact panel of terminal, confirms instruction for the subject receiving user's input.
Above-mentioned output device 904 specifically can be built-in generator, and for launching the first ultrasonic signal, the audible frequency of built-in generator reaches ultrasonic frequency, and built-in generator can comprise loudspeaker or receiver etc.Output device 904 specifically can be the display screen of terminal, for showing preview picture.
Above-mentioned memory 905 can be high-speed RAM memory, also can be non-labile memory (non-volatile memory), such as magnetic disc store, for storing the target user interface in background task stack and the target user interface in front-end task stack.Above-mentioned memory 905 is also for storing batch processing code, and above-mentioned input unit 903, output device 904 and processor 901, for calling the program code stored in memory 905, perform and operate as follows:
Output device 904, during for detecting that camera starts, launches the first ultrasonic signal in the subject determined.
Input unit 903, for receiving the second ultrasonic signal that the first ultrasonic signal be transmitted in subject reflects.
Processor 901, for obtaining the transmitting time of being launched the first ultrasonic signal by built-in generator.
Processor 901, also for obtaining the time of reception of reception second ultrasonic signal.
Processor 901, also for according to the time difference between transmitting time and time of reception, obtains the distance between terminal and subject.
Processor 901, also for according to the distance between terminal and subject, carries out camera focusing.
In an alternative embodiment, when output device 904 detects that camera starts, launch the first ultrasonic signal in the subject determined, be specifically as follows:
When detecting that camera starts, processor 901 judges whether the camera started is front-facing camera.
When the camera started is front-facing camera, output device 904 launches the first ultrasonic signal in subject.Wherein output device 904 is the receiver that front-facing camera is corresponding.
Further alternative, processor 901 can also perform following operation after judging whether the camera started is front-facing camera:
When the camera started is post-positioned pick-up head, output device 904 launches the first ultrasonic signal in subject.Wherein output device 904 is the loudspeaker that post-positioned pick-up head is corresponding.
In an alternative embodiment, output device 904 is launched the first ultrasonic signal and is specifically as follows on the subject determined:
The first ultrasonic signal stored in memory is transmitted in subject by output device 904.
In an alternative embodiment, output device 904 is launched the first ultrasonic signal and is specifically as follows on the subject determined:
Output device 904 generates the first ultrasonic signal.
Output device 904 is transmitted into logical for the first ultrasonic signal in subject.
In an alternative embodiment, output device 904 is launched the first ultrasonic signal and is specifically as follows on the subject determined:
Output device 904 shows preview picture.
Input unit 903 receives the subject determination instruction that user inputs in preview picture.
Processor 901, according to subject determination instruction, determines subject.
Output device 904 launches the first ultrasonic signal in the subject determined.
Further alternative, processor 901, according to subject determination instruction, is determined subject, is specifically as follows:
Processor 901, according to subject determination instruction, obtains the positional information of subject.
Output device 904, according to the positional information of subject, launches the first ultrasonic signal in subject.
In an alternative embodiment, output device 904 can also perform following operation before launching on the first ultrasonic signal to subject:
The motion state of processor 901 sense terminals.
When terminal remains static, output device 904 launches the first ultrasonic signal in subject.
Further alternative, the motion state of processor 901 sense terminals, is specifically as follows:
Processor 901 obtains terminal at the axial motion state parameters of X, Y, Z tri-.
When three axial motion state parameterses be in preset time period zero or be less than parameter preset threshold value time, processor 901 determines that terminal remains static.
Concrete, the terminal introduced in the embodiment of the present invention can in order to implement the part or all of flow process in the camera focusing method embodiment of composition graphs 1 ~ Fig. 3 of the present invention introduction.
Unit in all embodiments of the present invention, universal integrated circuit can be passed through, such as CPU (CentralProcessing Unit, central processing unit), or realized by ASIC (Application Specific IntegratedCircuit, application-specific integrated circuit (ASIC)).
Step in embodiment of the present invention method can be carried out order according to actual needs and be adjusted, merges and delete.
Unit in embodiment of the present invention device can carry out merging, divide and deleting according to actual needs.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (9)

1. a camera focusing method, is characterized in that, comprising:
When detecting that camera starts, terminal launches the first ultrasonic signal in the subject determined by built-in generator;
Described terminal receives the second ultrasonic signal being transmitted into described first ultrasonic signal in described subject and reflecting;
Described terminal obtains the transmitting time of being launched described first ultrasonic signal by described built-in generator;
Described terminal obtains the time of reception receiving described second ultrasonic signal;
Described terminal, according to the time difference between described transmitting time and described time of reception, obtains the distance between described terminal and described subject;
Described terminal, according to the distance between described terminal and described subject, carries out camera focusing.
2. method according to claim 1, it is characterized in that, described built-in generator is receiver, and the audible frequency of described receiver reaches ultrasonic frequency;
Described when detecting that camera starts, terminal is launched the first ultrasonic signal by built-in generator and is comprised on the subject determined:
When detecting that camera starts, judge whether the camera started is front-facing camera;
When the camera of described startup is front-facing camera, described terminal launches described first ultrasonic signal in described subject by the receiver that described front-facing camera is corresponding.
3. method according to claim 2, it is characterized in that, described built-in generator is loudspeaker, and the audible frequency of described loudspeaker reaches ultrasonic frequency;
Described judge start camera whether be front-facing camera after, also comprise:
When the camera of described startup is post-positioned pick-up head, described terminal by the first ultrasonic signal described in horn launch corresponding to described post-positioned pick-up head in described subject.
4. method according to claim 1, it is characterized in that, described terminal is launched the first ultrasonic signal by built-in generator and is comprised on the subject determined:
Described first ultrasonic signal stored in memory is transmitted in described subject by described built-in generator by described terminal.
5. method according to claim 1, it is characterized in that, described terminal is launched the first ultrasonic signal by built-in generator and is comprised on the subject determined:
Described terminal generates described first ultrasonic signal by described built-in generator;
Described first ultrasonic signal is transmitted in described subject by described built-in generator by described terminal.
6. method according to claim 1, it is characterized in that, described terminal is launched the first ultrasonic signal by built-in generator and is comprised on the subject determined:
Described terminal demonstration preview picture;
Described terminal receives the subject determination instruction that user inputs in described preview picture;
Described terminal, according to described subject determination instruction, determines described subject;
Described terminal launches described first ultrasonic signal in described subject by described built-in generator.
7. method according to claim 6, it is characterized in that, described terminal, according to described subject determination instruction, determines that described subject comprises:
Described terminal, according to described subject determination instruction, obtains the positional information of described subject;
Described terminal is launched described first ultrasonic signal by described built-in generator and is comprised on described subject:
Described terminal, according to the positional information of described subject, launches described first ultrasonic signal in described subject by described built-in generator.
8. method according to claim 1, it is characterized in that, described terminal also comprises before launching on the first ultrasonic signal to the subject determined by built-in generator:
Described terminal detects the motion state of described terminal;
When described terminal remains static, described terminal performs launches described first ultrasonic signal in described subject by described built-in generator.
9. method according to claim 8, it is characterized in that, the motion state that described terminal detects described terminal comprises:
Described terminal obtains described terminal at the axial motion state parameters of X, Y, Z tri-;
When described three axial motion state parameterses be in preset time period zero or be less than parameter preset threshold value time, described terminal determines that described terminal remains static.
CN201510166255.XA 2015-04-10 2015-04-10 Camera focusing method Pending CN104811613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510166255.XA CN104811613A (en) 2015-04-10 2015-04-10 Camera focusing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510166255.XA CN104811613A (en) 2015-04-10 2015-04-10 Camera focusing method

Publications (1)

Publication Number Publication Date
CN104811613A true CN104811613A (en) 2015-07-29

Family

ID=53696079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510166255.XA Pending CN104811613A (en) 2015-04-10 2015-04-10 Camera focusing method

Country Status (1)

Country Link
CN (1) CN104811613A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105208289A (en) * 2015-10-27 2015-12-30 广东欧珀移动通信有限公司 Shooting control method and device for mobile terminal and mobile terminal
CN105208285A (en) * 2015-10-15 2015-12-30 广东欧珀移动通信有限公司 Photographing method and device based on ultrasonic waves
CN105323481A (en) * 2015-10-15 2016-02-10 广东欧珀移动通信有限公司 Ultrasonic-based photographing method and device
CN105338241A (en) * 2015-10-15 2016-02-17 广东欧珀移动通信有限公司 Shooting method and device
CN105827937A (en) * 2015-08-28 2016-08-03 维沃移动通信有限公司 Imaging device and imaging method
CN106170064A (en) * 2016-09-14 2016-11-30 广东欧珀移动通信有限公司 Camera focusing method, system and electronic equipment
CN106303214A (en) * 2016-07-25 2017-01-04 维沃移动通信有限公司 A kind of focusing method and device
CN107659764A (en) * 2016-07-25 2018-02-02 北京小米移动软件有限公司 Focus method, device and terminal
CN108366207A (en) * 2018-03-20 2018-08-03 广东欧珀移动通信有限公司 Control method, apparatus, electronic equipment and the computer readable storage medium of shooting
CN112135034A (en) * 2019-06-24 2020-12-25 Oppo广东移动通信有限公司 Photographing method and device based on ultrasonic waves, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872105A (en) * 2010-06-02 2010-10-27 华为终端有限公司 Method and device for photographing
CN102629979A (en) * 2012-03-30 2012-08-08 华为终端有限公司 Shooting mode starting method and photographic device
CN103376615A (en) * 2012-04-24 2013-10-30 鸿富锦精密工业(深圳)有限公司 Automatic focusing device and automatic focusing method
CN104052932A (en) * 2014-07-03 2014-09-17 深圳市世尊科技有限公司 Rapidly-focusing mobile phone camera shooting module

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872105A (en) * 2010-06-02 2010-10-27 华为终端有限公司 Method and device for photographing
CN102629979A (en) * 2012-03-30 2012-08-08 华为终端有限公司 Shooting mode starting method and photographic device
CN103376615A (en) * 2012-04-24 2013-10-30 鸿富锦精密工业(深圳)有限公司 Automatic focusing device and automatic focusing method
CN104052932A (en) * 2014-07-03 2014-09-17 深圳市世尊科技有限公司 Rapidly-focusing mobile phone camera shooting module

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827937A (en) * 2015-08-28 2016-08-03 维沃移动通信有限公司 Imaging device and imaging method
CN105827937B (en) * 2015-08-28 2019-07-26 维沃移动通信有限公司 A kind of photographic device and image capture method
CN105208285B (en) * 2015-10-15 2019-02-01 Oppo广东移动通信有限公司 A kind of photographic method based on ultrasound and device
CN105338241A (en) * 2015-10-15 2016-02-17 广东欧珀移动通信有限公司 Shooting method and device
CN105323481A (en) * 2015-10-15 2016-02-10 广东欧珀移动通信有限公司 Ultrasonic-based photographing method and device
CN105208285A (en) * 2015-10-15 2015-12-30 广东欧珀移动通信有限公司 Photographing method and device based on ultrasonic waves
CN105208289A (en) * 2015-10-27 2015-12-30 广东欧珀移动通信有限公司 Shooting control method and device for mobile terminal and mobile terminal
CN106303214A (en) * 2016-07-25 2017-01-04 维沃移动通信有限公司 A kind of focusing method and device
CN107659764A (en) * 2016-07-25 2018-02-02 北京小米移动软件有限公司 Focus method, device and terminal
CN106303214B (en) * 2016-07-25 2019-09-27 维沃移动通信有限公司 A kind of focusing method and device
CN106170064A (en) * 2016-09-14 2016-11-30 广东欧珀移动通信有限公司 Camera focusing method, system and electronic equipment
CN108366207A (en) * 2018-03-20 2018-08-03 广东欧珀移动通信有限公司 Control method, apparatus, electronic equipment and the computer readable storage medium of shooting
CN108366207B (en) * 2018-03-20 2020-06-23 Oppo广东移动通信有限公司 Method and device for controlling shooting, electronic equipment and computer-readable storage medium
CN112135034A (en) * 2019-06-24 2020-12-25 Oppo广东移动通信有限公司 Photographing method and device based on ultrasonic waves, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104811613A (en) Camera focusing method
CN104811612A (en) Terminal
US11405538B2 (en) Macro imaging method and terminal
KR101990073B1 (en) Method and apparatus for shooting and storing multi-focused image in electronic device
CN104580992A (en) Control method and mobile terminal
WO2017008353A1 (en) Capturing method and user terminal
CN105208287B (en) A kind of image pickup method and device
CN105339841A (en) Photographing method for dual-camera device and dual-camera device
JP2002247446A (en) Digital image pickup device, image pickup device, image processor and recording medium
CN105827961A (en) Mobile terminal and focusing method
EP3062513B1 (en) Video apparatus and photography method thereof
TWI769523B (en) Image processing method, electronic device and computer-readable storage medium
CN104539843A (en) Terminal shooting method
CN104506769A (en) Shooting method and terminal
CN105338238A (en) Photographing method and electronic device
US20180144546A1 (en) Method, device and terminal for processing live shows
JP2020515982A (en) Image processing method, apparatus, computer-readable storage medium, and electronic device
CN108989687A (en) camera focusing method and device
CN105657253B (en) A kind of focusing method and electronic equipment
CN106993130A (en) Gather method, device and the mobile device of image
CN110677580B (en) Shooting method, shooting device, storage medium and terminal
WO2019061223A1 (en) Camera application control method and device
CN106303214A (en) A kind of focusing method and device
CN108989666A (en) Image pickup method, device, mobile terminal and computer-readable storage medium
CN109547703B (en) Shooting method and device of camera equipment, electronic equipment and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20150729