WO2022099447A1 - 距离测量方法、电子设备以及存储介质 - Google Patents

距离测量方法、电子设备以及存储介质 Download PDF

Info

Publication number
WO2022099447A1
WO2022099447A1 PCT/CN2020/127762 CN2020127762W WO2022099447A1 WO 2022099447 A1 WO2022099447 A1 WO 2022099447A1 CN 2020127762 W CN2020127762 W CN 2020127762W WO 2022099447 A1 WO2022099447 A1 WO 2022099447A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
sampling
phase difference
data
reflected
Prior art date
Application number
PCT/CN2020/127762
Other languages
English (en)
French (fr)
Inventor
吴洋涛
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to PCT/CN2020/127762 priority Critical patent/WO2022099447A1/zh
Publication of WO2022099447A1 publication Critical patent/WO2022099447A1/zh

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
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/02Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S13/00
    • G01S7/04Display arrangements
    • G01S7/06Cathode-ray tube displays or other two dimensional or three-dimensional displays
    • G01S7/10Providing two-dimensional and co-ordinated display of distance and direction

Definitions

  • the present application relates to the technical field of measurement, and in particular, to a distance measurement method, an electronic device, and a storage medium.
  • the depth camera can also measure the distance from the measured object to the camera.
  • depth cameras can be divided into depth cameras based on time of flight (TOF), depth cameras based on binocular recognition, and depth cameras based on structured light.
  • TOF-based depth camera is: by transmitting optical signals to the measured object, and then receiving the reflected light signal from the measured object, the distance between the measured object and the camera is calculated by measuring the round-trip time of the optical signal.
  • the TOF of the indirect measurement method is based on the timing of the transmitted optical signal, collects the received optical signal to obtain the collected data, and performs trigonometric function calculation on the collected data to obtain the phase difference between the two, which can be reflected through the phase difference.
  • the round-trip time of the light signal, and then the distance between the measured object and the camera is obtained according to the round-trip time.
  • the phase difference between the transmitted optical signal and the received optical signal has a periodic overlap problem, that is, the distance of the measured object located at point A is measured.
  • the obtained phase difference and the phase difference obtained by measuring the distance of the measured object at point B differ by 2k ⁇ .
  • the phase difference between the transmitted optical signal and the received optical signal has a periodic overlap problem.
  • the trigonometric function is used to calculate the difference between the received optical signal and the transmitted optical signal.
  • the phase difference method can only obtain the phase difference in the range of [0, 2 ⁇ ], resulting in an inaccurate distance obtained.
  • the present application aims to provide a distance measurement method and electronic device.
  • the period of the phase difference can be accurately determined, thereby accurately obtaining the distance between the measured object and the image sensor.
  • an embodiment of the present application provides a distance measurement method, the method comprising:
  • the frequency of the first reflected signal is greater than the frequency of the second reflected signal; the first reflected signal is the signal after the first transmitted signal is reflected by the measured object, and the second reflected signal is the The second transmit signal is reflected by the measured object.
  • acquiring the second phase difference between the second reflected signal and the second transmitted signal specifically includes:
  • the second phase difference is obtained according to the first sampling result and the second sampling result.
  • obtaining the second phase difference according to the first sampling result and the second sampling result specifically includes:
  • the first mapping relationship represents a corresponding relationship between the amplitude of the first reflected signal and the amplitude of the second reflected signal.
  • sampling the second reflected signal to obtain a second sampling result specifically including:
  • the second sampling result includes the first sampling data and the second sampling data.
  • sampling the second reflected signal to obtain a second sampling result specifically including:
  • the second sampling result includes the first data difference.
  • the first transmission signal and the second transmission signal are pulse signals.
  • the difference between the start time of the first sampled signal and the start time of the second sampled signal is twice the duration of the second transmit signal in a single signal period.
  • the start time of the first sampling signal is the same as the start time of the second transmit signal, or, the start time of the second sample signal is the same as the start time of the second transmit signal.
  • obtaining the second phase difference according to the second sampling result, the amplitude of the first reflected signal, and the first mapping relationship specifically includes:
  • the second phase difference is obtained according to the first set of equations, wherein the first set of equations includes:
  • ⁇ T represents the data difference
  • AL represents the amplitude of the second reflected signal
  • AH represents the amplitude of the first reflected signal
  • f 1 ( ⁇ ) represents the first mapping relationship
  • the image sensor includes a plurality of pixel units, and each pixel unit includes a first switch, a first acquisition unit, a second switch, and a second acquisition unit;
  • first sampling signal and the second sampling signal to sample the second reflected signal respectively, to obtain the first sampling data and the second sampling data, specifically including:
  • the turn-on time of the first switch and the turn-on time of the second switch differ by twice the duration of the second transmit signal in a single signal period.
  • the conduction moment of the first switch is the same as the transmission moment of the second transmission signal, or
  • the conduction time of the second switch is the same as the transmission time of the second transmission signal.
  • performing correction processing on the first phase difference according to the second phase difference to obtain a third phase difference specifically including:
  • the second mapping relationship represents the corresponding relationship between the first phase difference and the second phase difference.
  • acquiring the first phase difference between the first reflected signal returned by the measured object and the first transmitted signal specifically includes:
  • the first phase difference is obtained from the third to sixth sampled data.
  • the difference between the start moment of the fifth sampled signal and the start moment of the sixth sampled signal is the duration of the first transmit signal within a single signal cycle
  • the difference between the start time of the seventh sampled signal and the start time of the eighth sampled signal is the duration of the first transmit signal within a single signal cycle;
  • the difference between the start time of the fifth sampled signal and the start time of the seventh sampled signal is one half of the duration of the first transmit signal in a single signal period.
  • an embodiment of the present application provides an electronic device, including an image sensor and a controller, the image sensor includes a plurality of pixel units, and the control unit is configured to acquire data output by the plurality of pixel units, and execute the first aspect and optional The distance measurement method involved in the program.
  • the present application provides a computer storage medium, characterized in that, the computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the first aspect and the optional solutions are implemented. distance measurement method.
  • the present application provides a distance measurement method, an electronic device and a storage medium for obtaining a first phase difference between a first reflected signal and a first transmitted signal and a second phase difference between a second reflected signal and a second transmitted signal.
  • the frequency of the first reflected signal is greater than the frequency of the second reflected signal
  • the distance measured by the second reflected signal is farther than the distance measured by the first reflected signal
  • the first phase difference is corrected according to the second phase difference, so as to
  • the period in which the first phase difference is located is determined, and the distance from the measured object to the image sensor is obtained according to the third phase difference and the frequency of the first reflected signal, so as to accurately measure the distance.
  • this solution can determine the second phase difference according to the difference between the first sampling data and the second sampling data, which is suitable for the situation where the image sensor can only output the difference between the two sampling data, reduces the amount of output data of the image sensor, and further improves the Data processing efficiency.
  • Fig. 1 is the schematic diagram that phase difference exists periodic aliasing phenomenon in the prior art
  • FIG. 2 is a schematic structural diagram of an image sensor provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a pixel unit provided by another embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a distance measurement method provided by another embodiment of the present application.
  • FIG. 5A is a schematic timing diagram of switches TX0 and TX1 according to another embodiment of the present application.
  • FIG. 5B is a schematic timing diagram of switches TX0 and TX1 according to another embodiment of the present application.
  • 5C is a schematic timing diagram of switches TX0 and TX1 provided by another embodiment of the present application.
  • FIG. 5D is a schematic timing diagram of switches TX0 and TX1 provided by another embodiment of the present application.
  • FIG. 6 is a schematic timing diagram of switches TX0 and TX1 according to another embodiment of the present application.
  • a depth camera is a camera that measures the distance of the object being measured to the camera.
  • depth cameras can be divided into depth cameras based on Time of Flight (TOF), depth cameras based on binocular recognition, and depth cameras based on structured light.
  • TOF-based depth camera is: by transmitting optical signals to the measured object, and then receiving the reflected light signal from the measured object, the distance between the measured object and the camera is calculated by measuring the round-trip time of the optical signal.
  • the ranging method based on four-phase sampling specifically includes: collecting the received optical signal with four different-phase collection signals to obtain four sets of collected data, and then performing trigonometric function calculation according to the four sets of collected data to obtain the difference between the two. phase difference.
  • d represents the measurement range of the depth camera without de-overlapping the in-depth camera signal.
  • the phase difference between the transmitted optical signal and the received optical signal has a periodic overlap problem, that is, when the distance between the measured object and the depth camera is greater than d, the phase difference obtained when the measured object is located at different positions differs by 2k ⁇ .
  • the distance between point A and the depth camera is between [0, d]
  • the phase difference obtained by performing trigonometric function calculation on the collected data is:
  • the distance between point B and the depth camera is [d, 2d]
  • the trigonometric function calculation method can only obtain the phase difference in the range of [0, 2 ⁇ ], so the calculated phase difference between the transmitted optical signal and the received optical signal can be obtained.
  • the actual phase difference between the transmitted optical signal and the received optical signal at point B is That is, when the distance between the measured object and the depth camera is greater than d, the phase difference cannot be accurately obtained by trigonometric function calculation. Therefore, the phase difference between the received optical signal and the transmitted optical signal is obtained by performing trigonometric function calculation on the collected data. The obtained distance may not be accurate enough.
  • the embodiments of the present application aim to provide a distance measurement method, an electronic device, and a storage medium, and aim to accurately determine the period of the phase difference between the obtained transmitted signal and the reflected signal, thereby accurately obtaining the distance between the measured object and the image sensor.
  • the inventive concept of the present application is to transmit signals of two frequencies to the measured object, the low-frequency signal can measure longer distances, and the high-frequency signal can measure more accurately. After the phase difference corresponding to the low frequency signal and the phase difference corresponding to the high frequency signal are obtained by calculating the trigonometric function, the corresponding phase difference of the high frequency signal is corrected and processed using the mapping relationship between the phase difference corresponding to the low frequency signal and the phase difference between the high frequency signal and the low frequency signal. , in order to determine the actual phase difference corresponding to the high-frequency transmitted signal, so as to achieve the purpose of antialiasing the high-frequency signal.
  • the image sensor 10 provided by an embodiment of the present application includes a plurality of pixel units 100 .
  • the plurality of pixel units 100 are arranged in a matrix.
  • the control unit is provided with two output terminals, a control terminal of a pixel unit 100 is connected to a first input terminal of a control unit, and a second input terminal of the control unit is connected to a control terminal of an emission unit.
  • the emission unit is used to send out emission signals to the measured object under the control of the control unit, such as non-visible light signals such as infrared light.
  • the pixel unit 100 is configured to receive the signal returned by the measured object, sample the returned signal according to the control signal output by the control unit, and output the corresponding sampling result.
  • the control unit is further configured to execute the distance measurement method described in the following embodiments, and process the sampling results to obtain the distance of the measured object. For specific solutions, refer to the following embodiments.
  • the pixel unit 100 provided by another embodiment of the present application further includes a photosensitive element D1, a first acquisition unit C0, a second acquisition unit C1, a first switch TX0, a second switch TX1, an output end A and an output end B.
  • the photosensitive element D1 is used to convert the received retroreflection signal reflected by the measured object into an electrical signal. Both the first collection unit C0 and the second collection unit C1 are used to collect electrical signals of the photosensitive element.
  • the working mode of the pixel unit 100 is described in detail below by taking the first collection unit C0 as the first capacitor, the second collection unit C1 as the second capacitor, and the photosensitive unit as a photodiode as an example.
  • the first collection unit C0 and the first switch TX0 work, or the second collection unit C1 and the second switch TX1 work.
  • the working mode is specifically described below by taking the operation of the first acquisition unit C0 and the first switch TX0 as an example.
  • the control signal input by the control unit turns on the first switch TX0, the saturated first capacitor and the electrons released by the photosensitive element D1 are neutralized, and the first capacitor is discharged until the neutralization is completed, and the finally obtained capacitor voltage represents the received photon
  • the capacitor voltage is output as the collected data through the output terminal A.
  • the neutralization time can be controlled, thereby controlling the capacitor voltage output by the output terminal A.
  • the output terminal A can output multi-channel collected data. For example: if there is one pulse signal in one modulation cycle, the first switch TX0 is closed once in one modulation cycle, and the charge of the first capacitor is saturated each time the first switch TX0 is closed, the output terminal A outputs all the way to collect data. If there are two pulse signals in one modulation period, the first switch TX0 is closed twice in one modulation period, and the charge of the first capacitor is saturated when the first switch TX0 is closed each time, the output terminal A can output Two ways to collect data. In the case where the output terminal outputs two channels of collected data, the data difference value can be obtained by subtracting the two channels of collected data to reduce the amount of data output.
  • the first acquisition unit C0, the second acquisition unit C1, the first switch TX0 and the second switch TX1 all work, and the output terminal A and the output terminal B output the acquisition data of the reflected signal.
  • the specific working process It is: when the control signal input by the control unit is received, the first switch TX0 is turned on, and the second switch TX1 is turned off, the charged first capacitor and the electrons released by the photosensitive element D1 are neutralized, and the first capacitor is discharged, Until the neutralization is completed, the finally obtained capacitor voltage represents the number of received photons, and the capacitor voltage is output through the output terminal A.
  • the first switch TX0 When the control signal input from the control unit is received, the first switch TX0 is turned off and the second switch TX1 is turned on, the voltage change process in the second capacitor is the same as that of the first capacitor, and the voltage of the second capacitor is output through the output terminal B, The voltage change process in the second capacitor is not repeated here.
  • the output terminal A can output multi-channel collected data.
  • the control signal output by the control unit for controlling the second switch TX1 is a modulated signal
  • the output terminal B can output multi-channel collected data.
  • the data difference value can be obtained by subtracting the two channels of collected data to reduce the amount of data output.
  • the distance measurement method provided in the embodiment of the present application can be applied to target proximity detection, three-dimensional data collection, and the like.
  • target proximity detection after obtaining the distance between the measured object and the sensor, you can enable other functions of the terminal, such as enabling other sensors of the terminal to perform corresponding detection, such as face detection.
  • the same set of sensors as the distance measurement can also be used to detect the three-dimensional data of the measured object's face.
  • 3D data collection the image data and distance data collected by each pixel unit in the image sensor constitute the 3D data output.
  • the distance measurement method includes the following steps:
  • the first transmission signal and the second transmission signal are signals transmitted by the transmission unit to the measured object, and the frequency of the first transmission signal is greater than the frequency of the second transmission signal.
  • the transmitting unit includes two light emitting diodes, one light emitting diode is used to transmit a high frequency first transmit signal to the measured object, and the other light emitting diode is used to transmit a low frequency second transmit signal to the measured object.
  • the high-frequency first emission signal is reflected by the measured object to form a high-frequency first reflected signal (hereinafter referred to as a high-frequency signal), which is received by the pixel unit.
  • the low-frequency second emission signal is reflected by the measured object to form a low-frequency second reflected signal (hereinafter referred to as a low-frequency signal), and is received by the pixel unit. Accordingly, the frequency of the first reflected signal is greater than the frequency of the second reflected signal.
  • the pixel unit Taking the emission start time of the first emission signal emitted by the emission unit as a timing reference, the pixel unit is controlled to collect the first reflection signal received by itself to obtain collection data. Correspondingly, the pixel unit is controlled to collect the second reflection signal received by the pixel unit to obtain the collection data, taking the second emission signal emitted by the emission unit as the emission start time as the timing reference.
  • the pixel unit collects the first reflection signal received by itself to obtain the collected data, it performs trigonometric function calculation on the collected data of the first reflection signal to obtain the first phase difference.
  • the pixel unit collects the second reflection signal received by itself to obtain the collection data, it performs trigonometric function calculation on the collected data of the first reflection signal and the second reflection signal to obtain the second phase difference.
  • the second mapping relationship represents the corresponding relationship between the first phase difference and the second phase difference.
  • the second mapping relationship is stored locally.
  • the second mapping relationship can be loaded, and then the reference value of the first phase difference is determined according to the second phase difference and the second mapping relationship.
  • the third phase difference is obtained by correcting the first phase difference according to the reference value of the first phase difference.
  • the first phase difference is 0.7 ⁇
  • the second phase difference is 0.5 ⁇
  • the corresponding first phase difference is 0.72 ⁇
  • determine the first phase difference The reference value of is 0.72 ⁇ , and it can be determined that the first phase difference obtained by the trigonometric function is the actual phase difference between the first transmitted signal and the first reflected signal, and the third phase difference is still 0.7 ⁇ .
  • the first phase difference is 1.5 ⁇
  • the second phase difference is 0.5 ⁇
  • the corresponding first phase difference is 3.52 ⁇
  • the first phase difference is determined
  • the reference value of is 3.52 ⁇ , it can be determined that the difference between the first phase difference and the second phase difference obtained by the trigonometric function is 2 ⁇ , and the third phase difference is 0.5 ⁇ +2 ⁇ .
  • the distance from the measured object to the image sensor can be calculated according to the following formula (1).
  • d represents the distance between the measured object and the image sensor
  • c represents the speed of light
  • f represents the frequency of the first reflected signal
  • the fixed mapping relationship between the first phase difference and the second phase difference is used to determine the reference value of the first phase difference according to the second phase difference, and then the period of the first phase difference can be determined according to the reference value. , the distance between the image sensor and the measured object can be accurately obtained according to the corrected phase difference.
  • Another embodiment of the present application provides a distance measurement method, which includes the following steps:
  • the first reflected signal, the first transmitted signal, and the first phase difference have been described in detail in the previous embodiment, and the second reflected signal, the second transmitted signal, and the second phase difference have also been described in detail in the previous embodiment. , and will not be repeated here.
  • Obtaining the second phase difference specifically includes: sampling the first reflected signal to obtain the first sampling result, sampling the second reflected signal to obtain the second sampling result, and obtaining the second phase difference according to the first sampling result and the second sampling result. That is, the first sampling result is the sampling data of the high frequency signal, the second sampling result is the sampling data of the low frequency signal, and the second phase difference needs to be obtained according to the sampling data of the high frequency signal and the sampling data of the low frequency signal.
  • the second sampling result includes first sampling data and second sampling data, and both the first sampling data and the second sampling data are data obtained by sampling the low-frequency signal.
  • the pixel unit receives the control signal from the control unit, generates the first sampling signal and the second sampling signal respectively, and uses the first sampling signal and the second sampling signal to sample the second reflection signal to obtain the first sampling data and the second sampling data.
  • the second sampling result is difference data of the sampling data
  • the sampling data is also obtained by sampling the low-frequency signal.
  • the pixel unit receives the control signal from the control unit, generates the first sampling signal and the second sampling signal respectively, and uses the first sampling signal and the second sampling signal to sample the second reflection signal to obtain the first sampling data and the second sampling data. Then, the first sample data and the second sample data are subtracted to obtain a first data difference value, and the first data difference value is output as a second sampling result.
  • Obtaining the second phase difference according to the first sampling result and the second sampling result specifically includes: obtaining the amplitude of the first reflected signal according to the first sampling result, that is, obtaining the amplitude of the high-frequency signal according to the sampling data of the high-frequency signal.
  • the second phase difference is obtained according to the second sampling result, the amplitude of the first reflected signal, and the first mapping relationship.
  • the first mapping relationship represents a corresponding relationship between the amplitude of the first reflected signal and the amplitude of the second reflected signal.
  • the corresponding relationship between the amplitude of the first transmitted signal and the amplitude of the second transmitted signal is also fixed.
  • the corresponding relationship between the amplitude of the first transmission signal and the amplitude of the second transmission signal may be determined.
  • obtaining the second phase difference according to the second sampling result, the amplitude of the first reflected signal, and the first mapping relationship includes: when the second sampling result includes the first sampling data and the second sampling data, calculating the first phase difference.
  • the difference between the sampled data and the second sampled data obtains the first data difference.
  • the second phase difference is then obtained according to the first data difference and the amplitude of the second reflected signal.
  • the second sampling result is the difference between the first sampling data and the second sampling data
  • the second phase difference can be obtained directly according to the first data difference and the amplitude of the second reflected signal. That is, the distance measurement method provided in this embodiment can also be used in the case where the pixel unit outputs the difference data of the sampled data.
  • Acquiring the first phase difference specifically includes: sampling the first reflection signal by using the fifth sampling signal to the eighth sampling signal, respectively, to obtain the third sampling data to the sixth sampling data. According to the third to sixth sampling data, the first phase difference and the amplitude of the first reflected signal are obtained.
  • the fourth sampling data and the third sampling data are subtracted to obtain the second data difference
  • the sixth sampling data and the fifth sampling data are subtracted to obtain the third data difference.
  • the first phase difference and the amplitude of the first reflected signal are obtained according to the second data difference and the third data difference.
  • the reference value of the first phase difference is determined according to the second phase difference and the second mapping relationship.
  • the third phase difference is obtained by correcting the first phase difference according to the reference value of the first phase difference.
  • the third phase difference and the frequency of the first reflected signal are substituted into formula (1) to calculate the distance from the measured object to the image sensor.
  • the sampling data of the low-frequency signal is related to the amplitude of the low-frequency signal and the phase difference of the low-frequency signal, and the amplitude of the low-frequency signal and the amplitude of the high-frequency signal have a mapping relationship, which can be determined according to
  • the sampling data of the high-frequency signal obtains the amplitude of the high-frequency signal, and then the amplitude of the low-frequency signal is obtained according to the mapping relationship and the amplitude of the high-frequency signal, and then the phase difference of the low-frequency signal can be obtained according to the sampling data of the low-frequency signal and the amplitude of the low-frequency signal.
  • phase difference of the low-frequency signal to correct the phase difference of the high-frequency signal to obtain the actual phase difference of the high-frequency signal to achieve the purpose of anti-aliasing the high-frequency signal, and then obtain the side object according to the actual phase difference of the high-frequency signal. distance, improving the accuracy of the obtained distance.
  • the distance measurement method provided by the embodiment of the present application is described under the mode that two acquisition units and two switches both work and output two-way data, and the method includes the following steps:
  • the two steps are described below by taking the pixel unit shown in FIG. 3 working in a mode in which two acquisition units and two switches both work and output two channels of data, and the second emission signal is a pulse modulation signal as an example.
  • Acquiring the second phase difference specifically includes: the control unit generates a first sampling signal and a second sampling signal respectively, the first sampling signal is used as the turn-on signal of the first switch TX0, and the second sampling signal is used as the turn-on signal of the second switch TX1.
  • the timing of the first sampling signal and the second sampling signal is controlled to achieve the purpose of controlling the on-off timing of the first switch TX0 and the second switch TX1, and then control the capacitor voltage values output by the output terminal A and the output terminal B.
  • the phase difference between the first sampling signal and the second transmission signal is 0°, and the phase difference between the first sampling signal and the second sampling signal is 360°. That is, the difference between the start time of the first sampled signal and the start time of the second sampled signal is twice the signal duration of the second transmit signal in a single signal period, and the second transmit signal is in a single signal period.
  • the signal duration within represents the duration of the pulsed signal within a single signal period, which is determined according to the frequency of the second transmitted signal.
  • the start time of the first sampling signal is the same as the start time of the second transmit signal.
  • the signal duration of the first sampling signal is the same as the duration of the second transmission signal, and the signal duration of the second sampling signal is the same as the duration of the second transmission signal.
  • the on-off timings of the first switch TX0 and the second switch TX1 are shown in Figure 5A and shown in Figure 5B.
  • the first sampling signal controls the conduction timing of the first switch TX0
  • the second sampling signal controls the conduction timing of the second switch TX1.
  • the conduction timing of the first switch TX0 is used to represent the timing of the first sampling signal.
  • the turn-on timing of the switch TX1 represents the timing of the second sampling signal.
  • the modulation period of the first transmission signal is 2T1, and the modulation period is determined according to the frequency of the first transmission signal.
  • the phase difference between the first sampling signal and the second transmission signal is 0°, and the phase difference between the first sampling signal and the second sampling signal is 360°.
  • the difference between the first turn-on time t1 of the first switch and the second turn-on time t2 of the second switch is twice the duration T1 of the second transmit signal in a single signal cycle, the first turn-on time t1 and the first turn-on time t1
  • the start time t0 of the two transmission signals is the same.
  • the first conduction time t1 is controlled by one sampling signal
  • the second conduction time t2 is controlled by two sampling signals. It should be noted that the turn-on time of the switch refers to the start time of the switch on, and the transmission time of the transmission signal also refers to the start time of the transmission signal.
  • Q 1 represents the first sampled data
  • Q2 represents the second sampled data
  • AL represents the amplitude of the second reflected signal
  • B amb represents the ambient light intensity
  • the phase difference between the second sampling signal and the second transmission signal is 0°
  • the phase difference between the first sampling signal and the second sampling signal is 360°. That is, the difference between the start time of the first sampled signal and the start time of the second sampled signal is twice the signal duration of the second transmit signal in a single signal cycle, and the start time of the second sampled signal It is the same as the start time of the second transmission signal.
  • the signal duration of the first sampling signal is the same as the duration of the second transmission signal, and the signal duration of the second sampling signal is the same as the duration of the second transmission signal.
  • the on-off timings of the first switch TX0 and the second switch TX1 are shown in Figure 5C and shown in Figure 5D.
  • the difference between the first turn-on time t1 of the first switch and the second turn-on time t2 of the second switch is twice the duration T1 of the second transmit signal in a single signal period, the second turn-on time t2 and the second turn-on time t2
  • the start time t0 of the transmission signal is the same.
  • the first conduction time t1 is controlled by one sampling signal
  • the second conduction time t2 is controlled by two sampling signals.
  • the second phase difference can be obtained according to the first set of equations, wherein the first set of equations includes:
  • ⁇ T represents the data difference
  • AL represents the amplitude of the second reflected signal
  • AH represents the amplitude of the first reflected signal
  • f 1 ( ⁇ ) represents the first mapping relationship
  • the first transmit signal is also a pulse signal.
  • the control signal for controlling the first switch TX0 is a modulation signal, and each modulation period includes two pulse signals, which are the fifth sampling signal and the seventh sampling signal respectively.
  • the control signal for controlling the second switch TX1 is a modulation signal, and each modulation period includes two pulse signals, which are the sixth sampling signal and the eighth sampling signal respectively.
  • the first sampling result includes third sampling data to sixth sampling data.
  • the fifth sampling signal is used to control the on-off of the first switch, so as to control the first acquisition unit to sample the first reflected signal to obtain third sampling data.
  • the sixth sampling signal is used to control the on-off of the second switch, so as to control the second sampling unit to sample the first reflected signal to obtain fourth sampling data.
  • the seventh sampling signal is used to control the on-off of the first switch, so as to control the first sampling unit to sample the first reflected signal to obtain fifth sampling data.
  • the eighth sampling signal is used to control the on-off of the second switch, so as to control the second sampling unit to sample the first reflected signal to obtain sixth sampling data.
  • the modulation period of the first transmission signal is 2 ⁇ T2, and the modulation period is determined according to the frequency of the first transmission signal.
  • the phase difference between the fifth sampling signal and the sixth sampling signal be 180°
  • the phase difference between the seventh sampling signal and the eighth sampling signal be 180°
  • the phase between the fifth sampling signal and the seventh sampling signal The difference is 90°.
  • the difference between the start time of the fifth sampled signal and the start time of the sixth sampled signal is the duration T2 of the first transmit signal in a single signal cycle
  • the start time of the seventh sampled signal and the The difference between the start times of the sampling signals is the duration T2 of the first transmission signal in a single signal cycle
  • the difference between the start times of the fifth sampling signal and the start times of the seventh sampling signal is the first transmission Half of the duration T2 of the signal within a single signal period.
  • the turn-on time of the switch refers to the start time of the switch on, and the transmission time of the transmission signal also refers to the start time of the transmission signal.
  • the phase difference between the fifth sampling signal and the sixth sampling signal is 180°
  • the phase difference between the seventh sampling signal and the eighth sampling signal is 180°
  • the phase between the fifth sampling signal and the seventh sampling signal The difference is 90°
  • the on-off timings of the first switch TX0 and the second switch TX1 are shown in FIG. 6 .
  • the difference between the fifth turn-on time t5 of the first switch and the sixth turn-on time t6 of the second switch is the duration T2 within a single signal period of the first transmit signal.
  • the difference between the seventh turn-on time t7 of the first switch and the eighth turn-on time t8 of the second switch is the duration T2 within a single signal period of the first transmit signal.
  • the difference between the fifth turn-on time t5 of the first switch and the seventh turn-on time t7 of the second switch is one half of the duration T2 in a single signal period of the first transmit signal.
  • the fifth conduction time t5 of the first switch is controlled by the fifth sampling signal
  • the sixth conduction time t6 of the second switch is controlled by the six sampling signal
  • the seventh conduction time t7 of the first switch is seven sampling The signal is controlled
  • the eighth turn-on time t8 of the second switch is controlled by the eighth sampling signal.
  • the phase difference between the fifth sampling signal to the eighth sampling signal and the first transmitting signal is 0°, 180°, 90°, and 270°, respectively, as an example, to illustrate obtaining the first phase difference and the amplitude of the first reflected signal. the process of.
  • the first data difference is obtained according to the following formula (8):
  • Q 3 represents the third sample data
  • Q 4 represents the fourth sample data
  • I represents the first data difference
  • the second data difference is obtained according to the following formula (9):
  • Q 5 represents the fifth sample data
  • Q 6 represents the sixth sample data
  • Q represents the second data difference
  • the first phase difference is obtained according to the following formula (10):
  • the amplitude of the first reflected signal is obtained according to the following formula (11):
  • AH represents the amplitude of the first reflected signal.
  • the output data difference method is adopted to output the data difference value of four frames.
  • the timing of TX0 corresponding to the first frame data difference is 0°, and the timing of TX1 is 180°; the timing of TX0 corresponding to the second frame data difference is 90°, and the timing of TX1 is 270°; the third frame data difference
  • the corresponding timing of TX0 is 180°, and the timing of TX1 is 0°; the timing of TX0 of the fourth frame data difference is 270°, and the timing of TX1 is 90°.
  • the amplitude value and the first phase difference of the first reflected signal are calculated according to the data difference value of the four frames.
  • S402. Perform correction processing on the first phase difference according to the second phase difference and the second mapping relationship to obtain a third phase difference.
  • the reference value of the first phase difference is obtained according to the following formula (12).
  • f 2 ( ⁇ ) represents the second mapping relationship
  • the third phase difference is obtained by correcting the first phase difference according to the reference value of the first phase difference.
  • the correction processing method has been described in detail in S202, and will not be repeated here.
  • the distance from the measured object to the image sensor is calculated according to formula (1).
  • the second transmission signal is a pulse signal
  • the phase difference between the first sampling signal and the second sampling signal is 360°
  • the data difference between the first sampling data and the second sampling data is The value satisfies formula (6)
  • the amplitude of the second reflected signal is determined according to the amplitude of the first reflected signal
  • the data difference obtained by sampling and the amplitude of the obtained second reflected signal are substituted into formula (6), that is, The second phase difference is solved, and then the first phase difference is corrected and processed according to the second phase difference, so as to improve the accuracy of the obtained distance.
  • the distance measurement method provided by the embodiment of the present application will be described below in conjunction with the pixel unit shown in FIG. 3 working in one acquisition unit and one switch operation mode.
  • the method includes the following steps:
  • the control signal for controlling the first switch TX0 is a modulation signal
  • each modulation period includes two pulse signals, which are the third sampling signal and the fourth sampling signal respectively.
  • the third sampling signal is used to control the on-off of the first switch, so as to control the first sampling unit to sample the second reflected signal to obtain the first sampling data.
  • the fourth sampling signal is used to control the on-off of the first switch, so as to control the first acquisition unit to sample the second reflected signal to obtain the second sampling data.
  • the control timing of the third sampling signal may refer to the timing of TX0
  • the control timing of the fourth sampling signal may refer to TX1
  • the third on-time is controlled by the third sampling signal
  • the fourth The turn-on time is controlled by four sampling signals.
  • the third turn-on time (that is, t1) is the same as that of the second transmit signal (that is, t0).
  • the third turn-on time of the first switch (that is, t1) is the same as
  • the fourth turn-on time of the first switch ie, t2 ) differs by twice the duration of the second transmit signal within a single signal period. It should be noted that the turn-on time of the switch refers to the start time of the switch on, and the transmission time of the transmission signal also refers to the start time of the transmission signal.
  • the collected first and second data can also continue to refer to formulas (2) to (5).
  • the control timing of the third sampling signal may refer to the timing of TX0
  • the control timing of the fourth sampling signal may refer to TX1
  • the third conduction time is controlled by the three sampling signals
  • the fourth conduction timing is controlled by the three sampling signals.
  • the on-time is controlled by a four-sampled signal.
  • the fourth turn-on time (ie t2 ) is the same as the transmission time (ie t0 ) of the second transmission signal.
  • the time duration of the second transmit signal in a single signal period differs between the third turn-on time of the first switch (ie, t1 ) and the fourth turn-on time of the first switch.
  • control sequence of the third sampling signal and the fourth sampling signal can continue to refer to FIG. 5C and FIG. 5D , and the first and second collected data obtained by the collection can also continue to refer to formulas (2) to (5).
  • the difference between the first sampled data and the second sampled data is calculated to obtain the first data difference, and the first data difference is output as the second sampling result.
  • the first sampling data and the second sampling data may also be directly output as the second sampling result.
  • the acquisition unit when one acquisition unit and one switch unit in the pixel unit work, the acquisition unit can be controlled to output two channels of acquisition data of the low-frequency reflection signal, and then the low-frequency reflection signal is used to solve the high-frequency reflection signal. Aliasing to improve the accuracy of the distance obtained.
  • Another embodiment of the present application further provides an electronic device, including an image sensor and a controller, the image sensor includes a plurality of pixel units, the transmitting unit transmits a signal to the object to be measured, and the pixel unit 100 is configured to receive the reflected signal returned by the object to be measured And output the data, the controller is used to obtain the output data of the pixel unit 100, and execute the distance measurement method described in the above-mentioned embodiments.
  • the image sensor includes a plurality of pixel units
  • the transmitting unit transmits a signal to the object to be measured
  • the pixel unit 100 is configured to receive the reflected signal returned by the object to be measured And output the data
  • the controller is used to obtain the output data of the pixel unit 100, and execute the distance measurement method described in the above-mentioned embodiments.
  • the controller may include a plurality of control units, and one control unit corresponds to one pixel unit, each control unit receives the output data of the corresponding pixel unit, and executes the distance measurement method described in the above embodiments.
  • the controller may also include only one control unit, which is configured to receive data collected by all pixel units in the image sensor, and implement the distance measurement method described in the above embodiment by using time-sharing processing, which is not limited here.
  • Another embodiment of the present application further provides a computer storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the distance measurement method described in the foregoing embodiments is executed.
  • the processor executes the computer-executable instructions
  • the distance measurement method described in the foregoing embodiments is executed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

