CN108225278A - A kind of distance measuring method, mobile terminal - Google Patents

A kind of distance measuring method, mobile terminal Download PDF

Info

Publication number
CN108225278A
CN108225278A CN201711230400.1A CN201711230400A CN108225278A CN 108225278 A CN108225278 A CN 108225278A CN 201711230400 A CN201711230400 A CN 201711230400A CN 108225278 A CN108225278 A CN 108225278A
Authority
CN
China
Prior art keywords
mobile terminal
focus condition
camera
ratio
imaging
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
CN201711230400.1A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711230400.1A priority Critical patent/CN108225278A/en
Publication of CN108225278A publication Critical patent/CN108225278A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/02Picture taking arrangements specially adapted for photogrammetry or photographic surveying, e.g. controlling overlapping of pictures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • G01C11/12Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Studio Devices (AREA)

Abstract

The present invention provides a kind of distance measuring method and mobile terminals, are related to field of measuring technique.The method including being directed to same target reference object, obtains the co-located imaging area under the first focus condition and the second focus condition of camera of the mobile terminal respectively;According to the imaging area, imaging ratio of the camera under first focus condition and the second focus condition is obtained;According to the imaging ratio, based on preset imaging ratio and distance correspondence, the distance between the target reference object and the mobile terminal are obtained.It can carry out large range of range measurement based on camera system that mobile terminal carries, the range capability for improving mobile terminal while reduces the complexity and cost of mobile terminal.

Description

