CN109031330B - Method for measuring object distance and terminal equipment - Google Patents

Method for measuring object distance and terminal equipment Download PDF

Info

Publication number
CN109031330B
CN109031330B CN201810766330.XA CN201810766330A CN109031330B CN 109031330 B CN109031330 B CN 109031330B CN 201810766330 A CN201810766330 A CN 201810766330A CN 109031330 B CN109031330 B CN 109031330B
Authority
CN
China
Prior art keywords
time
signal
optical signal
tof sensor
cover plate
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.)
Active
Application number
CN201810766330.XA
Other languages
Chinese (zh)
Other versions
CN109031330A (en
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 CN201810766330.XA priority Critical patent/CN109031330B/en
Publication of CN109031330A publication Critical patent/CN109031330A/en
Application granted granted Critical
Publication of CN109031330B publication Critical patent/CN109031330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/481Constructional features, e.g. arrangements of optical elements

Abstract

The embodiment of the invention discloses a method for measuring object distance and terminal equipment, wherein the method comprises the following steps: receiving a first time sequence optical signal, a second time sequence optical signal, a third time sequence optical signal and a fourth time sequence optical signal; obtaining a first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal; obtaining a second cover plate reflection signal according to the first cover plate reflection signal; and determining the distance between the measured object and the TOF sensor according to a second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor. By the method for measuring the object distance, the influence of the cover plate reflection signal generated by the cover plate on the measured distance can be eliminated, and the precision of the measurement result is improved.

Description

Method for measuring object distance and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of terminal equipment, in particular to a method for measuring object distance and terminal equipment.
Background
At present, when a terminal device measures a distance between an object to be measured and the terminal device, the distance can be measured by a Time-Of-Flight (TOF) sensor arranged in the terminal device. Fig. 1 shows a schematic block diagram of an operation of a TOF sensor when the TOF sensor measures a distance of an object to be measured, where the TOF sensor includes a laser emitting unit 101, an image sensor 102, a control chip 103, and an application processor 104, the laser emitting unit 101 actively emits a pulsed laser signal, a part of the optical signal is reflected by the object to be measured 105, received by a lens 106, filtered by an IR (Infrared Radiation) 107, and then imaged on the image sensor 102. The image sensor 102 is composed of a PD (photo diode) matrix that resolves the object in real time. Each PD calculates the distance of the measured object from the terminal device by determining the transmission delay between the emitted light signal and the reflected light signal. The control chip 103 is responsible for controlling laser emission timing control, controlling the image sensor 102 to sense light timing control and data transmission, processing data and outputting distance information. The application processor configures the control chip and receives and applies the distance information.
As shown in fig. 1, a cover plate 108 is disposed between the TOF sensor and the object to be measured during actual measurement, and due to the fact that the cover plate 108 is disposed between the TOF sensor and the object to be measured, oil stains on the cover plate enable light signals to be scattered and reflected and then to be transmitted to other photosensitive units, which causes deviation of the measured distance and affects measurement accuracy.
Disclosure of Invention
The embodiment of the invention provides a method for measuring the distance of an object, which aims to solve the problem that the distance obtained by measurement has deviation due to oil stains on a cover plate in the prior art.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for measuring a distance of an object, where the method includes: the method is applied to the terminal equipment provided with the TOF sensor, and comprises the following steps: receiving a first time-sequenced optical signal, wherein the first time-sequenced optical signal comprises: an ambient light signal and a first cover plate reflection signal, the cover plate being disposed between the TOF sensor and an object being measured; receiving a second time-sequenced optical signal, wherein the second time-sequenced optical signal comprises: the environment light signal, the first reflected light signal of the measured object and the second cover plate reflected signal; receiving a third time-sequenced optical signal, wherein the third time-sequenced optical signal comprises: the ambient light signal and a second reflected light signal of the measured object; receiving a fourth time-sequenced optical signal, wherein the fourth time-sequenced optical signal comprises: the ambient light signal; obtaining the first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal; obtaining a second cover plate reflection signal according to the first cover plate reflection signal; and determining the distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor.
In a second aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes a TOF sensor, and the terminal device further includes: a first receiving module, configured to receive a first time-series optical signal, where the first time-series optical signal includes: an ambient light signal and a first cover plate reflection signal, the cover plate being disposed between the TOF sensor and an object being measured; a second receiving module, configured to receive a second time-series optical signal, where the second time-series optical signal includes: the environment light signal, the first reflected light signal of the measured object and the second cover plate reflected signal; a third receiving module, configured to receive a third time-series optical signal, where the third time-series optical signal includes: the ambient light signal and a second reflected light signal of the measured object; a fourth receiving module, configured to receive a fourth time-series optical signal, where the fourth time-series optical signal includes: the ambient light signal; the first determining module is used for obtaining the first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal; the second determining module is used for obtaining a second cover plate reflection signal according to the first cover plate reflection signal; and the distance determining module is used for determining the distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program, when executed by the processor, implements any one of the steps of the method for measuring a distance to an object described in the embodiment of the present invention.
In a fourth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores thereon a computer program, and the computer program, when executed by a processor, implements the steps of any one of the methods for measuring a distance to an object as described in the embodiments of the present invention.
In the embodiment of the invention, the first cover plate reflection signal sent by the cover plate is determined according to the first time sequence optical signal and the fourth time sequence optical signal, then the second cover plate reflection signal is further determined according to the first cover plate reflection signal, and finally the distance between the measured object and the TOF sensor is determined according to the second cover plate reflection signal, the received second time sequence optical signal, the received third time sequence optical signal, the received fourth time sequence optical signal and the laser pulse width sent by the TOF sensor. The method for measuring the object distance can eliminate the influence of the cover plate reflection signal generated by the cover plate on the measured distance, and improve the precision of the measurement result.
Drawings
Various advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a block diagram of the operation of a TOF sensor for measuring the distance of an object to be measured in the prior art;
FIG. 2 is a flowchart illustrating steps of a method for measuring a distance between objects according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a method for measuring a distance between objects according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a time-sequenced optical signal received by a terminal device;
fig. 5 is a block diagram of a terminal device according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a terminal device according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 2, a flowchart illustrating steps of a method for measuring a distance between objects according to a first embodiment of the present invention is shown.
The method for measuring the object distance comprises the following steps:
step 201: the method includes receiving a first time-series optical signal, a second time-series optical signal, a third time-series optical signal, and a fourth time-series optical signal.
The method for measuring the object distance is suitable for terminal equipment provided with the TOF sensor, the cover plate is arranged between the TOF sensor and the object to be measured, and when oil stains exist on the cover plate, a cover plate reflection signal is generated, so that the measurement deviation of the object distance is caused, and the accuracy of a measurement result is influenced.
When the object distance is measured, a control chip in the TOF sensor controls a laser emission unit to actively emit pulse laser signals, and the control chip also controls the image sensor to collect first time sequence light signals, second time sequence light signals, third time sequence light signals and fourth time sequence light signals according to a preset time sequence.
Wherein the first time-series optical signal includes: an ambient light signal and a first cover plate reflection signal; the second time-series optical signal includes: the device comprises an ambient light signal, a first reflected light signal of a measured object and a second cover plate reflected signal; the third time-series optical signal includes: an ambient light signal and a second reflected light signal of the measured object; the fourth timing optical signal includes: an ambient light signal. The first cover plate reflection signal and the second cover plate reflection signal are optical signals generated by the cover plate reflecting under different time states.
In the embodiment of the present invention, specific receiving timings of the first timing optical signal, the second timing optical signal, the third timing optical signal, and the fourth timing optical signal are not specifically limited, and it can be ensured that only a specific optical signal is included in the received corresponding timing optical signals.
Step 202: and obtaining a first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal.
The first time sequence optical signal comprises an environment optical signal and a first cover plate reflection signal, and the fourth time sequence optical signal comprises an environment optical signal, so that the fourth time sequence optical signal is eliminated on the basis of the first time sequence optical signal, and the first cover plate reflection signal can be obtained.
Step 203: and obtaining a second cover plate reflection signal according to the first cover plate reflection signal.
In a specific implementation process, the second cover plate reflection signal can be determined according to the laser pulse width sent by the TOF sensor, the time required for the measured object to reflect the light signal to the TOF sensor, and the first cover plate reflection signal.
The laser pulse width transmitted by the TOF sensor can be adjusted by a person skilled in the art before the measurement, and the range of the measurement distance can be adjusted by adjusting the laser pulse width.
Step 204: and determining the distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor.
The second time sequence optical signal comprises a second cover plate reflection signal, and the second cover plate reflection signal is determined and then subjected to signal reduction in the second time sequence optical signal in the embodiment of the invention, so that the influence of the reflection signal generated by the cover plate on the measurement result can be eliminated.
The method for measuring the object distance provided by the embodiment of the invention determines a first cover plate reflection signal sent by a cover plate according to a first time sequence optical signal and a fourth time sequence optical signal, further determines a second cover plate reflection signal according to the first cover plate reflection signal, and finally determines the distance between the measured object and a TOF sensor according to the second cover plate reflection signal, the received second time sequence optical signal, the received third time sequence optical signal, the received fourth time sequence optical signal and the laser pulse width sent by the TOF sensor. The method for measuring the object distance can eliminate the influence of the cover plate reflection signal generated by the cover plate on the measured distance, and improve the precision of the measurement result.
Example two
Referring to fig. 3, a flowchart illustrating steps of a method for measuring a distance between objects according to a second embodiment of the present invention is shown.
The method for measuring the object distance comprises the following steps:
step 301: the method includes receiving a first time-series optical signal, a second time-series optical signal, a third time-series optical signal, and a fourth time-series optical signal.
The method for measuring the object distance is suitable for terminal equipment provided with the TOF sensor, the cover plate is arranged between the TOF sensor and the object to be measured, and cover plate reflection signals are generated when oil stains exist on the cover plate, so that the object distance is measured to be deviated. The cover plate is arranged between the TOF sensor and an object to be measured, and the distance between the cover plate and the TOF sensor is smaller than 10 mm.
In the embodiment of the invention, the method for measuring the distance between the object and the TOF sensor is described by taking the measurement distance range of the TOF sensor as D1-D2, the distance between the measured object and the TOF sensor as D1, and the time length required by the measured object reflected light signal with the distance between the measured object and the TOF sensor as D1 to reach the TOF sensor as t 1-2 × D1/c, wherein c is the propagation speed of light.
When the object distance is measured, a control chip in the TOF sensor controls a laser emission unit to actively emit a pulse laser signal, and the pulse width of the emitted laser is Ts. The control chip also controls the image sensor to collect a first time sequence optical signal, a second time sequence optical signal, a third time sequence optical signal and a fourth time sequence optical signal according to a preset time sequence, and the width of each received time sequence optical signal is a preset optical signal receiving width Tr.
Fig. 4 shows that the laser pulse width emitted by the laser emitting unit is Ts, and the emitted laser pulse signal returns to the image sensor over Δ t. The four set time sequence optical signals are respectively: receive 0, i.e., the second timing optical signal, receive 1, i.e., the third timing optical signal, receive 2, i.e., the fourth timing optical signal, and receive 3, i.e., the first timing optical signal.
The first time-series optical signal includes: an ambient light signal S2 and a first cover reflected signal S3; the second time-series optical signal includes: an ambient light signal S2, a measured object first reflected light signal S0, and a second cover reflected signal n 0; the third time-series optical signal includes: the ambient light signal S2, the second reflected light signal S1 of the measured object, and the third cover reflection signal n1 are located at a small distance from the TOF sensor, so that the reflected light signal of the cover disappears synchronously when the laser pulse is turned off, and therefore n1 is very small and can be ignored, and therefore the third time-series light signal includes: an ambient light signal S2 and a measured object second reflected light signal S1; the fourth timing optical signal includes: ambient light signal S2.
The receiving time sequence of the four time sequence optical signals in the embodiment of the invention is as follows:
the first time sequence optical signal starts to be received within a first preset time length before the first time when the TOF sensor starts to send the laser pulse, and stops being received within a second preset time length after the first time when the TOF sensor starts to send the laser pulse; the first preset time length is the difference value between the preset light signal receiving width and the time length required by the measured object to reflect the light signal to the TOF sensor; the second preset time is the time required by the measured object to reflect the optical signal to the TOF sensor. That is, the first timing light signal starts to be received at the time Tr-t1 before the laser emitting unit is turned on, and the first timing light signal stops being received before t1 after the laser emitting unit is turned off.
The second time sequence optical signal starts to be received from the first time when the TOF sensor starts to send the laser pulse, and stops being received until the second time when the TOF sensor finishes sending the laser pulse; that is, the second timing optical signal starts to be received from the time when the laser emitting unit is turned on, and ends to be received after the laser emitting unit is turned off, and not only can the second timing optical signal start to be received before the laser emitting unit is turned on. In a specific implementation process, if the preset optical signal receiving width Tr is larger than the laser pulse width Ts, setting a second time sequence optical signal to start receiving before the laser emission unit is started; and if the preset optical signal receiving width Tr is equal to the laser pulse width Ts, setting the second time sequence optical signal to start receiving when the laser emitting unit is started.
And the third time sequence optical signal starts to be received from the second moment when the TOF sensor finishes sending the laser pulse until the optical signal with the preset optical signal receiving width is received and then stops being received. The fourth timing light signal has a pulse width Tr at which the laser emitting unit does not operate, and the laser pulse is not emitted and thus only the ambient light signal S2 is received.
Step 302: and determining a first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal.
The first timing optical signal includes the ambient optical signal S2 and the first cover reflection signal S3, and the fourth timing optical signal includes the ambient optical signal S2, so that the fourth timing optical signal is subtracted from the first timing optical signal, and the first cover reflection signal S3 generated by the cover reflection is obtained.
Namely, the first time-sequence optical signal is: s2+ S3, and S3 can be obtained after S2 is cancelled.
Step 303: and obtaining a second cover plate reflection signal according to the cover plate reflection signal.
Specifically, the quotient of the laser pulse width Ts sent by the TOF sensor and the time period t1 required by the reflected light signal of the measured object to reach the TOF sensor can be calculated; the first cover reflection signal S3 is multiplied by the quotient to obtain a second cover reflection signal n 0. Namely n0 ═ S3 × Ts/t 1.
The first cover plate reflection signal is amplified, namely the energy of the first cover plate reflection signal is amplified.
Step 304: and eliminating the second cover plate reflection signal and the fourth time sequence optical signal in the second time sequence optical signal to obtain a first reflection optical signal of the measured object.
The second time-series optical signal is: s2+ S0+ n0, and after subtracting the fourth timing optical signal S2 and n0, the first reflected optical signal S0 of the measured object can be obtained.
The reduction between signals means the reduction of signal energy.
In this step, the second cover plate reflected signal is determined and then cancelled out in the second time sequence optical signal, so that the influence of the cover plate reflected optical signal on the measurement result can be eliminated.
Step 305: and the fourth time sequence optical signal is eliminated in the third time sequence optical signal, and a second reflected optical signal of the measured object is obtained.
The third time-series optical signal is: s2+ S1, the fourth timing optical signal S2 is subtracted, and a second reflected optical signal S1 of the measured object is obtained.
Step 306: and determining the propagation time length of the laser pulse sent by the TOF sensor according to the first reflected light signal of the measured object, the second reflected light signal of the measured object and the laser pulse width sent by the TOF sensor.
Specifically, Δ t may be represented by the formula Ts × S1/(S0+ S1), where Δ t is the propagation time length of the laser pulse transmitted by the TOF sensor, S1 is the second reflected light signal of the measured object, and S0 is the first reflected light signal of the measured object.
Step 307: the distance between the measured object and the TOF sensor is determined in dependence on the propagation time length and the propagation speed of the light.
Specifically, the calculation can be performed by the formula d ═ Δ t × c/2, where d is the distance between the object to be measured and the TOF sensor, and c is the light propagation speed.
The method for measuring the object distance provided by the embodiment of the invention determines a first cover plate reflection signal sent by a cover plate according to a first time sequence optical signal and a fourth time sequence optical signal, further determines a second cover plate reflection signal according to the first cover plate reflection signal, and finally determines the distance between the measured object and a TOF sensor according to the second cover plate reflection signal, the received second time sequence optical signal, the received third time sequence optical signal, the received fourth time sequence optical signal and the laser pulse width sent by the TOF sensor. The method for measuring the object distance can eliminate the influence of the cover plate reflection signal generated by the cover plate on the measured distance, and improve the precision of the measurement result. In addition, the distance calculation accuracy can be further improved by the method for determining the distance between the measured object and the TOF sensor according to the light propagation time and the propagation speed.
EXAMPLE III
Referring to fig. 5, a block diagram of a terminal device according to a third embodiment of the present invention is shown.
The terminal equipment of the embodiment of the invention comprises a TOF sensor, and the terminal equipment further comprises: a first receiving module 401, configured to receive a first time-series optical signal, where the first time-series optical signal includes: an ambient light signal and a first cover plate reflection signal, the cover plate being disposed between the TOF sensor and an object being measured; a second receiving module 402, configured to receive a second time-series optical signal, where the second time-series optical signal includes: the environment light signal, the first reflected light signal of the measured object and the second cover plate reflected signal; a third receiving module 403, configured to receive a third time-series optical signal, where the third time-series optical signal includes: the ambient light signal and a second reflected light signal of the measured object; a fourth receiving module 404, configured to receive a fourth time-series optical signal, where the fourth time-series optical signal includes: the ambient light signal; a first determining module 405, configured to obtain the first cover plate reflection signal according to the first timing optical signal and the fourth timing optical signal; a second determining module 406, configured to obtain the second cover plate reflection signal according to the first cover plate reflection signal; a distance determining module 407, configured to determine a distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time-series optical signal, the third time-series optical signal, the fourth time-series optical signal, and the laser pulse width sent by the TOF sensor. The modules included in the terminal device may be disposed in a control chip of the TOF sensor, or may be disposed in a processor of the terminal device.
Preferably, the distance determining module 407 includes: a first subtraction submodule 4071, configured to subtract the second cover plate reflected signal and the fourth time-series optical signal from the second time-series optical signal, to obtain a first reflected optical signal of the measured object; a second subtraction submodule 4072, configured to subtract the fourth time-series optical signal from the third time-series optical signal, so as to obtain a second reflected optical signal of the measured object; the time length determining submodule 4073 is configured to determine the propagation time length of the laser pulse sent by the TOF sensor according to the first reflected light signal of the measured object, the second reflected light signal of the measured object, and the laser pulse width sent by the TOF sensor; a distance determining sub-module 4074, configured to determine a distance between the measured object and the TOF sensor according to the propagation time length and the propagation speed of the light.
Preferably, the second determining module 406 includes: the first calculating submodule 4061 is used for calculating a quotient of the laser pulse width sent by the TOF sensor and the time length required for the measured object to reflect the light signal to the TOF sensor; the second calculating submodule 4062 is configured to amplify the first cover plate reflection signal by the quotient multiple to obtain the second cover plate reflection signal.
Preferably, the first timing light signal starts to be received from a first preset time before the first time when the TOF sensor starts to transmit the laser pulse, and stops being received after a second preset time after the first time when the TOF sensor starts to transmit the laser pulse; the first preset time length is a difference value between a preset light signal receiving width and a time length required by the measured object to reflect the light signal to the TOF sensor; the second preset time is the time required by the measured object to reflect the light signal to the TOF sensor.
Preferably, the second time-series optical signal starts to be received from a first time when the TOF sensor starts to transmit the laser pulse, and stops to be received to a second time when the TOF sensor finishes transmitting the laser pulse; and the third time sequence optical signal starts to be received from the second moment when the TOF sensor finishes sending the laser pulse, and stops being received until the optical signal with the preset optical signal receiving width is received.
The terminal device provided in the embodiment of the present invention can implement each process implemented by the terminal device in the method embodiments of fig. 2 to fig. 3, and is not described herein again to avoid repetition.
According to the terminal device provided by the embodiment of the invention, the first cover plate reflection signal sent by the cover plate is determined according to the first time sequence optical signal and the fourth time sequence optical signal, then the second cover plate reflection signal is further determined according to the first cover plate reflection signal, and finally the distance between the measured object and the TOF sensor is determined according to the second cover plate reflection signal, the received second time sequence optical signal, the received third time sequence optical signal, the received fourth time sequence optical signal and the laser pulse width sent by the TOF sensor. The method for measuring the object distance can eliminate the influence of the cover plate reflection signal generated by the cover plate on the measured distance, and improve the precision of the measurement result.
Example four
Referring to fig. 6, a block diagram of a terminal device according to a fourth embodiment of the present invention is shown.
Fig. 6 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention, where the terminal device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 6 does not constitute a limitation of the terminal device, and that the terminal device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein, the processor 510 is configured to receive a first time-series optical signal, wherein the first time-series optical signal includes: an ambient light signal and a first cover plate reflection signal, the cover plate being disposed between the TOF sensor and an object being measured; receiving a second time-sequenced optical signal, wherein the second time-sequenced optical signal comprises: the environment light signal, the first reflected light signal of the measured object and the second cover plate reflected signal; receiving a third time-sequenced optical signal, wherein the third time-sequenced optical signal comprises: the ambient light signal and a second reflected light signal of the measured object; receiving a fourth time-sequenced optical signal, wherein the fourth time-sequenced optical signal comprises: the ambient light signal; obtaining the first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal; obtaining a second cover plate reflection signal according to the first cover plate reflection signal; and determining the distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor.
According to the terminal device provided by the embodiment of the invention, the first cover plate reflection signal sent by the cover plate is determined according to the first time sequence optical signal and the fourth time sequence optical signal, then the second cover plate reflection signal is further determined according to the first cover plate reflection signal, and finally the distance between the measured object and the TOF sensor is determined according to the second cover plate reflection signal, the received second time sequence optical signal, the received third time sequence optical signal, the received fourth time sequence optical signal and the laser pulse width sent by the TOF sensor. The method for measuring the object distance can eliminate the influence of the cover plate reflection signal generated by the cover plate on the measured distance, and improve the precision of the measurement result.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system.
The terminal device provides the user with wireless broadband internet access through the network module 502, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the terminal apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 501 in case of the phone call mode.
The terminal device 500 further comprises at least one sensor 505, such as light sensors, motion sensors and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 5061 and/or a backlight when the terminal device 500 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 6, the touch panel 5071 and the display 5061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 5071 and the display 5061 may be integrated to implement the input and output functions of the terminal device, and is not limited herein.
The interface unit 508 is an interface for connecting an external device to the terminal apparatus 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 500 or may be used to transmit data between the terminal apparatus 500 and the external device.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 510 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the terminal device. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The terminal device 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 500 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal device, which includes a processor 510, a memory 509, and a computer program stored in the memory 509 and capable of running on the processor 510, where the computer program is executed by the processor 510 to implement each process of the above method for measuring an object distance, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned method for measuring a distance between objects, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A method for measuring a distance to an object, applied to a terminal device provided with a TOF sensor, the method comprising:
receiving a first time-sequenced optical signal, wherein the first time-sequenced optical signal comprises: an ambient light signal and a first cover plate reflection signal, the cover plate being disposed between the TOF sensor and an object being measured;
receiving a second time-sequenced optical signal, wherein the second time-sequenced optical signal comprises: the environment light signal, the first reflected light signal of the measured object and the second cover plate reflected signal;
receiving a third time-sequenced optical signal, wherein the third time-sequenced optical signal comprises: the ambient light signal and a second reflected light signal of the measured object;
receiving a fourth time-sequenced optical signal, wherein the fourth time-sequenced optical signal comprises: the ambient light signal;
obtaining the first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal;
obtaining a second cover plate reflection signal according to the first cover plate reflection signal;
and determining the distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor.
2. The method of claim 1, wherein said step of determining a distance between said measured object and said TOF sensor based on said second cover plate reflection signal, said second time series light signal, said third time series light signal, said fourth time series light signal, and a laser pulse width transmitted by said TOF sensor comprises:
subtracting the second cover plate reflected signal and the fourth time sequence optical signal from the second time sequence optical signal to obtain a first reflected optical signal of the measured object;
subtracting the fourth time-series optical signal from the third time-series optical signal to obtain a second reflected optical signal of the measured object;
determining the propagation time length of the laser pulse sent by the TOF sensor according to the first reflected light signal of the measured object, the second reflected light signal of the measured object and the laser pulse width sent by the TOF sensor;
and determining the distance between the measured object and the TOF sensor according to the propagation time length and the propagation speed of the light.
3. The method of claim 1, wherein the step of deriving the second cover reflection signal from the first cover reflection signal comprises:
calculating a quotient value of the laser pulse width sent by the TOF sensor and the time length required by the reflected light signal of the measured object to the TOF sensor;
and amplifying the first cover plate reflection signal by the quotient times to obtain a second cover plate reflection signal.
4. The method of claim 1, wherein the first timing light signal starts to be received a first predetermined time period before the first time at which the TOF sensor starts to transmit the laser pulse and stops being received a second predetermined time period after the first time at which the TOF sensor starts to transmit the laser pulse;
the first preset time length is a difference value between a preset light signal receiving width and a time length required by the measured object to reflect the light signal to the TOF sensor; the second preset time is the time required by the measured object to reflect the light signal to the TOF sensor.
5. The method of claim 4, wherein:
the second time-series optical signal starts to be received from a first time point when the TOF sensor starts to send the laser pulse, and stops being received until a second time point when the TOF sensor finishes sending the laser pulse;
and the third time sequence optical signal starts to be received from the second moment when the TOF sensor finishes sending the laser pulse, and stops being received until the optical signal with the preset optical signal receiving width is received.
6. A terminal device, the terminal device comprising a TOF sensor, the terminal device further comprising:
a first receiving module, configured to receive a first time-series optical signal, where the first time-series optical signal includes: an ambient light signal and a first cover plate reflection signal, the cover plate being disposed between the TOF sensor and an object being measured;
a second receiving module, configured to receive a second time-series optical signal, where the second time-series optical signal includes: the environment light signal, the first reflected light signal of the measured object and the second cover plate reflected signal;
a third receiving module, configured to receive a third time-series optical signal, where the third time-series optical signal includes: the ambient light signal and a second reflected light signal of the measured object;
a fourth receiving module, configured to receive a fourth time-series optical signal, where the fourth time-series optical signal includes: the ambient light signal;
a first determining module, configured to determine the first cover plate reflection signal according to the first time sequence optical signal and the fourth time sequence optical signal;
the second determining module is used for obtaining a second cover plate reflection signal according to the first cover plate reflection signal;
and the distance determining module is used for determining the distance between the measured object and the TOF sensor according to the second cover plate reflection signal, the second time sequence light signal, the third time sequence light signal, the fourth time sequence light signal and the laser pulse width sent by the TOF sensor.
7. The terminal device of claim 6, wherein the distance determining module comprises:
the first reduction submodule is used for reducing the second cover plate reflected signal and the fourth time sequence optical signal in the second time sequence optical signal to obtain a first reflected optical signal of the measured object;
the second subtraction submodule is used for subtracting the fourth time-sequence optical signal from the third time-sequence optical signal to obtain a second reflected optical signal of the measured object;
the time length determining submodule is used for determining the propagation time length of the laser pulse sent by the TOF sensor according to the first reflected light signal of the measured object, the second reflected light signal of the measured object and the laser pulse width sent by the TOF sensor;
and the distance determining submodule is used for determining the distance between the measured object and the TOF sensor according to the propagation time length and the propagation speed of the light.
8. The terminal device of claim 6, wherein the second determining module comprises:
the first calculation submodule is used for calculating a quotient of the laser pulse width sent by the TOF sensor and the time length required for the measured object to reflect the light signal to the TOF sensor;
and the second calculation submodule is used for amplifying the first cover plate reflection signal by the quotient value times to obtain a second cover plate reflection signal.
9. The terminal device according to claim 6, wherein the first timing light signal starts to be received for a first preset time period before the first time when the TOF sensor starts to transmit the laser pulse, and stops being received for a second preset time period after the first time when the TOF sensor starts to transmit the laser pulse;
the first preset time length is a difference value between a preset light signal receiving width and a time length required by the measured object to reflect the light signal to the TOF sensor; the second preset time is the time required by the measured object to reflect the light signal to the TOF sensor.
10. The terminal device of claim 9, wherein:
the second time-series optical signal starts to be received from a first time point when the TOF sensor starts to send the laser pulse, and stops being received until a second time point when the TOF sensor finishes sending the laser pulse;
and the third time sequence optical signal starts to be received from the second moment when the TOF sensor finishes sending the laser pulse, and stops being received until the optical signal with the preset optical signal receiving width is received.
11. A terminal device, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, carries out the steps of the method of measuring a distance to an object according to any one of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of measuring a distance to an object according to any one of claims 1 to 5.
CN201810766330.XA 2018-07-12 2018-07-12 Method for measuring object distance and terminal equipment Active CN109031330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810766330.XA CN109031330B (en) 2018-07-12 2018-07-12 Method for measuring object distance and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810766330.XA CN109031330B (en) 2018-07-12 2018-07-12 Method for measuring object distance and terminal equipment

Publications (2)

Publication Number Publication Date
CN109031330A CN109031330A (en) 2018-12-18
CN109031330B true CN109031330B (en) 2020-09-18

Family

ID=64641993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810766330.XA Active CN109031330B (en) 2018-07-12 2018-07-12 Method for measuring object distance and terminal equipment

Country Status (1)

Country Link
CN (1) CN109031330B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109870704A (en) * 2019-01-23 2019-06-11 深圳奥比中光科技有限公司 TOF camera and its measurement method
CN111131768A (en) * 2019-11-29 2020-05-08 中国电力科学研究院有限公司 Device and method for detecting image return time delay of unmanned aerial vehicle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007046562A1 (en) * 2007-09-28 2009-04-02 Siemens Ag Method and device for determining a distance by means of an optoelectronic image sensor
CN105527627A (en) * 2016-01-18 2016-04-27 深圳市金立通信设备有限公司 Laser ranging device, camera device and terminal
CN106093958A (en) * 2016-08-24 2016-11-09 武汉万集信息技术有限公司 Laser distance measurement methods based on double APD and device
CN107850669A (en) * 2015-07-31 2018-03-27 松下知识产权经营株式会社 Ranging camera device and solid camera head

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007046562A1 (en) * 2007-09-28 2009-04-02 Siemens Ag Method and device for determining a distance by means of an optoelectronic image sensor
CN107850669A (en) * 2015-07-31 2018-03-27 松下知识产权经营株式会社 Ranging camera device and solid camera head
CN105527627A (en) * 2016-01-18 2016-04-27 深圳市金立通信设备有限公司 Laser ranging device, camera device and terminal
CN106093958A (en) * 2016-08-24 2016-11-09 武汉万集信息技术有限公司 Laser distance measurement methods based on double APD and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于TOF深度摄像机的深度超分辨率恢复和深度融合研究;刘力维;《中国博士学位论文全文数据库》;20150515(第05期);第17-46页 *

Also Published As

Publication number Publication date
CN109031330A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
AU2020263183B2 (en) Parameter Obtaining Method and Terminal Device
EP3748942B1 (en) Screen on-and-off state control method and mobile terminal
CN110300267B (en) Photographing method and terminal equipment
CN107782250B (en) Depth information measuring method and device and mobile terminal
CN107463897B (en) Fingerprint identification method and mobile terminal
CN109257505B (en) Screen control method and mobile terminal
CN107704182B (en) Code scanning method and mobile terminal
CN111090104B (en) Imaging processing method and electronic device
CN109031330B (en) Method for measuring object distance and terminal equipment
CN109443261B (en) Method for acquiring folding angle of folding screen mobile terminal and mobile terminal
CN109472825B (en) Object searching method and terminal equipment
CN108196663B (en) Face recognition method and mobile terminal
CN110031860B (en) Laser ranging method and device and mobile terminal
CN110099170B (en) Picture deleting method and mobile terminal
CN108955641B (en) Depth camera shooting method, depth camera shooting equipment and mobile terminal
CN111031249B (en) Auxiliary focusing method and electronic equipment
CN110621079A (en) Random access resource selection method and terminal equipment
CN110086916B (en) Photographing method and terminal
CN111464745B (en) Image processing method and electronic equipment
CN108810282B (en) Approach detection method and terminal
CN108956093B (en) Detection method of infrared scattering device and mobile terminal
CN110912284B (en) Wireless charging control method and wireless charging assembly
CN109475034B (en) Laser lamp control method and device and mobile terminal
CN109375232B (en) Distance measuring method and device
CN111107271A (en) Shooting method and electronic equipment

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
GR01 Patent grant
GR01 Patent grant