一种距离测量方法、电子设备以及存储介质,所述方法包括:获取第一相位差和第二相位差(201),根据第二相位差对第一相位差进行校正处理获得第三相位差(202),根据第三相位差和第一反射信号的频率获得被测对象到图像传感器的距离(203)。所述方法根据第二相位差确定第一相位差的参考值,进而可以根据参考值确定第一相位差所在周期,在根据校正处理后的相位差可以准确获得图像传感器到被测对象之间的距离。

Description

距离测量方法、电子设备以及存储介质 技术领域
本申请涉及测量技术领域,尤其涉及一种距离测量方法、电子设备以及存储介质。
背景技术
深度相机除了可以获得被测对象的二维图像之外,还可以测量被测对象到相机的距离。
按照测量距离的工作原理,可以将深度相机分成基于飞行时间(Time of Flight,TOF)的深度相机、基于双目识别的深度相机以及基于结构光的深度相机。其中,基于TOF的深度相机的工作原理为:通过发射光信号到被测对象上,然后接收从被测对象反射光信号,通过测量光信号的往返时间来计算被测对象离相机的距离。通常情况下,间接测量法的TOF是以发射光信号的时序为基准,采集接收光信号获得采集数据,并对采集数据进行三角函数计算得到两者之间的相位差,而通过相位差可以反射光信号的往返时间,再根据往返时间获得被测对象距离相机的距离。如图1所示,当被测对象超出深度相机的测量范围d时,发射光信号和接收光信号之间相位差存在周期性的重叠问题,也就是测量位于A点的被测对象的距离所获得的相位差和测量位于B点的被测对象的距离所获得相位差相差2kπ。
然而,由于当被测对象超出深度相机的测量范围d时,发射光信号和接收光信号之间相位差存在周期性的重叠问题,现有技术中通过三角函数计算接收光信号和发射光信号的相位差的方式,仅能得到范围在[0,2π]相位差,导致所获得距离不够准确。
发明内容
本申请旨在提供一种距离测量方法以及电子设备,当被测对象超出图像传感器的测量范围时,可以准确确定相位差所在周期,进而准确获得被测对象到图像传感器之间距离。
第一方面,本申请实施例提供一种距离测量方法,方法包括:
获取第一反射信号和第一发射信号之间的第一相位差,以及第二反射信号和第二发射信号之间的第二相位差;
根据所述第二相位差对所述第一相位差进行校正处理,获得第三相位差;
根据所述第三相位差和所述第一反射信号的频率获得所述被测对象到所述图像传感器的距离;
其中,所述第一反射信号的频率大于所述第二反射信号的频率;所述第一反射信号为所述第一发射信号经过被测对象反射后的信号,所述第二反射信号为所述第二发射信号经过所述被测对象反射后的信号。
可选地,获取第二反射信号和第二发射信号之间的第二相位差,具体包括:
对所述第一反射信号进行采样获得第一采样结果,
对所述第二反射信号进行采样获得第二采样结果;
根据所述第一采样结果和所述第二采样结果,获得所述第二相位差。
可选地,根据所述第一采样结果和所述第二采样结果,获得所述第二相位差,具体包括:
根据所述第一采样结果获得所述第一反射信号的幅值;
根据所述第二采样结果、所述第一反射信号的幅值以及第一映射关系,获得所述第二相位差;
其中,所述第一映射关系表示所述第一反射信号的幅值和所述第二反射信号的幅值的对应关系。
可选地,对所述第二反射信号进行采样获得第二采样结果,具体包括:
分别使用第一采样信号和第二采样信号对所述第二反射信号进行采样,获得第一采样数据和第二采样数据;
其中,所述第二采样结果包括所述第一采样数据和所述第二采样数据。
可选地,对所述第二反射信号进行采样获得第二采样结果,具体包括:
分别使用第一采样信号和第二采样信号对所述第二反射信号进行采样,获得第一采样数据和第二采样数据;
获得所述第一采样数据和所述第二采样数据的第一数据差值;
其中,所述第二采样结果包括所述第一数据差值。
可选地,第一发射信号和第二发射信号为脉冲信号。
可选地,第一采样信号的起始时刻和第二采样信号的起始时刻之间差值为第二发射信号在单个信号周期内的持续时间的两倍。
可选地,第一采样信号的起始时刻与第二发射信号的起始时刻相同,或者,第二采样信号的起始时刻与第二发射信号的起始时刻相同。
可选地,根据第二采样结果、第一反射信号的幅值以及第一映射关系获得第二相位差,具体包括:
根据第一方程组获得第二相位差,其中,第一方程组包括:
Figure PCTCN2020127762-appb-000001
其中,ΔT表示数据差值,A L表述第二反射信号的幅值,
Figure PCTCN2020127762-appb-000002
表示第二相位差,A H表示第一反射信号的幅值,f 1(·)表示第一映射关系。
可选地,图像传感器包括多个像素单元,每个像素单元包括第一开关、第一采集单元、第二开关以及第二采集单元;
分别使用第一采样信号和第二采样信号对第二反射信号进行采样,获得第一采样数据和第二采样数据,具体包括:
生成第一控制信号,以控制第一开关的通断,以使第一采集单元对第二反射信号进行采样获得第一采样数据;
生成第二控制信号,以控制第二开关的通断,以使第二采集单元对第二反射信号进行采样获得第二采样数据;
其中,第一开关的导通时刻与第二开关的导通时刻相差第二发射信号在单个信号周期内的持续时间的两倍。
可选地,第一开关的导通时刻与第二发射信号的发射时刻相同,或者
第二开关的导通时刻与第二发射信号的发射时刻相同。
可选地,根据第二相位差对第一相位差进行校正处理,获得第三相位差,具体包括:
根据第二相位差和第二映射关系,确定第一相位差的参考值;
根据第一相位差的参考值对第一相位差进行校正处理,获得第三相位差;
其中,第二映射关系表示第一相位差和第二相位差的对应关系。
可选地,获取由被测对象返回的第一反射信号和第一发射信号之间的第一相位差,具体包括:
分别使用第五采样信号至第八采样信号对第一反射信号进行采样,获得 第三采样数据至第六采样数据;
根据第三采样数据至第六采样数据,获得第一相位差。
可选地,第五采样信号的起始时刻和第六采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间;
第七采样信号的起始时刻和第八采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间;
第五采样信号的起始时刻和第七采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间的二分之一。
第二方面,本申请实施例提供一种电子设备,包括图像传感器和控制器,图像传感器包括多个像素单元,控制单元用于获取多个像素单元输出的数据,并执行第一方面及可选方案所涉及的距离测量方法。
第三方面,本申请提一种计算机存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行计算机执行指令时,实现第一方面及可选方案所涉及的距离测量方法。
本申请提供一种距离测量方法、电子设备以及存储介质,获取第一反射信号和第一发射信号之间的第一相位差和第二反射信号和第二发射信号之间的第二相位差。又第一反射信号的频率大于第二反射信号的频率,第二反射信号所测量的距离比第一反射信号所测量的距离更远,根据第二相位差对第一相位差进行校正处理,以确定第一相位差所在周期,根据第三相位差和第一反射信号的频率获得被测对象到图像传感器的距离,以实现准确测量距离。
另外,相较于现有的基于四相位采样的测距方法,根据计算公式
Figure PCTCN2020127762-appb-000003
可知,当第一反射信号和第一发射信号的真实相位差在[0,2π]时,也就是并未发生混叠情况下,以及本方案中第一发射信号的频率和现有的基于四相位采样的测距方法所使用发射信号的频率相同情况下,采现有技术本方案的测量距离和现有技术中四相位采样的测距方法的测量距离相同。
另外,本方案可以根据第一采样数据和第二采样数据的差值确定第二相位差,适用于图像传感器仅能输出两个采样数据的差值的情况,减少图像传感器输出数据量,进而提高数据处理效率。
附图说明
图1为现有技术中相位差存在周期性混叠现象的示意图;
图2为本申请一实施例提供的图像传感器的结构示意图;
图3为本申请另一实施例提供的像素单元的结构示意图;
图4为本申请另一实施例提供的距离测量方法的流程示意图;
图5A为本申请另一实施例提供的开关TX0和TX1的时序示意图;
图5B为本申请另一实施例提供的开关TX0和TX1的时序示意图;
图5C为本申请另一实施例提供的开关TX0和TX1的时序示意图;
图5D为本申请另一实施例提供的开关TX0和TX1的时序示意图;
图6为本申请另一实施例提供的开关TX0和TX1的时序示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
深度相机是一种可以测量被测对象到相机的距离的相机。按照测量距离的工作原理,可以将深度相机分成基于飞行时间(Time of Flight,简称:TOF)的深度相机、基于双目识别的深度相机以及基于结构光的深度相机。其中,基于TOF的深度相机的工作原理为:通过发射光信号到被测对象上,然后接收从被测对象反射光信号,通过测量光信号的往返时间来计算被测对象离相机的距离。通常情况下,以发射光信号的时序为基准,采集接收光信号得到采集数据,再对采集数据进行三角函数计算获得两者之间相位差,仅能获得范围在[0,2π]的相位差,相位差能够反映光信号的往返时间,再根据相位差获得被测对象距离相机的距离。更具体地,基于四相位采样的测距方法具体包括:以四个不同相位的采集信号对接收光信号进行采集获得四组采集数据,再根据四组采集数据进行三角函数计算获得两者之间相位差。
如图1所示,d表示没有对深度相机内信号进行去重叠处理时深度相机的测量范围。发射光信号和接收光信号之间相位差存在周期性的重叠问题,也 就是当被测对象和深度相机之间距离大于d时,存在被测对象位于不同位置时所获得相位差相差2kπ的情况,例如:A点距离深度相机之间距离在[0,d]之间,通过对采集数据进行三角函数计算方式所获得的相位差为
Figure PCTCN2020127762-appb-000004
B点距离深度相机之间距离在[d,2d],又三角函数计算的方式仅能获得范围在[0,2π]的相位差,所以计算获得发射光信号和接收光信号所获得的相位差也为
Figure PCTCN2020127762-appb-000005
但位于B点时发射光信号和接收光信号之间的实际相位差为
Figure PCTCN2020127762-appb-000006
也就是当被测对象和深度相机之间距离大于d时,通过三角函数计算方式无法准确获得相位差,因此,通过对采集数据进行三角函数计算获得接收光信号和发送光信号的相位差的方式所获得距离可能不够准确。
本申请实施例旨在提供距离测量方法、电子设备以及存储介质,旨在准确确定所获得发射信号和反射信号之间相位差所在周期,进而准确获得被测对象和图像传感器之间距离。本申请的发明构思是:向被测对象发射两种频率的信号,低频信号可以测量更远距离,高频信号可以测量更精确。在采用三角函数方式计算获得低频信号对应的相位差和高频信号对应的相位差后,使用低频信号对应相位差和高频信号和低频信号相位差之间映射关系校正处理高频信号对应相位差,以确定高频发射信号对应的实际相位差,进而实现对高频信号解混叠的目的。
如图2所示,本申请一实施例提供的图像传感器10包括多个像素单元100。其中,多个像素单元100呈矩阵式排布。其中,控制单元设有两个输出端,一个像素单元100的控制端与一个控制单元的第一输入端连接,该控制单元的第二输入端与一个发射单元的控制端。发射单元用于在控制单元控制下向被测对象发出发射信号,例如:红外光等非可见光信号。像素单元100用于接收经被测对象返回的信号,并根据控制单元输出控制信号对返回的信号进行采样,输出相应的采样结果。控制单元还用于执行如下实施例描述的距离测量方法,对采样结果进行处理获得被测对象的距离,具体方案可以参考下面实施例。
如图3所示,本申请另一实施例提供的像素单元100又包括感光元件D1、第一采集单元C0、第二采集单元C1、第一开关TX0、第二开关TX1、输出端A和输出端B。感光元件D1用于将接收到的经被测对象反射后的返射信号转换为电信号。第一采集单元C0和第二采集单元C1均用于采集感光元件的电信号。
下面以第一采集单元C0为第一电容器,第二采集单元C1为第二电容器,感光单元为光电二极管为例,详细说明像素单元100工作模式。
在其中一种模式下,第一采集单元C0和第一开关TX0工作,或者,第二采集单元C1和第二开关TX1工作。下面以第一采集单元C0和第一开关TX0工作为例具体描述该工作模式。控制单元输入的控制信号使第一开关TX0导通,已饱和的第一电容器和感光元件D1释放出来的电子中和,第一电容器放电,直到中和完毕,最后得到的电容电压代表着接收光子数量,通过输出端A将电容电压作为采集数据输出。
通过控制第一开关TX0的导通时刻,可以控制中和时间,进而控制输出端A输出的电容电压。当控制单元输出的控制信号为调制信号时,可以实现由输出端A输出多路采集数据。例如:若在一个调制周期内有1个脉冲信号,第一开关TX0在一个调制周期内闭合1次,在第一开关TX0每次闭合时使第一电容器的电荷量饱和,则可以由输出端A输出一路采集数据。若在一个调制周期内有2个脉冲信号,第一开关TX0在一个调制周期内闭合2次,在第一开关TX0每次闭合时使第一电容器的电荷量饱和,则可以由输出端A输出两路采集数据。在输出端输出两路采集数据情况下,可以将两路采集数据相减获得数据差值,以减少数据输出量。
在另一种工作模式下,第一采集单元C0、第二采集单元C1、第一开关TX0以及第二开关TX1均工作,由输出端A和输出端B输出反射信号的采集数据,具体工作过程为:当接收到控制单元输入的控制信号,使第一开关TX0导通,第二开关TX1断开时,已经充电的第一电容器和感光元件D1释放出来的电子中和,第一电容器放电,直到中和完毕,最后得到的电容电压代表着接收光子数量,通过输出端A将电容电压输出。当接收到控制单元输入的控制信号,使第一开关TX0断开,第二开关TX1导通时,第二电容器中电压变化过程同第一电容器相同,第二电容器的电压通过输出端B输出,此处不再赘述第二电容器中电压变化过程。
当控制单元输出用于控制第一开关TX0控制信号为调制信号时,可以实现由输出端A输出多路采集数据。当控制单元输出用于控制第二开关TX1控制信号为调制信号时,可以实现由输出端B输出多路采集数据。在输出端A或者输出端B输出两路采集数据情况下,可以将两路采集数据相减获得数据差值,以减少数据输出量。
本申请实施例提供的距离测量方法可以应用于目标接近检测、三维数据采集等方面。针对目标接近检测,在获得被测对象到传感器之间距离后,可以开启终端的其他功能,比如启动终端其他传感器进行相应的检测,例如:人脸检测。当然,在获得被测对象与传感器之间的距离之后,也可以利用与距离测量相同的一套传感器进行被测对象的人脸三维数据检测。当应用于三维数据采集时,图像传感器中每个像素单元采集的图像数据和距离数据构成三维数据输出。
如图4所示,本申请另一实施例提供一种距离测量方法,该距离测量方法包括如下步骤:
S201、获取第一反射信号和第一发射信号之间的第一相位差,以及第二反射信号和第二发射信号之间的第二相位差。
其中,第一发射信号和第二发射信号是由发射单元向被测对象发射的信号,第一发射信号的频率大于第二发射信号的频率。优选地,发射单元包括两个发光二极管,一个发光二极光用于向被测对象发射高频的第一发射信号,另一个发光二极管用于向被测对象发射低频的第二发射信号。
其中,高频的第一发射信号经由被测对象反射后形成高频的第一反射信号(以下简称:高频信号),并由像素单元接收。低频的第二发射信号经由被测对象反射后形成低频的第二反射信号(以下简称:低频信号),并由像素单元接收。相应地,第一反射信号的频率大于第二反射信号的频率。
以发射单元发射的第一发射信号的发射起始时刻为时序基准,控制像素单元采集自身接收到的第一反射信号获得采集数据。相应地,以发射单元发射的第二发射信号为发射起始时刻为时序基准,控制像素单元采集自身接收到的第二反射信号获得采集数据。
其中,当像素单元采集自身接收到的第一反射信号获得采集数据后,对第一反射信号的采集数据进行三角函数计算获得第一相位差。相应地,当像素单元采集自身接收到的第二反射信号获得采集数据后,对第一反射信号和第二反射信号的采集数据进行三角函数计算获得第二相位差。
S202、根据第二相位差对第一相位差进行校正处理,获得第三相位差。
其中,第二映射关系表示第一相位差和第二相位差的对应关系。当发射单元中元件参数固定,以及元件之间相对位置固定时,所获得第一相位差和第二相位差的对应关系也是固定的。在使用图像传感器进行测量距离前,可 以标定第一相位差和第二相位差的对应关系。
在图像传感器初始化时,将第二映射关系存储至本地,在使用图像传感器进行距离测量时,可以加载第二映射关系,再根据第二相位差和第二映射关系确定第一相位差的参考值。根据第一相位差的参考值对第一相位差进行校正处理获得第三相位差。
例如:获得第一相位差为0.7π,第二相位差为0.5π,在第二映射关系中,第二相位差为0.5π时对应的第一相位差为0.72π,则确定第一相位差的参考值为0.72π,可以确定通过三角函数方式所获得第一相位差为第一发射信号和第一反射信号的实际相位差,则第三相位差仍然为0.7π。
又例如:第一相位差为1.5π,第二相位差为0.5π,在第二映射关系中,第二相位差为0.5π时对应的第一相位差为3.52π,则确定第一相位差的参考值为3.52π,可以确定通过三角函数方式所获得第一相位差和第二相位差之间相差2π,则第三相位差为0.5π+2π。
S203、根据第三相位差和第一反射信号的频率获得被测对象到图像传感器的距离。
其中,可以根据如下公式(1)计算被测对象到图像传感器的距离。
Figure PCTCN2020127762-appb-000007
其中,d表示被测对象到图像传感器之间距离,c表示光速,f表示第一反射信号的频率,
Figure PCTCN2020127762-appb-000008
表示第三相位差。
在本申请实施例中,利用第一相位差和第二相位差之间的固定映射关系,根据第二相位差确定第一相位差的参考值,进而可以根据参考值确定第一相位差所在周期,在根据校正处理后的相位差可以准确获得图像传感器到被测对象之间的距离。另外,相较于现有的基于四相位采样的测距方法,根据计算公式(1)可知,当第一反射信号和第一发射信号的真实相位差在[0,2π]时,也就是并未发生混叠情况下,以及本方案中第一发射信号的频率和现有的基于四相位采样的测距方法所使用发射信号的频率相同情况下,采现有技术本方案的测量距离和现有技术中四相位采样的测距方法的测量距离相同。
本申请另一实施例提供一种距离测量方法,该距离测量方法包括如下步 骤:
S301、获取第一反射信号和第一发射信号之间的第一相位差,以及第二反射信号和第二发射信号之间的第二相位差。
其中,第一反射信号、第一发射信号以及第一相位差已经在上一实施例中详细说明,第二反射信号、第二发射信号以及第二相位差也已经在上一实施例中详细说明,此处不再赘述。
为了清楚阐述该步骤,依次描述获得第二相位差和第一相位差的方式。
获得第二相位差具体包括:对第一反射信号进行采样获得第一采样结果,对第二反射信号进行采样获得第二采样结果,根据第一采样结果和第二采样结果获得第二相位差。也就是,第一采样结果是对高频信号的采样数据,第二采样结果是对低频信号的采样数据,第二相位差需要根据高频信号的采样数据和低频信号的采样数据获得。
优选地,第二采样结果包括第一采样数据和第二采样数据,第一采样数据和第二采样数据均是对低频信号采样而获得的数据。像素单元接收控制单元的控制信号,分别生成第一采样信号和第二采样信号,使用第一采样信号和第二采样信号对第二反射信号进行采样获得第一采样数据和第二采样数据。
优选地,第二采样结为采样数据的差值数据,采样数据也是对低频信号采样获得的。像素单元接收控制单元的控制信号,分别生成第一采样信号和第二采样信号,使用第一采样信号和第二采样信号对第二反射信号进行采样,获得第一采样数据和第二采样数据。再将第一采样数据和第二采样数据进行相减获得第一数据差值,将第一数据差值作为第二采样结果输出。
根据第一采样结果和第二采样结果获得第二相位差具体包括:根据第一采样结果获得第一反射信号的幅值,也就是根据高频信号的采样数据获得高频信号的幅值。根据第二采样结果、第一反射信号的幅值以及第一映射关系获得第二相位差。其中,第一映射关系表示第一反射信号的幅值和第二反射信号的幅值的对应关系。
同第二映射关系类似,当发射单元中元件参数固定,元件之间相对位置固定,第一发射信号的幅值和第二发射信号的幅值的对应关系也是固定的。在使用图像传感器进行测量距离前,可以确定第一发射信号的幅值和第二发射信号的幅值的对应关系。
更具体地,根据第二采样结果、第一反射信号的幅值以及第一映射关系 获得第二相位差,具体包括:当第二采样结果包括第一采样数据和第二采样数据,计算第一采样数据和第二采样数据的差值获得第一数据差值。再根据第一数据差值以及第二反射信号的幅值获得第二相位差。当第二采样结果为第一采样数据和第二采样数据的差值时,可直接根据第一数据差值以及第二反射信号的幅值获得第二相位差。也就是本实施例提供的距离测量方法也可以用于像素单元输出采样数据的差值数据情况。
获取第一相位差具体包括:分别使用第五采样信号至第八采样信号对第一反射信号进行采样,获得第三采样数据至第六采样数据。根据第三采样数据至第六采样数据,获得第一相位差和第一反射信号的幅值。
优选地,将第四采样数据和第三采样数据进行相减得到第二数据差值,将第六采样数据和第五采样数据进行相减得到第三数据差值。在根据第二数据差值和第三数据差值获得第一相位差和第一反射信号的幅值。
S302、根据第二相位差和第二映射关系对第一相位差进行校正处理,获得第三相位差。
其中,根据第二相位差和第二映射关系确定第一相位差的参考值。根据第一相位差的参考值对第一相位差进行校正处理获得第三相位差。
S303、根据第三相位差和第一反射信号的频率获得被测对象到图像传感器的距离。
具体的,将第三相位差和第一反射信号的频率代入公式(1)计算被测对象到图像传感器的距离。
在本申请实施例提供的距离测量方法中,低频信号的采样数据和低频信号的幅值、低频信号的相位差相关,且低频信号的幅值和高频信号的幅值有映射关系,可以根据高频信号的采样数据获得高频信号的幅值,再根据映射关系和高频信号幅值获得低频信号幅值,进而可以根据低频信号的采样数据和低频信号的幅值获得低频信号的相位差,进而使用低频信号的相位差校正高频信号的相位差,获得高频信号的实际相位差,达到对高频信号解混叠的目的,再根据高频信号的实际相位差所获得被侧对象的距离,提高所获得距离的精确度。
下面结合图3所示的像素单元工作于两个采集单元和两个开关均工作且输出两路数据的模式下说明本申请实施例提供的距离测量方法,该方法包括 如下步骤:
S401、获取第一反射信号和第一发射信号之间的第一相位差,以及第二反射信号和第二发射信号之间的第二相位差。
其中,上述两个步骤已经在上述两个实施例中详细说明,重复部分此处不再赘述。
下面结合图3所示的像素单元工作于两个采集单元和两个开关均工作且输出两路数据的模式,且第二发射信号为脉冲调制信号为例说明两个步骤。
获取第二相位差具体包括:控制单元分别生成第一采样信号和第二采样信号,第一采样信号作为第一开关TX0的导通信号,第二采样信号作为第二开关TX1的导通信号。控制第一采样信号和第二采样信号的时序,以达到控制第一开关TX0和第二开关TX1的通断时序的目的,进而控制输出端A和输出端B输出的电容电压值。
优选地,第一采样信号和第二发射信号的相位差为0°,第一采样信号和第二采样信号的相位差为360°。也就是,第一采样信号的起始时刻和第二采样信号的起始时刻之间差值为第二发射信号在单个信号周期内的信号持续时间的两倍,第二发射信号在单个信号周期内的信号持续时间表示在单个信号周期内脉冲信号持续时间,单个信号周期根据第二发射信号的频率确定。第一采样信号的起始时刻与第二发射信号的起始时刻相同。其中,第一采样信号的信号持续时间与第二发射信号的持续时间相同,第二采样信号的信号持续时间与第二发射信号的持续时间相同。
在第一采样信号和第二发射信号的相位差为0°,第一采样信号和第二采样信号的相位差为360°时,第一开关TX0和第二开关TX1的通断时序如图5A和图5B所示。第一采样信号控制第一开关TX0的导通时序,第二采样信号控制第二开关TX1的导通时序,在图中用第一开关TX0的导通时序表示第一采样信号的时序,第二开关TX1的导通时序表示第二采样信号的时序。
在第一发射信号的一个信号周期T内,第一发射信号的调制周期为2T1,调制周期是根据第一发射信号的频率确定的。第一采样信号与第二发射信号的相位差为0°,第一采样信号和第二采样信号之间相位差为360°。使得第一开关的第一导通时刻t1与第二开关的第二导通时刻t2之间相差第二发射信号在单个信号周期内的持续时间T1的两倍,第一导通时刻t1和第二发射信号的起始时刻t0相同。第一导通时刻t1是一采样信号控制的,第二导通时刻t2 是二采样信号控制的。需要说明的是,开关导通时刻均是指开关导通起始时刻,发射信号的发射时刻也是指发射信号的起始时刻。
如图5A所示,当第二相位差在(0,π)之间时,所获得的第一采样数据和第二采样数据分别如公式(2)和公式(3)所示。
Figure PCTCN2020127762-appb-000009
Q 2=B amb        (3)
其中,Q 1表示第一采样数据,Q 2表示第二采样数据,A L表示第二反射信号的幅值,
Figure PCTCN2020127762-appb-000010
表示第二相位差,B amb表示环境光强度。
如图5B所示,当第二相位差在(π,2π)之间时,所获得的第一采样数据和第二采样数据分别如公式(4)和公式(5)所示。
Q 1=B amb       (4)
Figure PCTCN2020127762-appb-000011
优选地,第二采样信号和第二发射信号的相位差为0°,第一采样信号和第二采样信号的相位差为360°。也就是,第一采样信号的起始时刻和第二采样信号的起始时刻之间差值为第二发射信号在单个信号周期内的信号持续时间的两倍,第二采样信号的起始时刻与第二发射信号的起始时刻相同。其中,第一采样信号的信号持续时间与第二发射信号的持续时间相同,第二采样信号的信号持续时间与第二发射信号的持续时间相同。
在第二采样信号和第二发射信号的相位差为0°,第一采样信号和第二采样信号的相位差为360°时,第一开关TX0和第二开关TX1的通断时序如图5C和图5D所示。第一开关的第一导通时刻t1与第二开关的第二导通时刻t2之间相差第二发射信号在单个信号周期内的持续时间T1的两倍,第二导通时刻t2和第二发射信号的起始时刻t0相同。第一导通时刻t1是一采样信号控制的,第二导通时刻t2是二采样信号控制的。
当第二相位差在(0,π)之间时,所获得的第一采样数据和第二采样数据分别如公式(4)和公式(5)所示。
当第二相位差在(π,2π)之间时,所获得的第一采样数据和第二采样数据分别如公式(2)和公式(3)所示。
根据图5A至图5D的描述,以及公式(2)至公式(5)可知,无论是第 一采样信号和第二发射信号的相位差为0°,还是第二采样信号和第二发射信号的相位差为0°,当第二发射信号为脉冲信号,且第一采样信号和第二采样信号之间相位差为360°时,第一采样数据Q 1和第二采样数据Q 2之间数据差值均如公式(6)所示:
Figure PCTCN2020127762-appb-000012
进而,可根据第一方程组获得第二相位差,其中,第一方程组包括:
Figure PCTCN2020127762-appb-000013
其中,△T表示数据差值,A L表示第二反射信号的幅值,
Figure PCTCN2020127762-appb-000014
表示第二相位差,A H表示第一反射信号的幅值,f 1(·)表示第一映射关系。
获取第一相位差具体包括:第一发射信号也为脉冲信号。控制第一开关TX0的控制信号为调制信号,每个调制周期内包括两个脉冲信号,分别为第五采样信号和第七采样信号。控制第二开关TX1的控制信号为调制信号,每个调制周期内包括两个脉冲信号,分别为第六采样信号和第八采样信号。
第一采样结果包括第三采样数据至第六采样数据。第五采样信号用于控制第一开关的通断,以控制第一采集单元对第一反射信号采样获得第三采样数据。第六采样信号用于控制第二开关的通断,以控制第二采集单元对第一反射信号采样获得第四采样数据。第七采样信号用于控制第一开关的通断,以控制第一采集单元对第一反射信号采样获得第五采样数据。第八采样信号用于控制第二开关的通断,以控制第二采集单元对第一反射信号采样获得第六采样数据。
控制第五采样信号和第六采样信号之间的相位差,第七采样信号和第八采样信号之间的相位差,以及第五采样信号与第一发射信号之间相位差,第五采样信号和第七采样信号之间的相位差,以获得不同采样数据。
优选地,在第一发射信号的一个信号周期内,第一发射信号的调制周期为2×T2,调制周期是根据第一发射信号的频率确定的。使第五采样信号和第六采样信号之间的相位差为180°,第七采样信号和第八采样信号之间的相位差为180°,第五采样信号和第七采样信号之间的相位差为90°。也就是,第五 采样信号的起始时刻和第六采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间T2,第七采样信号的起始时刻和第八采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间T2,第五采样信号的起始时刻和第七采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间T2的二分之一。需要说明的是,开关导通时刻均是指开关导通起始时刻,发射信号的发射时刻也是指发射信号的起始时刻。
在第五采样信号和第六采样信号之间的相位差为180°,第七采样信号和第八采样信号之间的相位差为180°,第五采样信号和第七采样信号之间的相位差为90°,第一开关TX0和第二开关TX1的通断时序如图6所示。第一开关的第五导通时刻t5与第二开关的第六导通时刻t6之间相差第一发射信号单个信号周期内的持续时间T2。第一开关的第七导通时刻t7与第二开关的第八导通时刻t8之间相差第一发射信号单个信号周期内的持续时间T2。第一开关的第五导通时刻t5与第二开关的第七导通时刻t7之间相差第一发射信号单个信号周期内的持续时间T2的二分之一。其中,第一开关的第五导通时刻t5是第五采样信号控制的,第二开关的第六导通时刻t6是六采样信号控制的,第一开关的第七导通时刻t7是七采样信号控制的,第二开关的第八导通时刻t8是第八采样信号控制的。
下面分别以第五采样信号至第八采样信号与第一发射信号的相位差分别为0°,180°,90°,270°为例,说明获得第一相位差和第一反射信号的幅值的过程。
根据如下公式(8)获得第一数据差值:
Figure PCTCN2020127762-appb-000015
其中,Q 3表示第三采样数据,Q 4表示第四采样数据,I表示第一数据差值。
根据如下公式(9)获得第二数据差值:
Figure PCTCN2020127762-appb-000016
其中,Q 5表示第五采样数据,Q 6表示第六采样数据,Q表示第二数据差值。
根据如下公式(10)获得第一相位差:
Figure PCTCN2020127762-appb-000017
根据如下公式(11)获得第一反射信号的幅值:
Figure PCTCN2020127762-appb-000018
其中,A H表示第一反射信号的幅值。
根据公式(11)获得第一反射信号的幅值A H、像素单元获得的第一采样数据和第二采样数据的数据差值、第一映射关系代入方程组(7)中,获得第二相位差。
为进一步提高第一相位差的准确度,采样八个采样信号对第一反射信号进行采集。为减少数据输出量,采用输出数据差值方式,输出四帧数据差值。第一帧数据差值对应的TX0的时序为0°,TX1的时序为180°;第二帧数据差值对应的TX0的时序为90°,TX1的时序为270°;第三帧数据差值对应的TX0的时序为180°,TX1的时序为0°;第四帧数据差值的TX0的时序为270°,TX1的时序为90°。在根据四帧数据差值计算第一反射信号的幅值和第一相位差。
S402、根据第二相位差和第二映射关系对第一相位差进行校正处理,获得第三相位差。
其中,根据如下公式(12)获得第一相位差的参考值。
Figure PCTCN2020127762-appb-000019
其中,f 2(·)表示第二映射关系,
Figure PCTCN2020127762-appb-000020
表示第二相位差,
Figure PCTCN2020127762-appb-000021
表示第一相位差的参考值。
根据第一相位差的参考值对第一相位差进行校正处理获得第三相位差。校正处理方式已经在S202中详细说明,此处不再赘述。
S403、根据第三相位差和第一反射信号的频率获得被测对象到图像传感器的距离。
其中,根据公式(1)计算被测对象到图像传感器的距离。
在本申请实施例提供的距离测量方法中,第二发射信号为脉冲信号,第一采样信号和第二采样信号之间相位差为360°时,第一采样数据和第二采样数据的数据差值满足公式(6),又第二反射信号的幅值使根据第一反射信号的幅值确定的,将采样得到的数据差值和得到第二反射信号的幅值代入公式(6),即求解出第二相位差,再根据第二相位差校正处理第一相位差,提高所获得距离的准确性。
下面结合图3所示的像素单元工作于一个采集单元和一个开关工作模式下说明本申请实施例提供的距离测量方法,该方法包括如下步骤:
S501、获取第一反射信号和第一发射信号之间的第一相位差,以及第二反射信号和第二发射信号之间的第二相位差。
其中,S501和S502步骤已经在上述两个实施例中详细说明,重复部分此处不再赘述。下面结合图3所示的像素单元工作于一个采集单元和一个开关工作模式的模式,且第二发射信号为调制信号为例说明该步骤。
获取第二相位差具体包括:控制第一开关TX0的控制信号为调制信号,每个调制周期内包括两个脉冲信号,分别为第三采样信号和第四采样信号。第三采样信号用于控制第一开关的通断,以控制第一采集单元对第二反射信号采样获得第一采样数据。第四采样信号用于控制第一开关的通断,以控制第一采集单元对第二反射信号采样获得第二采样数据。
优选地,继续参考图5A和图5B,第三采样信号的控制时序可以参考TX0的时序,第四采样信号的控制时序可以参考TX1,第三导通时刻是第三采样信号控制的,第四导通时刻是四采样信号控制的,第三导通时刻(也就是t1)与第二发射信号(也就是t0)的发射时刻相同,第一开关的第三导通时刻(也就是t1)与第一开关的第四导通时刻(也就是t2)之间相差第二发射信号在单个信号周期内的持续时间的两倍。需要说明的是,开关导通时刻均是指开关导通起始时刻,发射信号的发射时刻也是指发射信号的起始时刻。
当第三采样信号和第四采样信号的控制时序可以继续参考图5A和图5B,所采集得到第一采集数据和第二数据也可以继续参考公式(2)至(5)。
优选地,继续参考图5C和图5D,第三采样信号的控制时序可以参考TX0的时序,第四采样信号的控制时序可以参考TX1,第三导通时刻是三采样信号控制的,第四导通时刻是四采样信号控制的。第四导通时刻(也就是t2) 与第二发射信号的发射时刻(也就是t0)相同。第一开关的第三导通时刻(也就是t1)与第一开关的第四导通时刻之间相差第二发射信号在单个信号周期内的持续时间。
第三采样信号和第四采样信号的控制时序可以继续参考图5C和图5D,所采集得到第一采集数据和第二采集数据也可以继续参考公式(2)至(5)。
优选地,计算第一采样数据和第二采样数据的差值获得第一数据差值,将第一数据差值作为第二采样结果输出。也可以直接将第一采样数据和第二采样数据作为第二采样结果输出。
根据第一采样结果获得第一相位差,以及根据第一采样结果和第二采样结果获得第二相位差的过程此处不再赘述,可以参考前面实施例的描述。
S50/2、根据第二相位差和第二映射关系对第一相位差进行校正处理,获得第三相位差。
S503、根据第三相位差和第一反射信号的频率获得被测对象到图像传感器的距离。
其中,S502和S503已经在上述实施例中详细说明,此处不再赘述。
在本申请实施例提供的距离测量方法,当像素单元中一个采集单元和一个开关单元工作时,可以控制采集单元输出低频反射信号的两路采集数据,进而使用低频反射信号对高频反射信号解混叠,提高所获得距离的精确度。
本申请另一实施例还提供一种电子设备,包括图像传感器和控制器,图像传感器包括多个像素单元,发射单元向被侧对象发射信号,像素单元100用于接收被测对象返回的反射信号并输出数据,控制器用于获取像素单元100输出数据,执行上述实施例描述的距离测量方法,具体方案可以参考下面实施例。
其中,控制器可以包括多个控制单元,且一个控制单元与一个像素单元对应,每个控制单元接收对应像素单元输出数据,并执行上述实施例描述的距离测量方法。控制器也可以仅包括一个控制单元,该控制单元用于接收图像传感器中所有像素单元采集数据,采用分时处理方式执行上述实施例描述的距离测量方法,此处不做限制。
本申请另一实施例还提供一种计算机存储介质,计算机可读存储介质中存储有计算机执行指令,当处理器执行计算机执行指令时,执行上述实施例所描述的距离测量方法。具体可以参见前述距离测量方法的实施例中的相 关描述。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (16)

  1. 一种距离测量方法,其特征在于,方法包括:
    获取第一反射信号和第一发射信号之间的第一相位差,以及第二反射信号和第二发射信号之间的第二相位差;
    根据所述第二相位差对所述第一相位差进行校正处理,获得第三相位差;
    根据所述第三相位差和所述第一反射信号的频率获得被测对象到图像传感器的距离;
    其中,所述第一反射信号的频率大于所述第二反射信号的频率;所述第一反射信号为所述第一发射信号经过被测对象反射后的信号,所述第二反射信号为所述第二发射信号经过所述被测对象反射后的信号。
  2. 根据权利要求1所述的距离测量方法,其特征在于,获取第二反射信号和第二发射信号之间的第二相位差,具体包括:
    对所述第一反射信号进行采样获得第一采样结果,
    对所述第二反射信号进行采样获得第二采样结果;
    根据所述第一采样结果和所述第二采样结果,获得所述第二相位差。
  3. 根据权利要求2所述的距离测量方法,其特征在于,根据所述第一采样结果和所述第二采样结果,获得所述第二相位差,具体包括:
    根据所述第一采样结果获得所述第一反射信号的幅值;
    根据所述第二采样结果、所述第一反射信号的幅值以及第一映射关系,获得所述第二相位差;
    其中,所述第一映射关系表示所述第一反射信号的幅值和所述第二反射信号的幅值的对应关系。
  4. 根据权利要求2或3所述的距离测量方法,其特征在于,对所述第二反射信号进行采样获得第二采样结果,具体包括:
    分别使用第一采样信号和第二采样信号对所述第二反射信号进行采样,获得第一采样数据和第二采样数据;
    其中,所述第二采样结果包括所述第一采样数据和所述第二采样数据。
  5. 根据权利要求2或3所述的距离测量方法,其特征在于,对所述第二反射信号进行采样获得第二采样结果,具体包括:
    分别使用第一采样信号和第二采样信号对所述第二反射信号进行采样, 获得第一采样数据和第二采样数据;
    获得所述第一采样数据和所述第二采样数据的第一数据差值;
    其中,所述第二采样结果包括所述第一数据差值。
  6. 根据权利要求1至5中任意一项所述的距离测量方法,其特征在于,所述第一发射信号和第二发射信号为脉冲信号。
  7. 根据权利要求4或5所述的距离测量方法,其特征在于,所述第一采样信号的起始时刻和所述第二采样信号的起始时刻之间差值为第二发射信号在单个信号周期内的持续时间的两倍。
  8. 根据权利要求7所述的距离测量方法,其特征在于,所述第一采样信号的起始时刻与所述第二发射信号的起始时刻相同,或者,所述第二采样信号的起始时刻与所述第二发射信号的起始时刻相同。
  9. 根据权利要求7或8所述的距离测量方法,其特征在于,根据所述第二采样结果、所述第一反射信号的幅值以及第一映射关系获得所述第二相位差,具体包括:
    根据第一方程组获得所述第二相位差,其中,所述第一方程组包括:
    Figure PCTCN2020127762-appb-100001
    其中,ΔT表示所述数据差值,A L表述第二反射信号的幅值,
    Figure PCTCN2020127762-appb-100002
    表示所述第二相位差,A H表示所述第一反射信号的幅值,f 1(·)表示所述第一映射关系。
  10. 根据权利要求4所述的距离测量方法,其特征在于,所述图像传感器包括多个像素单元,每个像素单元包括第一开关、第一采集单元、第二开关以及第二采集单元;
    分别使用第一采样信号和第二采样信号对所述第二反射信号进行采样,获得第一采样数据和第二采样数据,具体包括:
    生成第一控制信号,以控制所述第一开关的通断,以使所述第一采集单元对所述第二反射信号进行采样获得第一采样数据;
    生成第二控制信号,以控制所述第二开关的通断,以使所述第二采集单元对所述第二反射信号进行采样获得第二采样数据;
    其中,所述第一开关的导通时刻与所述第二开关的导通时刻相差第二发射信号在单个信号周期内的持续时间的两倍。
  11. 根据权利要求10所述的距离测量方法,其特征在于:
    所述第一开关的导通时刻与所述第二发射信号的发射时刻相同,或者
    所述第二开关的导通时刻与所述第二发射信号的发射时刻相同。
  12. 根据权利要求1至11中任意一项所述的距离测量方法,其特征在于,根据所述第二相位差对所述第一相位差进行校正处理,获得第三相位差,具体包括:
    根据所述第二相位差和第二映射关系,确定第一相位差的参考值;
    根据所述第一相位差的参考值对所述第一相位差进行校正处理,获得所述第三相位差;
    其中,第二映射关系表示第一相位差和第二相位差的对应关系。
  13. 根据权利要求1至11中任意一项所述的距离测量方法,其特征在于,获取由被测对象返回的第一反射信号和第一发射信号之间的第一相位差,具体包括:
    分别使用第五采样信号至第八采样信号对所述第一反射信号进行采样,获得第三采样数据至第六采样数据;
    根据所述第三采样数据至所述第六采样数据,获得所述第一相位差。
  14. 根据权利要求13所述的距离测量方法,其特征在于:
    所述第五采样信号的起始时刻和第六采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间;
    第七采样信号的起始时刻和所述第八采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间;
    所述第五采样信号的起始时刻和所述第七采样信号的起始时刻之间差值为第一发射信号在单个信号周期内的持续时间的二分之一。
  15. 一种电子设备,其特征在于,包括图像传感器和控制器,所述图像传感器包括多个像素单元,所述控制单元用于获取所述多个像素单元输出的数据,并执行如权利要求1至14中任意一项所述的距离测量方法。
  16. 一种计算机存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行计算机执行指令时,实现如权利要求1至14中任一项所述的距离测量方法。