A kind of distance measuring method, mobile terminal
Technical field
The present invention relates to field of measuring technique more particularly to a kind of distance measuring method, mobile terminals.
Background technology
With the rapid proliferation of the mobile terminals such as the development of computer technology and mobile phone, the function of mobile terminal is also got over Come abundanter and powerful and closer and closer inseparable with people’s lives.For example, it can be surveyed by mobile terminal into row distance Amount, and other functions can further be realized, for example can be positioned by range measurement based on range measurement, it obtains and uses Current azimuth information in family, etc..At present, on mobile terminals user carry out range measurement method have ultrasonic ranging method and Infrared distance measuring method, and ultrasonic wave and infrared ray are all to calculate distance with receiving the time difference of wavelength by emitting.
But since mobile terminal is there are power consumption limit, so either ultrasonic ranging method or infrared distance measuring method, All there is the smaller shortcoming of measurement distance range, and in order to which ranging increases ultrasonic sensor or infrared in mobile terminal side Sensor, which also results in the complexity of mobile terminal and cost, to be increased.
Invention content
The embodiment of the present invention provides a kind of distance measuring method and mobile terminal, to solve existing to be surveyed using mobile terminal Away from finding range is small and the complexity of mobile terminal and it is of high cost the problem of.
In order to solve the above-mentioned technical problem, the invention is realized in this way:A kind of distance measuring method, including:
For same target reference object, the camera for obtaining the mobile terminal respectively is co-located in the first coke Away from the imaging area under condition and the second focus condition;
According to the imaging area, obtain the camera under first focus condition and the second focus condition into As ratio;
According to the imaging ratio, based on preset imaging ratio and distance correspondence, the target shooting pair is obtained As the distance between with the mobile terminal.
In a first aspect, the embodiment of the present invention additionally provides a kind of mobile terminal, including:
Imaging area acquisition module for being directed to same target reference object, obtains the camera shooting of the mobile terminal respectively The co-located imaging area under the first focus condition and the second focus condition;
Ratio acquisition module is imaged, for according to the imaging area, obtaining the camera in the first focal length item Imaging ratio under part and the second focus condition;
Apart from acquisition module, for according to the imaging ratio, based on preset imaging ratio and distance correspondence, obtaining To the distance between the target reference object and the mobile terminal.
Second aspect, the embodiment of the present invention are additionally provided with a kind of mobile terminal, including:Memory, processor and storage On the memory and the computer program that can run on the processor, the computer program are held by the processor The step of distance measuring method as the aforementioned is realized during row.
The third aspect, the embodiment of the present invention is additionally provided with a kind of computer readable storage medium, described computer-readable Computer program is stored on storage medium, the computer program realizes distance measuring method as the aforementioned when being executed by processor Step.
In embodiments of the present invention, by being directed to same target reference object, the camera shooting of the mobile terminal is obtained respectively The co-located imaging area under the first focus condition and the second focus condition;According to the imaging area, obtain Imaging ratio of the camera under first focus condition and the second focus condition;According to the imaging ratio, it is based on Preset imaging ratio and distance correspondence, obtain the distance between the target reference object and the mobile terminal.Energy It is enough to realize that the camera system carried based on mobile terminal carries out large range of range measurement, improve the ranging energy of mobile terminal The complexity and cost of mobile terminal are reduced while power.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific embodiment for lifting the present invention.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of step flow chart of distance measuring method in the embodiment of the present invention one;
Fig. 2 is a kind of optical zoom imaging schematic diagram of camera in the embodiment of the present invention one;
Fig. 3 is a kind of step flow chart of distance measuring method in the embodiment of the present invention two;
Fig. 4 is a kind of structure diagram of mobile terminal in the embodiment of the present invention three;
Fig. 5 is a kind of structure diagram of mobile terminal in the embodiment of the present invention four;
Fig. 6 is a kind of hardware architecture diagram of mobile terminal in the embodiment of the present invention five.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Embodiment one
A kind of distance measuring method provided in an embodiment of the present invention is discussed in detail.
With reference to Fig. 1, a kind of step flow chart of distance measuring method in the embodiment of the present invention is shown.
Step 110, for same target reference object, the camera for obtaining the mobile terminal respectively is co-located Imaging area under the first focus condition and the second focus condition.
A kind of distance measuring method that the embodiment of the present invention proposes can realize that distance is surveyed based on the camera system of mobile terminal Amount, and almost all of mobile terminal all has a camera system at present, thus can not increase mobile terminal complexity and into In the case of this, longer-distance measurement is realized, enrich the function and usage scenario of mobile terminal, promote user experience.
In practical applications, the optical zoom of the camera of mobile terminal is imaged as shown in Fig. 2, optical zoom is to pass through mirror First 1, the position of object 2 and focus tripartite change and generate.When imaging surface moves in the horizontal direction, visual angle and Focal length will change, and farther scenery becomes apparent from, the feeling for making people's perceptual image object progressive.It is imaged by optical zoom Principle understands that optical zoom multiple is bigger, and the object that can be shot is more remote, while also more clear, i.e., reference object is in mobile terminal Imaging area on photosensitive sensor (sensor) is bigger.Referring for example to shown in Fig. 2, for object 1, at short focus m into picture Highly for M, at middle parfocal n into image height degree be N, long parfocal l places, into image height degree be L, then, the present invention can be with base Range measurement is realized in the camera system of mobile terminal.Concrete methods of realizing is mainly taken pictures using the optical zoom of mobile terminal System when the camera of mobile terminal is co-located, is clapped under the first focus condition and under the second focus condition respectively Same target is taken the photograph, calculates mobile terminal to the distance of reference object by comparing the imaging size under the conditions of different focal length.
Therefore, in embodiments of the present invention, for measurement distance, can be taken pictures based on the optical zoom of mobile terminal is System, for same target reference object, the camera for obtaining mobile terminal respectively is co-located in the first focus condition, And the second imaging area under focus condition.Target reference object therein can be preselected according to demand, to this The embodiment of the present invention is not limited.Moreover, in embodiments of the present invention, can mobile terminal be obtained by any methods availalbe Camera it is co-located under the first focus condition and the second focus condition for same target reference object into Image planes are accumulated, this embodiment of the present invention is not limited.Moreover, in order to ensure the accuracy of the distance finally obtained, need to protect Demonstrate,prove the camera for obtaining mobile terminal under the first focus condition and the second focus condition for target reference object into When image planes are accumulated, target reference object will not change relative to the position of camera.
It is obtained for example, the camera of mobile terminal can first be controlled to be shot under the first focus condition comprising target shooting pair The first image of elephant, and can the camera based on the first image acquisition mobile terminal under the first focus condition be directed to target The imaging area of reference object;Then the camera of control mobile terminal is shot under the second focus condition obtains clapping comprising target Take the photograph the second image of object, and can the camera based on the second image acquisition mobile terminal be directed under the second focus condition The imaging area of target reference object;Etc..
First focus condition and the second focus condition therein can according to demand before this step or this It is set before either step before step, this embodiment of the present invention is not limited.For example, the first coke can be set It is 1 times of focal length away from the shooting focal length that condition is mobile terminal camera, the second focus condition is the shooting of mobile terminal camera Focal length is n times of focal length, and n is not 1, etc..
Step 120, according to the imaging area, the camera is obtained in first focus condition and the second focal length item Imaging ratio under part.
It has been observed that in embodiments of the present invention, mainly by comparing the same reference object under the conditions of different focal length Size is imaged to calculate mobile terminal to the distance of reference object.So, mobile terminal is being obtained for the shooting of same target After imaging area of the object under the first focus condition and the second focus condition, under the conditions of characterizing two different focal lengths The imaging area for same target reference object correspondence, then need according to the imaging area that gets, further Obtain imaging ratio of the camera under first focus condition and the second focus condition.Wherein it is imaged ratio and imaging area Between correspondence can be preset according to demand, this embodiment of the present invention is not limited.
For example, it is assumed that through step 110 get for target reference object, camera under the first focus condition into Image planes product is a1, and the imaging area under the second focus condition is a2, then can set using a2/a1 as camera and be directed to Imaging ratio of the target reference object under the first focus condition and the second focus condition;Can certainly a1/a2, either Other any available correspondences are as camera for the target reference object in the first focus condition and the second focus condition Under imaging ratio.
Step 130, according to the imaging ratio, based on preset imaging ratio and distance correspondence, the mesh is obtained Mark the distance between reference object and the mobile terminal.
In practical applications, theoretically in the case where other conditions are constant, the distance of reference object and mobile terminal is not Together, the size for being imaged ratio is also accordingly different, in embodiments of the present invention, can pass through test of many times either experience Ratio and distance correspondence are imaged etc. pre-establishing, then are getting camera in the first focus condition and the second focal length item After imaging ratio under part, then can mesh based on preset imaging ratio and distance correspondence, be obtained according to imaging ratio Mark the distance between reference object and mobile terminal.
In embodiments of the present invention, by being directed to target reference object, the camera for obtaining the mobile terminal respectively exists Imaging area under first focus condition and the second focus condition;According to the imaging area, the camera is obtained described Imaging ratio under first focus condition and the second focus condition;According to the imaging ratio, based on preset imaging ratio with Distance correspondence obtains the distance between the target reference object and the mobile terminal.It can realize based on mobile whole The included camera system in end carries out large range of range measurement, and the range capability for improving mobile terminal while reduces shifting The complexity and cost of dynamic terminal.
Embodiment two
A kind of distance measuring method provided in an embodiment of the present invention is discussed in detail.
With reference to Fig. 3, a kind of step flow chart of distance measuring method in the embodiment of the present invention is shown.
Step 210, the target is shot under the first focus condition when being located at the same position using the camera During reference object, the first photosensitive area that the target reference object is directed in the photosensitive sensor of the mobile terminal is obtained.
In embodiments of the present invention, it can be clapped with being directed to same target in the photosensitive sensor in the camera system of mobile terminal The photosensitive area of object is taken the photograph as corresponding imaging area, and can be by reading mobile terminal photosensitive sensor in mesh The imaging pixel point number of reference object is marked as its photosensitive area, can specifically pass through the CPU (Central of mobile terminal Processing Unit, central processing unit) it reads in the photosensitive sensor of mobile terminal to the imaging pixel of target reference object Point number, naturally it is also possible to be read by other any available means in the photosensitive sensor of mobile terminal to target reference object Imaging pixel point number, this embodiment of the present invention is not limited.So at this point, in order to obtain camera in the first focal length Under the conditions of be directed to the imaging area of target reference object, then can be co-located the in the camera using mobile terminal When the target reference object is shot under one focus condition, obtain in the photosensitive sensor of the mobile terminal and clapped for same target The first photosensitive area of object is taken the photograph, and co-located first using the camera of the first photosensitive area as the mobile terminal The imaging area of target reference object is directed under focus condition.
Step 220, the target is directed under the second focus condition when the utilization camera is located at the same position When reference object is shot, obtain in the photosensitive sensor of the mobile terminal for the second sense of the target reference object Light area.
It similarly, in embodiments of the present invention, can also be co-located under the second focus condition using camera When being shot for target reference object, obtain in the photosensitive sensor of mobile terminal for the second sense of target reference object Light area, and the camera using the second photosensitive area as mobile terminal is directed to target reference object under the second focus condition Imaging area.
Optionally, in embodiments of the present invention, the shooting focal length that first focus condition includes the camera is 1 times Focal length;The shooting focal length that second focus condition includes the camera is the preset multiple focal length in addition to 1.
In practical applications, the camera of general mobile terminal, which can be given tacit consent to, is shot, therefore with 1 times of focal length in the present invention In embodiment, in order to avoid crossing multioperation, fast and easy obtains imaging ratio, can set the first focus condition as camera Shooting focal length is 1 times of focal length, may not need at this time and the acquiescence focal length of camera is adjusted, can obtain first more quickly Photosensitive area.The shooting focal length that so the second focus condition then could be provided as camera is the preset multiple focal length in addition to 1. Preset multiple therein can according to demand and the performance of camera is preset not be subject to this embodiment of the present invention It limits.
Step 230, the ratio of second photosensitive area and first photosensitive area is calculated, is existed as the camera Imaging ratio under second focus condition and the first focus condition.
In embodiments of the present invention, the ratio with the second photosensitive area and the first photosensitive area can be set, as camera shooting Imaging ratio of the head under the second focus condition and the first focus condition.The second photosensitive area so then can be directly calculated at this time With the ratio of the first photosensitive area, and then imaging ratio of the camera under the second focus condition and the first focus condition is obtained.
Step 240, distance values corresponding with the imaging ratio are obtained in preset ratio distance relationship library, as The distance between the target reference object and the mobile terminal;Wherein, in the ratio distance relationship library record have it is pre- If imaging ratio and distance correspondence.
In embodiments of the present invention, can pre-set a database for store aforementioned imaging ratio with apart from right Should be related to namely a default ratio distance relationship library, and the ratio distance relationship library can be stored in mobile terminal it is local or Person is any free memory of cloud server etc., this embodiment of the present invention is not limited.
So obtain imaging ratio after, then can further in preset ratio distance relationship library obtain with into As the corresponding distance values of ratio, as the distance between target reference object and mobile terminal.It for example, can be in preset ratio Be worth distance relationship library in storage imaging ratio and distance between correspondence for (B1, B2, B3, B4 ... .Bn)=(X1, X2, X3, X4 ... Xn), and if being B3 for the imaging ratio that current target reference object obtains, then it can then be based on upper The ratio distance relationship library stated, it is X3 to obtain the distance of the target reference object and mobile terminal at this time.
In embodiments of the present invention, by being directed to target reference object, the camera for obtaining the mobile terminal respectively exists Imaging area under first focus condition and the second focus condition;According to the imaging area, the camera is obtained described Imaging ratio under first focus condition and the second focus condition;According to the imaging ratio, based on preset imaging ratio with Distance correspondence obtains the distance between the target reference object and the mobile terminal.It can realize based on mobile whole The included camera system in end carries out large range of range measurement, and the range capability for improving mobile terminal while reduces shifting The complexity and cost of dynamic terminal.
Moreover, in embodiments of the present invention, it can work as and be located at the same position in the first focal length using the camera Under the conditions of when shooting the target reference object, obtain in the photosensitive sensor of the mobile terminal for target shooting pair The first photosensitive area of elephant;The target is directed under the second focus condition when being located at the same position using the camera When reference object is shot, obtain in the photosensitive sensor of the mobile terminal for the second sense of the target reference object Light area.Also, the ratio of second photosensitive area and first photosensitive area is calculated, as the camera described Imaging ratio under first focus condition and the second focus condition.So as to improve the convenience for obtaining imaging ratio.
In addition, in embodiments of the present invention, first focus condition can also be set to include the shooting of the camera Focal length is 1 times of focal length;The shooting focal length that second focus condition includes the camera is burnt for the preset multiple in addition to 1 Away from.So as to further improve the convenience and efficiency that obtain imaging ratio.
Further, in embodiments of the present invention, can also be obtained in preset ratio distance relationship library with it is described into As the corresponding distance values of ratio, as the distance between the target reference object and the mobile terminal;Wherein, described Record has preset imaging ratio and distance correspondence in ratio distance relationship library.So as to further improve range measurement Convenience and accuracy.
Embodiment three
A kind of mobile terminal provided in an embodiment of the present invention is discussed in detail.
With reference to Fig. 4, a kind of structure diagram of mobile terminal in the embodiment of the present invention is shown.
The mobile terminal 300 of the embodiment of the present invention includes:Imaging area acquisition module 310, imaging ratio acquisition module 320 With apart from acquisition module 330.
Be discussed in detail separately below each module function and each module between interactive relation.
Imaging area acquisition module 310 for being directed to same target reference object, obtains taking the photograph for the mobile terminal respectively As the co-located imaging area under the first focus condition and the second focus condition.
Ratio acquisition module 320 is imaged, for according to the imaging area, obtaining the camera in first focal length Imaging ratio under condition and the second focus condition.
Apart from acquisition module 330, for according to the imaging ratio, being closed based on preset imaging ratio with apart from corresponding System, obtains the distance between the target reference object and the mobile terminal.
Mobile terminal provided in an embodiment of the present invention can realize that mobile terminal is realized in the embodiment of the method for Fig. 1 and Fig. 3 Each process, repeated to avoid, which is not described herein again.
In embodiments of the present invention, by being directed to same target reference object, the camera shooting of the mobile terminal is obtained respectively The co-located imaging area under the first focus condition and the second focus condition;According to the imaging area, obtain Imaging ratio of the camera under first focus condition and the second focus condition;According to the imaging ratio, it is based on Preset imaging ratio and distance correspondence, obtain the distance between the target reference object and the mobile terminal.Energy It is enough to realize that the camera system carried based on mobile terminal carries out large range of range measurement, improve the ranging energy of mobile terminal The complexity and cost of mobile terminal are reduced while power.
Example IV
A kind of mobile terminal provided in an embodiment of the present invention is discussed in detail.
With reference to Fig. 5, a kind of structure diagram of mobile terminal in the embodiment of the present invention is shown.
The mobile terminal 400 of the embodiment of the present invention includes:Imaging area acquisition module 410, imaging ratio acquisition module 420 With apart from acquisition module 430.
Be discussed in detail separately below each module function and each module between interactive relation.
Imaging area acquisition module 410 for being directed to same target reference object, obtains taking the photograph for the mobile terminal respectively As the co-located imaging area under the first focus condition and the second focus condition.
Optionally, in embodiments of the present invention, the imaging area acquisition module 410, can further include:
First photosensitive area acquisition submodule 411 is located at the same position first for working as using the camera When the target reference object is shot under focus condition, obtain in the photosensitive sensor of the mobile terminal and clapped for the target Take the photograph the first photosensitive area of object.
Second photosensitive area acquisition submodule 412, for when co-located in the second focal length using the camera Under the conditions of when being shot for the target reference object, obtain and the mesh be directed in the photosensitive sensor of the mobile terminal Mark the second photosensitive area of reference object.
Ratio acquisition module 420 is imaged, for according to the imaging area, obtaining the camera in first focal length Imaging ratio under condition and the second focus condition.
Optionally, in embodiments of the present invention, the imaging ratio acquisition module 420, can further include:
Ratio acquisition submodule 421 is imaged, for calculating the ratio of second photosensitive area and first photosensitive area Value, as imaging ratio of the camera under first focus condition and the second focus condition.
Optionally, in embodiments of the present invention, the shooting focal length that first focus condition includes the camera is 1 times Focal length;The shooting focal length that second focus condition includes the camera is the preset multiple focal length in addition to 1.
Apart from acquisition module 430, for according to the imaging ratio, being closed based on preset imaging ratio with apart from corresponding System, obtains the distance between the target reference object and the mobile terminal.
Optionally, in embodiments of the present invention, it is described apart from acquisition module, it can further include:
It is corresponding with the imaging ratio for being obtained in preset ratio distance relationship library apart from acquisition submodule 431 Distance values, as the distance between the target reference object and the mobile terminal;Wherein, it is closed in ratio distance It is that record has preset imaging ratio and distance correspondence in library.
Mobile terminal provided in an embodiment of the present invention can realize that mobile terminal is realized in the embodiment of the method for Fig. 1 and Fig. 3 Each process, repeated to avoid, which is not described herein again.
In embodiments of the present invention, by being directed to same target reference object, the camera shooting of the mobile terminal is obtained respectively The co-located imaging area under the first focus condition and the second focus condition;According to the imaging area, obtain Imaging ratio of the camera under first focus condition and the second focus condition;According to the imaging ratio, it is based on Preset imaging ratio and distance correspondence, obtain the distance between the target reference object and the mobile terminal.Energy It is enough to realize that the camera system carried based on mobile terminal carries out large range of range measurement, improve the ranging energy of mobile terminal The complexity and cost of mobile terminal are reduced while power.
Moreover, in embodiments of the present invention, it can work as and be located at the same position in the first focal length using the camera Under the conditions of when shooting the target reference object, obtain in the photosensitive sensor of the mobile terminal for target shooting pair The first photosensitive area of elephant;The target is directed under the second focus condition when being located at the same position using the camera When reference object is shot, obtain in the photosensitive sensor of the mobile terminal for the second sense of the target reference object Light area.Also, the ratio of second photosensitive area and first photosensitive area is calculated, as the camera described Imaging ratio under first focus condition and the second focus condition.So as to improve the convenience for obtaining imaging ratio.
In addition, in embodiments of the present invention, first focus condition can also be set to include the shooting of the camera Focal length is 1 times of focal length;The shooting focal length that second focus condition includes the camera is burnt for the preset multiple in addition to 1 Away from.So as to further improve the convenience and efficiency that obtain imaging ratio.
Further, in embodiments of the present invention, can also be obtained in preset ratio distance relationship library with it is described into As the corresponding distance values of ratio, as the distance between the target reference object and the mobile terminal;Wherein, described Record has preset imaging ratio and distance correspondence in ratio distance relationship library.So as to further improve range measurement Convenience and accuracy.
Embodiment five
A kind of hardware architecture diagram of Fig. 6 mobile terminals of each embodiment to realize the present invention.
The mobile terminal 500 includes but not limited to:It is radio frequency unit 501, network module 502, audio output unit 503, defeated Enter unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, processor The components such as 510 and power supply 511.It will be understood by those skilled in the art that mobile terminal structure shown in Fig. 6 is not formed Restriction to mobile terminal, mobile terminal can include than illustrate more or fewer components either combine certain components or Different component arrangements.In embodiments of the present invention, mobile terminal include but not limited to mobile phone, tablet computer, laptop, Palm PC, car-mounted terminal, wearable device and pedometer etc..
Processor 510, for being directed to same target reference object, the camera for obtaining the mobile terminal respectively is located at together Imaging area of one position under the first focus condition and the second focus condition;According to the imaging area, the camera shooting is obtained Imaging ratio of the head under first focus condition and the second focus condition;According to the imaging ratio, based on it is preset into As ratio and distance correspondence, the distance between the target reference object and the mobile terminal are obtained.
In embodiments of the present invention, by being directed to same target reference object, the camera shooting of the mobile terminal is obtained respectively The co-located imaging area under the first focus condition and the second focus condition;According to the imaging area, obtain Imaging ratio of the camera under first focus condition and the second focus condition;According to the imaging ratio, it is based on Preset imaging ratio and distance correspondence, obtain the distance between the target reference object and the mobile terminal.Energy It is enough to realize that the camera system carried based on mobile terminal carries out large range of range measurement, improve the ranging energy of mobile terminal The complexity and cost of mobile terminal are reduced while power.
Moreover, in embodiments of the present invention, it can work as and be located at the same position in the first focal length using the camera Under the conditions of when shooting the target reference object, obtain in the photosensitive sensor of the mobile terminal for target shooting pair The first photosensitive area of elephant;The target is directed under the second focus condition when being located at the same position using the camera When reference object is shot, obtain in the photosensitive sensor of the mobile terminal for the second sense of the target reference object Light area.Also, the ratio of second photosensitive area and first photosensitive area is calculated, as the camera described Imaging ratio under first focus condition and the second focus condition.So as to improve the convenience for obtaining imaging ratio.
In addition, in embodiments of the present invention, first focus condition can also be set to include the shooting of the camera Focal length is 1 times of focal length;The shooting focal length that second focus condition includes the camera is burnt for the preset multiple in addition to 1 Away from.So as to further improve the convenience and efficiency that obtain imaging ratio.
Further, in embodiments of the present invention, can also be obtained in preset ratio distance relationship library with it is described into As the corresponding distance values of ratio, as the distance between the target reference object and the mobile terminal;Wherein, described Record has preset imaging ratio and distance correspondence in ratio distance relationship library.So as to further improve range measurement Convenience and accuracy.
It should be understood that the embodiment of the present invention in, radio frequency unit 501 can be used for receive and send messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, handled to processor 510;In addition, by uplink Data are sent to base station.In general, radio frequency unit 501 includes but not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 501 can also by radio communication system and network and other set Standby communication.
Mobile terminal has provided wireless broadband internet to the user by network module 502 and has accessed, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
It is that audio output unit 503 can receive radio frequency unit 501 or network module 502 or in memory 509 The audio data of storage is converted into audio signal and exports as sound.Moreover, audio output unit 503 can also be provided and be moved The relevant audio output of specific function that dynamic terminal 500 performs is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 503 includes loud speaker, buzzer and receiver etc..
Input unit 504 is used to receive audio or video signal.Input unit 504 can include graphics processor (Graphics Processing Unit, GPU) 5041 and microphone 5042, graphics processor 5041 is in video acquisition mode Or the static images or the image data of video obtained in image capture mode by image capture apparatus (such as camera) carry out Reason.Treated, and picture frame may be displayed on display unit 506.Through graphics processor 5041, treated that picture frame can be deposited Storage is sent in memory 509 (or other storage mediums) or via radio frequency unit 501 or network module 502.Mike Wind 5042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The form output of mobile communication base station can be sent to via radio frequency unit 501 by being converted in the case of telephone calling model.
Mobile terminal 500 further includes at least one sensor 505, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 5061, and proximity sensor can close when mobile terminal 500 is moved in one's ear Display panel 5061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, size and the direction of gravity are can detect that when static, can be used to identify mobile terminal posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);It passes Sensor 505 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared ray sensor etc. are spent, details are not described herein.
Display unit 506 is used to show by information input by user or be supplied to the information of user.Display unit 506 can wrap Display panel 5061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used Display panel 5061 is configured in forms such as (Organic Light-Emitting Diode, OLED).
User input unit 507 can be used for receiving the number inputted or character information and generation and the use of mobile terminal The key signals input that family is set and function control is related.Specifically, user input unit 507 include touch panel 5071 and Other input equipments 5072.Touch panel 5071, also referred to as touch screen collect user on it or neighbouring touch operation (for example user uses any suitable objects such as finger, stylus or attachment on touch panel 5071 or in touch panel 5071 Neighbouring operation).Touch panel 5071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects the signal that touch operation is brought, and transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 510, receiving area It manages the order that device 510 is sent and is performed.It is furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes touch panel 5071.In addition to touch panel 5071, user input unit 507 can also include other input equipments 5072.Specifically, other input equipments 5072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating lever, details are not described herein.
Further, touch panel 5071 can be covered on display panel 5061, when touch panel 5071 is detected at it On or near touch operation after, send to processor 510 with determine touch event type, be followed by subsequent processing device 510 according to touch The type for touching event provides corresponding visual output on display panel 5061.Although in figure 6, touch panel 5071 and display Panel 5061 is the component independent as two to realize the function that outputs and inputs of mobile terminal, but in some embodiments In, can be integrated by touch panel 5071 and display panel 5061 and realize the function that outputs and inputs of mobile terminal, it is specific this Place does not limit.
Interface unit 508 is the interface that external device (ED) is connect with mobile terminal 500.For example, external device (ED) can include Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, audio input/output (I/O) port, video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 508 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and One or more elements that the input received is transferred in mobile terminal 500 can be used in 500 He of mobile terminal Data are transmitted between external device (ED).
Memory 509 can be used for storage software program and various data.Memory 509 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 509 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 510 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part is stored in storage by running or performing the software program being stored in memory 509 and/or module and call Data in device 509 perform the various functions of mobile terminal and processing data, so as to carry out integral monitoring to mobile terminal.Place Reason device 510 may include one or more processing units;Preferably, processor 510 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 510.
Mobile terminal 500 can also include the power supply 511 (such as battery) powered to all parts, it is preferred that power supply 511 Can be logically contiguous by power-supply management system and processor 510, so as to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, mobile terminal 500 includes some unshowned function modules, details are not described herein.
Preferably, the embodiment of the present invention additionally provides a kind of mobile terminal, including:Processor 510, memory 509, storage On memory 509 and the computer program that can be run on processor 510, when which is performed by processor 510 It realizes each process of above-mentioned distance measuring method embodiment, and identical technique effect can be reached, repeated to avoid, it is no longer superfluous here It states.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, is stored on computer readable storage medium Computer program, realizes each process of above-mentioned distance measuring method embodiment when computer program is executed by processor, and can reach Identical technique effect is repeated to avoid, and which is not described herein again.Wherein, the computer readable storage medium is deposited Ru read-only Reservoir (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), Magnetic disc or CD etc..
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those elements, and And it further includes other elements that are not explicitly listed or further includes intrinsic for this process, method, article or device institute Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this Also there are other identical elements in the process of element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), used including some instructions so that a station terminal (can be mobile phone, computer services Device, air conditioner or network equipment etc.) perform method described in each embodiment of the present invention.
The embodiment of the present invention is described above in conjunction with attached drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned specific embodiment is only schematical rather than restricted, those of ordinary skill in the art Under the enlightenment of the present invention, present inventive concept and scope of the claimed protection are not being departed from, can also made very much Form is belonged within the protection of the present invention.
Those of ordinary skill in the art may realize that the embodiment with reference to disclosed in the embodiment of the present invention describes each Exemplary unit and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These Function is performed actually with hardware or software mode, specific application and design constraint depending on technical solution.Profession Technical staff can realize described function to each specific application using distinct methods, but this realization should not Think beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit can refer to the corresponding process in preceding method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only A kind of division of logic function, can there is an other dividing mode in actual implementation, for example, multiple units or component can combine or Person is desirably integrated into another system or some features can be ignored or does not perform.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, device or unit It connects, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That each unit is individually physically present, can also two or more units integrate in a unit.
If the function is realized in the form of SFU software functional unit and is independent product sale or in use, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially in other words The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention. And aforementioned storage medium includes:USB flash disk, mobile hard disk, ROM, RAM, magnetic disc or CD etc. are various can to store program code Medium.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (11)