PCT/CN2020/127762 2020-11-10 2020-11-10 距离测量方法、电子设备以及存储介质 WO2022099447A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/127762 WO2022099447A1 (zh) 2020-11-10 2020-11-10 距离测量方法、电子设备以及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/127762 WO2022099447A1 (zh) 2020-11-10 2020-11-10 距离测量方法、电子设备以及存储介质

Publications (1)

Publication Number Publication Date
WO2022099447A1 true WO2022099447A1 (zh) 2022-05-19

Family

ID=81600716

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127762 WO2022099447A1 (zh) 2020-11-10 2020-11-10 距离测量方法、电子设备以及存储介质

Country Status (1)

Country Link
WO (1) WO2022099447A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080231832A1 (en) * 2007-03-23 2008-09-25 Fujifilm Corporation Ranging apparatus and ranging method
CN104914439A (zh) * 2015-05-19 2015-09-16 合肥工业大学 一种超声波测距的双相位测量方法
CN106597462A (zh) * 2016-12-26 2017-04-26 艾普柯微电子(上海)有限公司 测距方法及测距装置
CN108333591A (zh) * 2018-01-18 2018-07-27 中国科学院苏州纳米技术与纳米仿生研究所 一种测距方法及其系统
CN109031254A (zh) * 2018-09-28 2018-12-18 黄耀勇 测距校准方法、装置和测量系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080231832A1 (en) * 2007-03-23 2008-09-25 Fujifilm Corporation Ranging apparatus and ranging method
CN104914439A (zh) * 2015-05-19 2015-09-16 合肥工业大学 一种超声波测距的双相位测量方法
CN106597462A (zh) * 2016-12-26 2017-04-26 艾普柯微电子(上海)有限公司 测距方法及测距装置
CN108333591A (zh) * 2018-01-18 2018-07-27 中国科学院苏州纳米技术与纳米仿生研究所 一种测距方法及其系统
CN109031254A (zh) * 2018-09-28 2018-12-18 黄耀勇 测距校准方法、装置和测量系统