1. a kind of distance measuring method, the method is applied to mobile terminal, which is characterized in that including:
For same target reference object, the camera for obtaining the mobile terminal respectively is co-located in the first focal length item Imaging area under part and the second focus condition;
According to the imaging area, imaging ratio of the camera under first focus condition and the second focus condition is obtained Value;
According to the imaging ratio, based on preset imaging ratio and distance correspondence, obtain the target reference object with The distance between described mobile terminal.
2. according to the method described in claim 1, it is characterized in that, described for same target reference object, institute is obtained respectively The step of stating the camera co-located imaging area under the first focus condition and the second focus condition of mobile terminal, Including:
When being located at the same position using the camera and shooting the target reference object under the first focus condition, obtain Take the first photosensitive area that the target reference object is directed in the photosensitive sensor of the mobile terminal;
Target reference object progress is directed under the second focus condition when being located at the same position using the camera During shooting, the second photosensitive area that the target reference object is directed in the photosensitive sensor of the mobile terminal is obtained.
3. according to the method described in claim 2, it is characterized in that, described according to the imaging area, the camera is obtained The step of imaging ratio under first focus condition and the second focus condition, including:
The ratio of second photosensitive area and first photosensitive area is calculated, as the camera in first focal length Imaging ratio under condition and the second focus condition.
4. according to claim 1-3 any one of them methods, which is characterized in that first focus condition includes the camera shooting The shooting focal length of head is 1 times of focal length;The shooting focal length that second focus condition includes the camera is default in addition to 1 Multiple focal length.
5. according to the method described in claim 1, it is characterized in that, described according to the imaging ratio, based on preset imaging Ratio and distance correspondence, the step of obtaining the distance between the target reference object and the mobile terminal, including:
Distance values corresponding with the imaging ratio are obtained in preset ratio distance relationship library, are shot as the target The distance between object and the mobile terminal;Wherein, record has preset imaging ratio in the ratio distance relationship library With distance correspondence.
6. a kind of mobile terminal, which is characterized in that including:
Imaging area acquisition module for being directed to same target reference object, obtains the camera position of the mobile terminal respectively In imaging area of the same position under the first focus condition and the second focus condition;
Be imaged ratio acquisition module, for according to the imaging area, obtain the camera in first focus condition and Imaging ratio under second focus condition;
Apart from acquisition module, for according to the imaging ratio, based on preset imaging ratio and distance correspondence, obtaining institute State the distance between target reference object and the mobile terminal.
7. mobile terminal according to claim 6, which is characterized in that the imaging area acquisition module, including:
First photosensitive area acquisition submodule is located at the same position in the first focus condition for working as using the camera During the lower shooting target reference object, obtain in the photosensitive sensor of the mobile terminal for the target reference object First photosensitive area;
Second photosensitive area acquisition submodule is located at the same position in the second focus condition for working as using the camera When being shot for the target reference object down, obtain in the photosensitive sensor of the mobile terminal and clapped for the target Take the photograph the second photosensitive area of object.
8. mobile terminal according to claim 7, which is characterized in that the imaging ratio acquisition module, including:
Ratio acquisition submodule is imaged, for calculating the ratio of second photosensitive area and first photosensitive area, as Imaging ratio of the camera under first focus condition and the second focus condition.
9. according to claim 6-8 any one of them mobile terminals, which is characterized in that first focus condition includes described The shooting focal length of camera is 1 times of focal length;The shooting focal length that second focus condition includes the camera is in addition to 1 Preset multiple focal length.
10. mobile terminal according to claim 6, which is characterized in that it is described apart from acquisition module, including:
It is corresponding apart from number with the imaging ratio for being obtained in preset ratio distance relationship library apart from acquisition submodule Value, as the distance between the target reference object and the mobile terminal;Wherein, remember in the ratio distance relationship library Record has preset imaging ratio and distance correspondence.
11. a kind of mobile terminal, which is characterized in that including:It memory, processor and is stored on the memory and can be in institute The computer program run on processor is stated, such as claim 1 to 5 is realized when the computer program is performed by the processor Any one of described in distance measuring method the step of.
CN201711230400.1A 2017-11-29 2017-11-29 A kind of distance measuring method, mobile terminal Pending CN108225278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711230400.1A CN108225278A (en) 2017-11-29 2017-11-29 A kind of distance measuring method, mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711230400.1A CN108225278A (en) 2017-11-29 2017-11-29 A kind of distance measuring method, mobile terminal

Publications (1)

Publication Number Publication Date
CN108225278A true CN108225278A (en) 2018-06-29

Family

ID=62652901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711230400.1A Pending CN108225278A (en) 2017-11-29 2017-11-29 A kind of distance measuring method, mobile terminal

Country Status (1)

Country Link
CN (1) CN108225278A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113528A (en) * 2019-04-26 2019-08-09 维沃移动通信有限公司 A kind of parameter acquiring method and terminal device
CN110456829A (en) * 2019-08-07 2019-11-15 深圳市维海德技术股份有限公司 Positioning and tracing method, device and computer readable storage medium
CN114111704A (en) * 2020-08-28 2022-03-01 华为技术有限公司 Method and device for measuring distance, electronic equipment and readable storage medium
CN114689029A (en) * 2020-12-28 2022-07-01 深圳市汇顶科技股份有限公司 Distance measuring method and system for measuring distance

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324430A (en) * 2007-06-12 2008-12-17 北京航空航天大学 Binocular odometry based on similarity principle
CN103445795A (en) * 2012-06-05 2013-12-18 北京国药恒瑞美联信息技术有限公司 Method and system for controlling X-ray doses of mammary machine
CN105091847A (en) * 2014-04-16 2015-11-25 联想(北京)有限公司 Distance measurement method and electronic device thereof
CN106092058A (en) * 2016-08-25 2016-11-09 广东欧珀移动通信有限公司 The processing method of information data, device and terminal
CN106289160A (en) * 2016-07-29 2017-01-04 广东欧珀移动通信有限公司 Distance-finding method and device
CN106371086A (en) * 2016-08-30 2017-02-01 广州华多网络科技有限公司 Distance measurement method and device
WO2017169491A1 (en) * 2016-03-30 2017-10-05 富士フイルム株式会社 Imaging device and focus control method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324430A (en) * 2007-06-12 2008-12-17 北京航空航天大学 Binocular odometry based on similarity principle
CN103445795A (en) * 2012-06-05 2013-12-18 北京国药恒瑞美联信息技术有限公司 Method and system for controlling X-ray doses of mammary machine
CN105091847A (en) * 2014-04-16 2015-11-25 联想(北京)有限公司 Distance measurement method and electronic device thereof
WO2017169491A1 (en) * 2016-03-30 2017-10-05 富士フイルム株式会社 Imaging device and focus control method
CN106289160A (en) * 2016-07-29 2017-01-04 广东欧珀移动通信有限公司 Distance-finding method and device
CN106092058A (en) * 2016-08-25 2016-11-09 广东欧珀移动通信有限公司 The processing method of information data, device and terminal
CN106371086A (en) * 2016-08-30 2017-02-01 广州华多网络科技有限公司 Distance measurement method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘红波 等: "基于双焦成像的测距技术研究", 《激光与红外》 *
吴培良 等: "无标定主点坐标的双焦测距算法及精度研究", 《燕山大学学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113528A (en) * 2019-04-26 2019-08-09 维沃移动通信有限公司 A kind of parameter acquiring method and terminal device
CN110456829A (en) * 2019-08-07 2019-11-15 深圳市维海德技术股份有限公司 Positioning and tracing method, device and computer readable storage medium
CN110456829B (en) * 2019-08-07 2022-12-13 深圳市维海德技术股份有限公司 Positioning tracking method, device and computer readable storage medium
CN114111704A (en) * 2020-08-28 2022-03-01 华为技术有限公司 Method and device for measuring distance, electronic equipment and readable storage medium
CN114689029A (en) * 2020-12-28 2022-07-01 深圳市汇顶科技股份有限公司 Distance measuring method and system for measuring distance