Similar Documents

Publication Publication Date Title
CN110596722B (zh) 直方图可调的飞行时间距离测量系统及测量方法
KR101722641B1 (ko) 3차원 영상 획득 장치 및 상기 3차원 영상 획득 장치에서 깊이 정보를 추출하는 방법
CN110221272B (zh) 时间飞行深度相机及抗干扰的距离测量方法
WO2021120402A1 (zh) 一种融合的深度测量装置及测量方法
CN110320528B (zh) 时间深度相机及多频调制解调的降低噪声的距离测量方法
WO2021103428A1 (zh) 一种深度测量系统及方法
US20120153120A1 (en) Proximity sensor and associated method, computer readable medium and firmware
JP6304567B2 (ja) 測距装置及び測距方法
CN110456370B (zh) 飞行时间传感系统及其测距方法
EP2038815A2 (en) Method and system for fast calibration of three-dimensional (3d) sensors
WO2022017366A1 (zh) 一种深度成像方法及深度成像系统
JP2013538342A (ja) 階層的な飛行時間(tof)システムのディエリアシング方法およびシステム
US20220277467A1 (en) Tof-based depth measuring device and method and electronic equipment
CN110456369B (zh) 飞行时间传感系统及其测距方法
CN108594254A (zh) 一种提高tof激光成像雷达测距精度的方法
KR20210033545A (ko) 명확한 범위 토글링에 의해 비행 시간 시스템의 범위를 증가시키기 위한 방법 및 시스템
WO2020006924A1 (zh) 基于tof模组的深度信息测量方法及装置
CN111896971B (zh) Tof传感装置及其距离检测方法
WO2020223981A1 (zh) 时间飞行深度相机及多频调制解调的距离测量方法
WO2020214914A1 (en) Single frame distance disambiguation
CN111208528A (zh) 飞时测距传感器以及飞时测距方法
WO2022206031A1 (zh) 确定噪声水平的方法、激光雷达以及测距方法
CN114488173A (zh) 一种基于飞行时间的距离探测方法和系统
CN112099036B (zh) 距离测量方法以及电子设备
WO2022099447A1 (zh) 距离测量方法、电子设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20961006

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20961006

Country of ref document: EP

Kind code of ref document: A1