Similar Documents

Publication Publication Date Title
CN108513070A (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN107566748A (en) A kind of image processing method, mobile terminal and computer-readable recording medium
CN108271012A (en) A kind of acquisition methods of depth information, device and mobile terminal
CN108225278A (en) A kind of distance measuring method, mobile terminal
CN108628568A (en) A kind of display methods of information, device and terminal device
CN108459815A (en) A kind of display control method and mobile terminal
CN109862504A (en) A kind of display methods and terminal device
CN108196815A (en) A kind of adjusting method and mobile terminal of sound of conversing
CN110445984A (en) A kind of shooting reminding method and electronic equipment
CN110300267A (en) Photographic method and terminal device
CN109743506A (en) A kind of image capturing method and terminal device
CN110162254A (en) A kind of display methods and terminal device
CN108564613A (en) A kind of depth data acquisition methods and mobile terminal
CN109816679A (en) A kind of image processing method and terminal device
CN109474784A (en) A kind of preview image processing method and terminal device
CN109005355A (en) A kind of image pickup method and mobile terminal
CN108881721A (en) A kind of display methods and terminal
CN108510266A (en) A kind of Digital Object Unique Identifier recognition methods and mobile terminal
CN108494936A (en) A kind of detection method of luminous intensity, mobile terminal
CN111857793B (en) Training method, device, equipment and storage medium of network model
CN108196781A (en) The display methods and mobile terminal at interface
CN108317992A (en) A kind of object distance measurement method and terminal device
CN107770455A (en) The method of adjustment and mobile terminal of a kind of flash lamp
CN109547700A (en) Photographic method and terminal
CN109443261A (en) The acquisition methods and mobile terminal of Folding screen mobile terminal folding angles

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629

RJ01 Rejection of invention patent application after publication