WO2021077358A1 - Ranging method, ranging device, and computer-readable storage medium - Google Patents

Ranging method, ranging device, and computer-readable storage medium Download PDF

Info

Publication number
WO2021077358A1
WO2021077358A1 PCT/CN2019/113038 CN2019113038W WO2021077358A1 WO 2021077358 A1 WO2021077358 A1 WO 2021077358A1 CN 2019113038 W CN2019113038 W CN 2019113038W WO 2021077358 A1 WO2021077358 A1 WO 2021077358A1
Authority
WO
WIPO (PCT)
Prior art keywords
frequency
low
exposure
pixel
frequency exposure
Prior art date
Application number
PCT/CN2019/113038
Other languages
French (fr)
Chinese (zh)
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/CN2019/113038 priority Critical patent/WO2021077358A1/en
Priority to CN201980101481.6A priority patent/CN114556048B/en
Publication of WO2021077358A1 publication Critical patent/WO2021077358A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene

Definitions

  • This application relates to the technical field of time-of-flight ranging, in particular to a ranging method, a ranging device, and a computer-readable storage medium.
  • the basic principle of TOF is to continuously emit light pulses to the target object, and then use the sensor to receive the light signal returned from the target object, and obtain the target object distance by detecting the flight time of the light pulse.
  • the ToF camera 100 includes an active light source emitter 101 and a ToF sensor 102.
  • the active light source emitter 101 may be a light emitting diode (LED), a vertical cavity surface emitting laser (VCSEL), or the like.
  • the active light source transmitter 101 emits a continuous sine wave laser signal to the target object (as shown by curve 1 in FIG. 1). After the laser signal reaches the target object and is reflected by the target object (as shown by curve 2 in Figure 1), it is received by the ToF sensor 102. By comparing the phase difference ⁇ between the emitted laser signal and the received laser signal, the target can be calculated The distance of the object from the ToF camera and the intensity of the received laser signal.
  • Multi-frequency technology is to add one or more frequency modulation waves to mix. Each modulation wave measurement has a different ambiguous distance. The true distance is the value measured by multiple frequency modulation waves. The corresponding frequency of this value is The greatest common divisor of multiple frequencies is called the hitting frequency. Among them, the lower the hit frequency, the longer the measurement distance.
  • Dual-frequency ranging refers to the use of two modulated signals of different frequencies for ranging, and exposure of the modulated signals of each frequency for different times.
  • the high-frequency modulation signal can be exposed separately (referred to as high-frequency exposure) to obtain a high-frequency exposure image
  • the low-frequency modulation signal can be exposed (referred to as Low-frequency exposure) to obtain low-frequency exposure images.
  • high frequency and low frequency are relative terms.
  • the higher frequency is called high frequency
  • the lower frequency is called low frequency.
  • the power consumption of the TOF camera is proportional to the exposure (working) time.
  • more exposure time is allocated to the low-frequency modulation signal to ensure the signal-to-noise ratio of the low-frequency exposure image, thereby ensuring that the correct phase unwrapping frequency coefficient is obtained without affecting the ranging accuracy.
  • the phase unwrapping coefficient is used to restore the true phase delay of each frequency, which can be obtained by the unwrapping algorithm.
  • the power consumption of the system is higher.
  • the embodiments of the present application provide a ranging method and a ranging device, which can reduce power consumption while the ranging accuracy is unchanged.
  • an embodiment of the present application discloses a ranging method, including:
  • the distance between the distance measuring device and the target object is calculated according to the high-frequency exposure image and the low-frequency exposure image.
  • high frequency and low frequency refer to the frequency of the modulation signal emitted by the ranging device, which is relatively speaking.
  • the higher frequency is called high frequency
  • the lower frequency It is called low frequency.
  • the signal-to-noise ratio of the low-frequency exposure image can be improved. Therefore, even if less time is allocated to When the signal is modulated at low frequency, the correct phase unwrapping coefficient can also be ensured, thereby ensuring the accuracy of ranging. In this way, the purpose of reducing system power consumption is achieved under the premise of ensuring accuracy.
  • the determining the high-frequency exposure time and the low-frequency exposure time includes: performing a pre-exposure for a preset time to obtain the pre-exposure Image, and the high-frequency exposure time and the low-frequency exposure time are respectively determined according to the strength of the reference signal received by the pre-exposure image within the preset time.
  • the determining the high-frequency exposure time and the low-frequency exposure time separately according to the signal intensity received by the pre-exposure image within the preset time includes: obtaining the pre-exposure The strength of the reference signal received by the image within the preset time; the strength of the high-frequency target signal and the strength of the low-frequency target signal are determined respectively according to the strength of the reference signal; the strength of the high-frequency target signal is determined according to the reference signal strength, the strength of the high-frequency target signal, and the The preset time is used to calculate the high-frequency exposure time; and the low-frequency exposure time is calculated according to the reference signal strength, the low-frequency target signal strength, the number of pixels in each combination, and the preset time; wherein, The low-frequency exposure time is inversely proportional to the number of pixels in each combination. In this way, the low-frequency exposure time can be quickly calculated according to the number of pixels in each combination, which further improves the calculation efficiency of the high-frequency exposure time and the low-frequency exposure time.
  • the relationship between the variance or standard deviation of the measured distance noise at different frequencies and the received signal strength is combined to determine the high-frequency target signal strength and the low-frequency target signal strength.
  • the signal strength corresponding to the appropriate distance noise variance or standard deviation should be selected as the target Signal strength.
  • the appropriate distance noise variance or standard deviation means that the target signal strength corresponding to the distance noise variance meets the requirements of ranging accuracy and the correct phase unwrapping coefficient can be obtained.
  • a specific formula for calculating the low-frequency exposure time is as follows:
  • a 2L represents the low-frequency target signal strength
  • a 1 represents the reference signal strength
  • b is the number of pixels in each combination
  • T 1 is the preset time.
  • the reference signal intensity is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the average signal intensity of the characteristic pixels of the pre-exposure image; wherein, The characteristic pixels represent pixels corresponding to the characteristic regions of the pre-exposure image. In this way, the calculation accuracy of the high-frequency exposure time and the low-frequency exposure time can be improved.
  • the calculating the distance between the distance measuring device and the target object based on the high-frequency exposure image and the low-frequency exposure image includes: calculating the high-frequency value of each pixel in the high-frequency exposure image Phase delay information, and calculating the low-frequency phase delay information of each pixel combined in the low-frequency exposure image; up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain
  • the high-frequency exposure image is a low-frequency exposure image with the same resolution; the high-frequency unwrapping coefficient of each pixel is calculated according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel; according to the height of each pixel
  • the frequency unwrapping coefficient and the high-frequency phase delay information of each pixel calculates the distance between each pixel and the subject that the pixel is exposed to.
  • the combination can be processed Restore the subsequent images to improve the accuracy of subsequent ranging.
  • a continuous wave modulation mode or a pulse wave modulation mode is used, and different modulation modes can be used according to specific requirements, which improves the applicability of the ranging method.
  • a continuous wave modulation mode and chopping technique are used when performing high-frequency exposure. In this way, the mismatch caused by the capacitance, the set voltage, and the background light at the charge collection site during high-frequency modulation can be eliminated, and the accuracy of the depth information can be improved.
  • the continuous wave modulation mode is used for high frequency exposure, and the continuous wave modulation mode or pulse wave modulation mode is used for low frequency exposure. In this way, the power consumption of the system can be further reduced.
  • adjacent pixels are exposed in different phases to further reduce system power consumption.
  • an embodiment of the present application discloses a distance measuring device, which includes a determination module, an exposure module, and a calculation module.
  • the determining module is used to determine the high-frequency exposure time and the low-frequency exposure time, perform combination processing on low-frequency pixels when determining the low-frequency exposure time, and determine the low-frequency exposure time according to the number of combinations.
  • the exposure module is configured to perform high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image, and perform low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image.
  • the calculation module is used to calculate the distance between the distance measuring device and the target object according to the high-frequency exposure image and the low-frequency exposure image.
  • high frequency and low frequency refer to the frequency of the modulation signal emitted by the ranging device, which is relatively speaking.
  • the higher frequency is called high frequency
  • the lower frequency It is called low frequency.
  • the determining module since the determining module performs a combination process on the low-frequency pixels when determining the low-frequency exposure time, the signal-to-noise ratio of the low-frequency exposure image can be improved. Therefore, even when less time is allocated When giving low-frequency modulation signals, it can also ensure that the correct phase unwrapping coefficient is obtained, thereby ensuring the accuracy of ranging. In this way, the purpose of reducing system power consumption is achieved under the premise of ensuring accuracy.
  • the determining module is specifically configured to perform pre-exposure according to a preset time to obtain a pre-exposed image, and according to the reference signal received by each pixel of the pre-exposed image within the preset time The intensity determines the high-frequency exposure time and the low-frequency exposure time respectively.
  • the determining module includes an acquiring unit and a determining unit.
  • the acquiring unit is configured to acquire the reference signal intensity received by the pre-exposure image at the preset time.
  • the determining unit is used to determine the high-frequency target signal strength and the low-frequency target signal strength respectively according to the reference signal strength.
  • the determining unit is further configured to calculate the high-frequency exposure time according to the reference signal strength, the high-frequency target signal strength, and the preset time; and, according to the reference signal strength and the low-frequency target signal strength Calculating the low-frequency exposure time based on the determined number of combinations and the preset time; wherein the low-frequency exposure time is inversely proportional to the number of pixels in each combination.
  • the determining unit is specifically configured to determine the high-frequency target signal strength and the low-frequency target signal strength in combination with the relationship curve of the measured distance noise variance or standard deviation of different frequencies and the received signal strength. Specifically, when the distance noise variance corresponding to the reference signal strength is determined by the relationship curve between the distance noise variance or standard deviation and the received signal strength, the signal strength corresponding to the appropriate distance noise variance or standard deviation should be selected as the target Signal strength.
  • the appropriate distance noise variance or standard deviation means that the target signal strength corresponding to the distance noise variance meets the requirements of ranging accuracy and the correct phase unwrapping coefficient can be obtained.
  • a specific formula used by the determining unit to calculate the low-frequency exposure time is as follows:
  • A2L represents the low-frequency target signal strength
  • A1 represents the reference signal strength
  • b is the number of pixels in each combination
  • T1 is the preset time.
  • the reference signal intensity is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the average signal intensity of the characteristic pixels of the pre-exposure image; wherein, The characteristic pixels represent pixels corresponding to the characteristic regions of the pre-exposure image.
  • the calculation module includes a calculation unit and a sampling unit.
  • the calculation unit is configured to calculate the high-frequency phase delay information of each pixel in the high-frequency exposure image, and calculate the low-frequency phase delay information of each pixel combined in the low-frequency exposure image.
  • the sampling unit is used for up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain a low-frequency exposure image with the same resolution as the high-frequency exposure image.
  • the calculation unit is also used to calculate the high-frequency unwrapping coefficient of each pixel according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel; and according to the high-frequency unwrapping coefficient of each pixel Calculate the distance between each pixel and the subject when the pixel is exposed by using the high-frequency phase delay information of each pixel.
  • a continuous wave modulation mode or a pulse wave modulation mode is used, and different modulation modes can be used according to specific requirements, which improves the applicability of the ranging method.
  • a continuous wave modulation mode and chopping technique are used when performing high-frequency exposure. In this way, the mismatch caused by the capacitance, the set voltage, and the background light at the charge collection site during high-frequency modulation can be eliminated, and the accuracy of the depth information can be improved.
  • the continuous wave modulation mode is used for high frequency exposure, and the continuous wave modulation mode or pulse wave modulation mode is used for low frequency exposure. In this way, the power consumption of the system can be further reduced.
  • adjacent pixels are exposed in different phases to further reduce system power consumption.
  • the present application provides a distance measuring device, including a transmitter, a receiving sensor, and a processor.
  • the processor is respectively coupled with the transmitter and the receiver.
  • the processor is configured to execute the method described in the first aspect and any possible implementation manner in the first aspect.
  • the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer, to control the computer to execute such as the first One aspect and the method described in any possible implementation of the first aspect.
  • the present application provides a computer program product containing instructions.
  • the computer program product When the computer program product is run on an electronic device, the electronic device is caused to perform the operations described in the first aspect and any one of the possible implementation manners in the first aspect. method.
  • Fig. 1 is a schematic diagram of the ranging principle of a TOF camera in the background art.
  • FIG. 2 is a schematic structural diagram of a distance measuring device in an embodiment of the application.
  • FIG. 3 is a schematic structural diagram of a distance measuring device in another embodiment of the application.
  • FIG. 4 is a flowchart of a distance measurement method in an embodiment of this application.
  • Fig. 5 is a detailed flowchart of step S11.
  • Fig. 6 is a detailed flowchart of step S13.
  • Fig. 7 is a functional block diagram of a distance measuring device in an embodiment of the application.
  • Figure 8 is a diagram of the sub-function modules of the determining module.
  • Figure 9 is a diagram of the sub-function modules of the computing module.
  • the embodiments of the present application provide a ranging device and a ranging method applied to the ranging device.
  • the ranging method can reduce power consumption while the ranging accuracy is unchanged.
  • the distance measurement method achieves the above-mentioned functions by adjusting the proportion of the time of high-frequency exposure and low-frequency exposure, such as reducing the low-frequency exposure time by combining low-frequency pixels, thereby solving the problem of low-frequency signal-to-noise ratio. Causes the problem of phase unwrapping failure.
  • the distance measuring device 100 includes a transmitter 10, a receiver 20 and a processor 30.
  • the transmitter 10 is used to transmit optical signals.
  • the transmitter 10 may be a light emitting diode (Light Emitting Diode, LED) or a laser diode (Laser Diode, LD).
  • LED Light Emitting Diode
  • LD Laser Diode
  • the laser has good collimation and high energy. Compared with the same number of LED lights, the laser emitter has a larger detection range and is more suitable for long-distance detection.
  • the receiver 20 is used to receive the light signal reflected by the target object 200.
  • the receiver 20 is composed of a plurality of pixels (not shown) arranged in two dimensions.
  • the receiver 20 is used to perform a receiving operation of reflected light at each pixel, and to generate an electric charge corresponding to the light amount of the reflected light (received light amount) obtained by the light receiving operation.
  • the receiver 20 may include a photosensitive element, and the photosensitive element includes at least one of the following: a photodiode, an avalanche photodiode, and a charge-coupled element.
  • the processor 30 is configured to determine the distance between the target object 200 and the distance measuring device 100 according to the optical signal emitted by the transmitting unit 10 and the optical signal reflected by the target object 200 received by the receiving unit 20. Specifically, the processor 30 is configured to determine the phase difference between the optical signal emitted by the transmitting unit 10 and the optical signal reflected by the target object 200 received by the receiving unit 20, and determine the target object according to the phase difference The distance between 200 and the distance measuring device 100.
  • the processor 30 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the processor is the control center of the distance measuring device 100, and various interfaces and lines are used to connect the entire distance measuring device. 100 parts.
  • the process in which the processor 30 controls the transmitter 10 to emit light signals to the target object 200, and the light signal reflected by the target object 200 is received by the receiver 20 and forms an image is called exposure.
  • the processor 30 controls the transmitter 10 to transmit an optical signal of a certain frequency f L for distance detection, and allows the receiver 20 to perform the same frequency four-phase delay (0 degrees, 90 degrees, 180 degrees, 270 degrees, ) Exposure for a period of time (t L ).
  • the exposure value of the receiver 20 DCS0 L, DCS1 L, DCS2 L, DCS3 L
  • the processor 30 controls the transmitter 11 to transmit another optical signal of frequency f H for distance detection, and allows the receiver 20 to perform the same frequency four-phase delay (0 degree, 90 degree, 180 degree, 270 degree,) exposure for a period of time.
  • the exposure value (DCS0 H, DCS1 H, DCS2 H, DCS3 H) receiver 20 is also transmitted to the processor 30.
  • the processor 30 outputs a measured distance for each pixel after receiving the data of multiple exposures.
  • FIG. 3 is a schematic structural diagram of a distance measuring device 100 in another embodiment of the application.
  • the distance measuring device 100 further includes a driving unit 40, a lens 50 and an A/D conversion unit 60.
  • the driving unit 12 is connected between the processor 30 and the transmitter 10 for driving the transmitter 10 to emit light signals.
  • the lens 50 is used to converge the light signal reflected by the target object 200.
  • the A/D conversion unit 60 is connected between the receiver 20 and the processor 30, and is configured to perform A/D conversion on the pixel signal from the receiver 20 and output the converted pixel signal To processor 30.
  • the distance measurement device 100 in the embodiment of the present application uses a dual-frequency distance measurement technology to perform distance measurement.
  • the principle of dual-frequency ranging technology is described in detail below.
  • the dual-frequency ranging in the embodiments of the present application refers to using a low-frequency modulation signal and a high-frequency modulation signal to respectively perform exposure to detect the distance.
  • high frequency and low frequency are relative terms.
  • the two-frequency modulation signal used in dual-frequency ranging technology of which the higher frequency is called high frequency, and the lower frequency is called For low frequency.
  • the frequency of the high frequency and the low frequency can be different by about 2 times, for example, the low frequency is 100 MHz, and the high frequency is 250 MHz, but it is not limited to this, and can be specifically set according to actual ranging requirements.
  • the ambiguity distance of the high-frequency signal during ranging is relatively small, for example, the ambiguity distance corresponding to 250MHz is 0.6m, so when the object exceeds 0.6m, when only the 250MHz waveform is used to detect it, the distance measurement is not accurate.
  • the fuzzy distance corresponding to 100MHz is 1.5m, so when the object beyond 1.5m is detected using only 100MHz waveform, the distance cannot be measured accurately. But the minimum working distance when working with 100MHz+250MHz signals becomes 3m. Therefore, when measuring any pixel at a certain frequency within 3m, the tested distances d L and d H are determined by two variables, one is the unwrapping coefficient n L , n H , and the other is the phase delay ⁇ H , ⁇ L.
  • the specific formula is as follows:
  • c is the speed of light (3*10 8 m/s); two unwrapping coefficients are used to restore the true phase delay of each frequency, which can be calculated by the unwrapping algorithm; and the phase delay is the exposure of the receiver 20
  • the values (DCS0, DCS1, DCS2, DCS3) are calculated; D is the fuzzy distance.
  • the dual-frequency ranging error formula is as follows:
  • a pix is the pixel area, too large pixels will reduce the resolution, large size and high cost;
  • RE is quantum efficiency, also known as QE, which directly affects system performance;
  • FF is the fill rate;
  • ⁇ active is the light source received by the pixel Luminous power, an efficient light source will bring benefits to the system power consumption;
  • ⁇ ambient is the ambient light power received by the pixel, which is determined by the user's environment, light source, and bandpass filter;
  • t int is the exposure time, and the time should not be too long ;
  • N system is the system noise, which is determined by the readout circuit;
  • F mod is the modulation frequency. Adjusting this parameter will improve the accuracy, but will reduce the measurable distance;
  • C mod is the modulation contrast, also known as MC, and is designed with the internal electric field of the pixel Related, q is a constant.
  • the distance measuring device 100 For the distance measuring device 100 with dual-frequency ranging technology, if the two frequency values are similar (such as plus or minus 10%), and the exposure time of the two frequencies is equal (such as plus or minus 10%), the final output distance can be calculated twice The average of the measured distance is obtained. If the two frequencies are quite different (for example, the difference is about 50%), there are two ways to obtain the test distance, one way is through averaging, the other way is to use the high frequency range measurement result as the final output, low frequency Although it also participates in the exposure, it is mainly to solve the unwrapping coefficient of the high-frequency component and does not participate in other calculations. Therefore, the distance measuring device 100 can be used to increase the high-frequency exposure time and reduce the low-frequency exposure time as long as the unwrapping coefficient is calculated correctly. , Then the accuracy of ranging can be improved.
  • FIG. 4 is a flowchart of a ranging method in an embodiment of this application.
  • the distance measurement method is applied to the distance measurement device 100 in FIG. 1 or FIG. 2.
  • the ranging method includes the following steps.
  • Step S11 Determine a high-frequency exposure time t H and a low-frequency exposure time t L , perform combination processing on low-frequency pixels when determining the low-frequency exposure time, and determine the low-frequency exposure time t L according to the number of combinations.
  • performing combination processing on low-frequency pixels refers to performing binning processing on low-frequency pixels.
  • binning is an image readout mode in which the charges induced in adjacent pixels are added together and read out in a pixel mode.
  • Binning is divided into horizontal direction binning and vertical direction binning.
  • the horizontal direction binning is to add the charges of adjacent rows and read out, while the vertical direction binning is to add the charges of adjacent columns to read out.
  • This technology is binning.
  • the advantage is that several pixels can be combined as one pixel to increase sensitivity, output speed, and reduce resolution.
  • the aspect ratio of the image does not change, for example, when using 2*2 binning,
  • the image resolution will be reduced by 75%.
  • a combination of 1*1, 1*2, 2*1, 1*3, 3*1, or 2*2 can be performed according to actual needs, which is not limited here.
  • pre-exposure may be performed according to a preset time T1 to obtain a pre-exposed image, and according to each pixel of the pre-exposed image
  • the strength of the reference signal received within the preset time T1 determines the high-frequency exposure time and the low-frequency exposure time respectively.
  • the pre-exposure can be performed using a modulation signal with a higher frequency, or a modulation signal with a lower frequency, which is not limited here.
  • Step S12 performing high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image, and performing low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image.
  • the sequence of high-frequency exposure and low-frequency exposure is not limited.
  • high-frequency exposure may be performed first, or low-frequency exposure may be performed first.
  • Step S13 Calculate the distance between the distance measuring device and the target object according to the high-frequency exposure image and the low-frequency exposure image.
  • the signal-to-noise ratio of the low-frequency exposure image can be improved. Therefore, even if less time is allocated to When the signal is modulated at low frequency, the correct phase unwrapping coefficient can also be ensured, thereby ensuring the accuracy of ranging. In this way, the purpose of reducing system power consumption is achieved under the premise of ensuring accuracy.
  • the high-frequency exposure time t H and the low-frequency exposure time are respectively determined according to the signal strength of the pre-exposure image received within the preset time T 1 t L specifically includes the following steps.
  • Step S111 the pre-exposure image acquired at the predetermined time T 1 of the received reference signal strength A 1.
  • the reference signal intensity A 1 is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the average signal intensity of the characteristic pixels of the pre-exposure image; wherein, The characteristic pixels represent pixels corresponding to the characteristic regions of the pre-exposure image.
  • the characteristic area may be the area corresponding to the nose, eyes, and mouth, and the specific characteristic area may be determined according to the actual exposed subject.
  • Step S112 Determine the high-frequency target signal strength A 2H and the low-frequency target signal strength A 2L respectively according to the reference signal strength A 1 .
  • the relationship curve between the variance or standard deviation of the measured distance noise at different frequencies and the received signal strength can be combined to determine the high-frequency target signal strength A 2H and the low-frequency target signal strength A 2L .
  • the signal strength corresponding to the appropriate distance noise variance or standard deviation should be selected as the target signal strength.
  • the appropriate distance noise variance or standard deviation means that the target signal strength corresponding to the distance noise variance meets the requirements of ranging accuracy and the correct phase unwrapping coefficient can be obtained.
  • Step S113 Calculate the high-frequency exposure time t H according to the reference signal strength A 1 , the high-frequency target signal strength A 2H, and the preset time T 1 ; and, according to the reference signal strength A 1 , The low-frequency target signal intensity A 2L , the number of pixels b of each combination, and the preset time T 1 are used to calculate the low-frequency exposure time t L ; wherein the low-frequency exposure time t L and the number of pixels of each combination b It is inversely proportional.
  • a formula for specifically calculating the high-frequency exposure time t H and the low-frequency exposure time t L is as follows:
  • step S13 specifically includes the following steps:
  • Step S131 Calculate the high-frequency phase delay information of each pixel in the high-frequency exposure image, and calculate the low-frequency phase delay information of each pixel in the low-frequency exposure image.
  • Step S132 Up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain a low-frequency exposure image with the same resolution as the high-frequency exposure image.
  • the phase delay information of each pixel of the low-frequency exposure image with a resolution of 160*120 is obtained after the combination of the low-frequency phase delay information of each pixel.
  • the phase delay information of each pixel of the low-frequency exposure image with a resolution of 320*240 is obtained.
  • step S133 the high-frequency unwrapping coefficient of each pixel is calculated according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel.
  • Step S134 Calculate the distance between each pixel and the object photographed when the pixel is exposed according to the high-frequency unwrapping coefficient of each pixel and the high-frequency phase delay information of each pixel.
  • the combination can be processed Restore the subsequent images to improve the accuracy of subsequent ranging.
  • a continuous wave modulation mode or a pulse wave modulation mode is used. That is, high-frequency exposure can be switched between continuous wave modulation mode and pulse wave to mode; low-frequency exposure can also be switched between continuous wave modulation mode and pulse wave to mode.
  • the continuous wave modulation mode can be used by default, or it can be switched according to the use environment of the distance measuring device 100.
  • the continuous wave modulation mode is used when the distance measuring device 100 is applied to an indoor environment
  • the continuous wave modulation mode is used when the distance measuring device 100 is applied to an indoor environment.
  • the pulse wave modulation mode is used in the outdoor environment, and different modulation modes can be adopted according to specific needs, which improves the applicability of the ranging method.
  • dual-frequency mid-high/low-frequency exposure modulation can be divided into 1, 2, 3, 4 or more times.
  • the embodiment of the present application refers to a group of continuous waveforms, rather than a periodic waveform.
  • the number of high and low frequency exposures will be described in detail below with a specific embodiment.
  • Example 1 Continuous wave exposure modulation is used for high frequency exposure 4 times, and continuous wave exposure modulation is used for low frequency exposure 2 times. Refer to the table below for details.
  • high-frequency exposure modulation is performed first, and then low-frequency exposure modulation is performed.
  • the sequence of high-frequency exposure modulation and low-frequency exposure modulation can be exchanged.
  • f H represents high-frequency exposure modulation
  • f L represents low-frequency exposure modulation.
  • a 0 represents an exposure with a phase of 0°
  • a 180 represents an exposure with a phase of 180°
  • a 90 represents an exposure with a phase of 90°
  • a 270 represents an exposure with a phase of 270°.
  • a 0 A 180 indicates that the phase window A and the phase window B perform phase 0° and 180° exposure respectively
  • a 180 A 0 indicates that the phase window A and the phase window B perform phase 180° and 0° exposure respectively.
  • the high-frequency continuous wave A 0 A 180 , A 90 A 270 , A 180 A 0 , A 270 A 90 and the low-frequency continuous wave A 0 A 180 , A 90 A 270 are exposed in sequence. In actual operation, the order can be exchange.
  • the use of chopping technology that is , exposure of A 0 A 180 and A 180 A 0
  • the chopping technology is also called the mismatch elimination technology of stored charge components.
  • Embodiment 2 High-frequency exposure uses continuous wave exposure modulation 4 times, and low-frequency exposure uses pulse wave exposure modulation once. See the table below for details.
  • Embodiment 2 The difference between Embodiment 2 and Embodiment 1 is that the low frequency adopts A 0 A 180 pulse wave exposure, and the exposure is performed once. Since the distance information obtained by low-frequency modulation is mainly phase unwrapping, pulse modulation is used, and 0° and 180° pulse modulation is used. The depth information for phase unwrapping can be obtained through only one exposure, which can further reduce the system Power consumption. It should be noted that in actual operation, the pulse modulation phases of the phase window A and the phase window B can be exchanged.
  • Embodiment 3 High-frequency exposure uses continuous wave exposure modulation twice, and low-frequency exposure uses continuous wave exposure modulation twice. See the table below for details.
  • the high-frequency continuous wave A 0 A 180 , A 90 A 270 and the low-frequency continuous wave A 0 A 180 , A 90 A 270 are sequentially exposed.
  • the sequence of high-frequency exposure and low-frequency exposure Can be exchanged.
  • the high-frequency modulation does not use chopping technology to eliminate the offset caused by process, device and environmental factors. The accuracy of the depth information will be relatively reduced, but the power consumption will be reduced accordingly.
  • Embodiment 4 High-frequency exposure uses continuous wave exposure modulation twice, and low-frequency exposure uses pulse wave exposure modulation once. See the table below for details.
  • the exposure of the high-frequency continuous wave A 0 A 180 , A 90 A 270 and the low-frequency pulse wave A 0 A 180 are sequentially performed.
  • the sequence of high-frequency exposure and low-frequency exposure can be exchanged.
  • the high-frequency modulation does not use the chopping technology to eliminate the misalignment caused by the process, the device, and the environmental factors. The accuracy of the depth information will be relatively reduced, but the power consumption will be reduced accordingly.
  • Low-frequency exposure modulation can obtain depth information for phase unwrapping with only one exposure, further reducing overall power consumption. It should be noted that in actual operation, the pulse modulation phases of the phase window A and the phase window B can be exchanged.
  • the above exposure combinations are only examples, and other exposure modulation times combinations with similar principles are also included in the protection scope of the present application.
  • the pixels are spatially separated during exposure, that is, adjacent pixels are exposed to different phases, which can further reduce power consumption. As long as the principle is the same, it is also included in the scope of protection of the present application.
  • the processor 30 is configured to execute the ranging method in any of the foregoing implementation manners.
  • the distance measuring device 100 includes a determination module 110, an exposure module 120, and a calculation module 130.
  • the determination module 110 may be used to implement the method shown in step S11 in the foregoing method embodiment
  • the exposure module 120 may be used to implement the method shown in step S12 in the foregoing method embodiment
  • the calculation module 130 may It is used to implement the method shown in step S13 in the foregoing method embodiment.
  • the determining module 110 includes an acquiring unit 111 and a determining unit 112.
  • the acquiring unit 111 may be used to implement the method shown in step S111 in the foregoing method embodiment; the determining unit may be respectively used to implement the method shown in step S112 and step S113 in the foregoing method embodiment.
  • the calculation module 130 includes a calculation unit 131 and a sampling unit 132.
  • the calculation unit 131 may be used to implement the method shown in step S131 in the foregoing method embodiment.
  • the sampling unit 132 may be used to implement the method shown in step S132 in the foregoing method embodiment.
  • the calculation unit 131 may also be used to implement the methods shown in step S133 and step S134 in the foregoing method embodiment.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk).

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

A ranging device and a ranging method applied to the ranging device. The ranging device comprises a transmitter and a receiver. The ranging method comprises: determining a high-frequency exposure time and a low-frequency exposure time; when determining the low-frequency exposure time, combining low-frequency pixels and determining the low-frequency exposure time according to the number of pixels of each combination (S11); carrying out high-frequency exposure according to the high-frequency exposure time so as to obtain a high-frequency exposure image, and carrying out low-frequency exposure according to the low-frequency exposure time so as to obtain a low-frequency exposure image (S12); and calculating the distance between a ranging device and a target object according to the high-frequency exposure image and the low-frequency exposure image (S13). The described method may reduce system power consumption while ensuring accuracy.

Description

测距方法、测距装置及计算机可读存储介质Distance measuring method, distance measuring device and computer readable storage medium 技术领域Technical field
本申请涉及飞行时间测距技术领域,尤其涉及一种测距方法、测距装置及计算机可读存储介质。This application relates to the technical field of time-of-flight ranging, in particular to a ranging method, a ranging device, and a computer-readable storage medium.
背景技术Background technique
TOF(Time of Flight,飞行时间)的基本原理是通过连续发射光脉冲到目标物体上,然后用传感器接收从目标物体返回的光信号,通过探测光脉冲的飞行时间来得到目标物距离。The basic principle of TOF (Time of Flight) is to continuously emit light pulses to the target object, and then use the sensor to receive the light signal returned from the target object, and obtain the target object distance by detecting the flight time of the light pulse.
如图1所示,为飞行时间(time of flight,ToF)相机测距的基本原理图,ToF相机100包括主动光源发射器101和ToF传感器102。主动光源发射器101可以是发光二极管(light emitting diode,LED)、垂直腔面发射激光器(vertical cavity surface emitting laser,VCSEL)等。主动光源发射器101向目标物体发射连续的正弦波激光信号(如图1中曲线1所示)。激光信号抵达目标物体并被目标物体反射后(如图1中曲线2所示),被ToF传感器102接收,通过对比发射的激光信号和接收的激光信号之间的相位差φ,可以计算出目标物体距离ToF相机的距离以及接收到的激光信号强度。As shown in FIG. 1, it is a basic principle diagram of time of flight (ToF) camera ranging. The ToF camera 100 includes an active light source emitter 101 and a ToF sensor 102. The active light source emitter 101 may be a light emitting diode (LED), a vertical cavity surface emitting laser (VCSEL), or the like. The active light source transmitter 101 emits a continuous sine wave laser signal to the target object (as shown by curve 1 in FIG. 1). After the laser signal reaches the target object and is reflected by the target object (as shown by curve 2 in Figure 1), it is received by the ToF sensor 102. By comparing the phase difference φ between the emitted laser signal and the received laser signal, the target can be calculated The distance of the object from the ToF camera and the intensity of the received laser signal.
现有的TOF测距技术中,为了扩展测量距离的同时不影响精度,可采用多频技术,实现在不降低调制频率的同时来增加测量距离。多频技术是增加一个或者多个频率调制波来混频,每个调制波测量都有不同的不明确的距离,真实距离就是多个频率调制波共同测量到的值,该值所对应频率为多个频率的最大公约数,称为击打频率。其中,击打频率越低,测量距离越长。In the existing TOF ranging technology, in order to extend the measurement distance without affecting the accuracy, a multi-frequency technology can be used to increase the measurement distance without reducing the modulation frequency. Multi-frequency technology is to add one or more frequency modulation waves to mix. Each modulation wave measurement has a different ambiguous distance. The true distance is the value measured by multiple frequency modulation waves. The corresponding frequency of this value is The greatest common divisor of multiple frequencies is called the hitting frequency. Among them, the lower the hit frequency, the longer the measurement distance.
在多频技术中,常采用的是双频测距。双频测距是指采用两个不同频率的调制信号来进行测距,并分别对每个频率的调制信号进行不同时间的曝光。例如,当采用一个高频调制信号和一个低频调制信号进行测距时,可以分别对高频调制信号进行曝光(简称高频曝光)以获得高频曝光图像,并对低频调制信号进行曝光(简称低频曝光)以获得低频曝光图像。其中,高频和低频是相对而言的,在双频测距中,频率较高的称之为高频,而频率较低的则称为低频。在现有的TOF相机应用中,TOF相机的功耗与曝光(工作)时间成正比。目前,为了保证测距精度会分配较多的曝光时间给低频调制信号以保证低频曝光图像的信噪比,进而保证得到正确的相位解缠频系数而不影响测距精度。其中,相位解缠系数用于恢复每个频率的真实相位延迟,可以通过解缠算法获得。然而,由于分配给低频曝光的时间较多,导致系统的功耗较高。In multi-frequency technology, dual-frequency ranging is often used. Dual-frequency ranging refers to the use of two modulated signals of different frequencies for ranging, and exposure of the modulated signals of each frequency for different times. For example, when a high-frequency modulation signal and a low-frequency modulation signal are used for ranging, the high-frequency modulation signal can be exposed separately (referred to as high-frequency exposure) to obtain a high-frequency exposure image, and the low-frequency modulation signal can be exposed (referred to as Low-frequency exposure) to obtain low-frequency exposure images. Among them, high frequency and low frequency are relative terms. In dual-frequency ranging, the higher frequency is called high frequency, and the lower frequency is called low frequency. In the existing TOF camera applications, the power consumption of the TOF camera is proportional to the exposure (working) time. At present, in order to ensure the accuracy of the ranging, more exposure time is allocated to the low-frequency modulation signal to ensure the signal-to-noise ratio of the low-frequency exposure image, thereby ensuring that the correct phase unwrapping frequency coefficient is obtained without affecting the ranging accuracy. Among them, the phase unwrapping coefficient is used to restore the true phase delay of each frequency, which can be obtained by the unwrapping algorithm. However, due to more time allocated for low frequency exposure, the power consumption of the system is higher.
发明内容Summary of the invention
本申请实施例提供一种测距方法和测距装置,可以在测距精度不变的情况下降低功耗。The embodiments of the present application provide a ranging method and a ranging device, which can reduce power consumption while the ranging accuracy is unchanged.
第一方面,本申请实施例公开一种测距方法,包括:In the first aspect, an embodiment of the present application discloses a ranging method, including:
确定高频曝光时间和低频曝光时间;其中,在确定所述低频曝光时间时,对低频像素进行组合处理,并根据每个组合的像素数量确定所述低频曝光时间;Determine the high-frequency exposure time and the low-frequency exposure time; wherein, when determining the low-frequency exposure time, combine processing of low-frequency pixels, and determine the low-frequency exposure time according to the number of pixels in each combination;
根据所述高频曝光时间进行高频曝光以获得高频曝光图像;和,根据所述低频曝光时 间进行低频曝光以获得低频曝光图像;Performing high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image; and performing low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image;
根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之间的距离。The distance between the distance measuring device and the target object is calculated according to the high-frequency exposure image and the low-frequency exposure image.
其中,高频和低频是指测距装置发射的调制信号的频率的高低,是相对而言的,例如,在双频测距技术中,频率较高的称之为高频,而频率较低的则称之为低频。Among them, high frequency and low frequency refer to the frequency of the modulation signal emitted by the ranging device, which is relatively speaking. For example, in dual-frequency ranging technology, the higher frequency is called high frequency, and the lower frequency It is called low frequency.
本申请实施例中的测距方法中,由于在确定所述低频曝光时间时,对低频像素进行了组合处理,进而能够提高低频曝光图像的信噪比,因此,即使在分配较少的时间给低频调制信号时,也可以保证得到正确的相位解缠系数,从而保证测距精度。如此,实现了在保证精度的前提下,减少了系统功耗的目的。In the distance measurement method in the embodiment of the present application, since the low-frequency pixels are combined when determining the low-frequency exposure time, the signal-to-noise ratio of the low-frequency exposure image can be improved. Therefore, even if less time is allocated to When the signal is modulated at low frequency, the correct phase unwrapping coefficient can also be ensured, thereby ensuring the accuracy of ranging. In this way, the purpose of reducing system power consumption is achieved under the premise of ensuring accuracy.
在一种实施方式中,为了较快的确定所述高频曝光时间和所述低频曝光时间,所述确定高频曝光时间和低频曝光时间,包括:进行预设时间的预曝光以获得预曝光图像,并根据所述预曝光图像在所述预设时间内接收到的参考信号强度分别确定所述高频曝光时间和所述低频曝光时间。In one embodiment, in order to determine the high-frequency exposure time and the low-frequency exposure time quickly, the determining the high-frequency exposure time and the low-frequency exposure time includes: performing a pre-exposure for a preset time to obtain the pre-exposure Image, and the high-frequency exposure time and the low-frequency exposure time are respectively determined according to the strength of the reference signal received by the pre-exposure image within the preset time.
在一种实施方式中,所述根据所述预曝光图像在所述预设时间内接收到的信号强度,分别确定所述高频曝光时间和所述低频曝光时间,包括:获取所述预曝光图像在所述预设时间内接收到的参考信号强度;根据所述参考信号强度分别确定高频目标信号强度和低频目标信号强度;根据所述参考信号强度、所述高频目标信号强度以及所述预设时间计算所述高频曝光时间;以及,根据所述参考信号强度、所述低频目标信号强度、每个组合的像素数量以及所述预设时间计算所述低频曝光时间;其中,所述低频曝光时间和每个组合的像素数量呈反比。如此,可以根据每个组合的像素的数量快速计算出低频曝光时间,进一步提高了对所述高频曝光时间和所述低频曝光时间的计算效率。In one embodiment, the determining the high-frequency exposure time and the low-frequency exposure time separately according to the signal intensity received by the pre-exposure image within the preset time includes: obtaining the pre-exposure The strength of the reference signal received by the image within the preset time; the strength of the high-frequency target signal and the strength of the low-frequency target signal are determined respectively according to the strength of the reference signal; the strength of the high-frequency target signal is determined according to the reference signal strength, the strength of the high-frequency target signal, and the The preset time is used to calculate the high-frequency exposure time; and the low-frequency exposure time is calculated according to the reference signal strength, the low-frequency target signal strength, the number of pixels in each combination, and the preset time; wherein, The low-frequency exposure time is inversely proportional to the number of pixels in each combination. In this way, the low-frequency exposure time can be quickly calculated according to the number of pixels in each combination, which further improves the calculation efficiency of the high-frequency exposure time and the low-frequency exposure time.
在具体的一种实施方式中,结合不同频率的测量距离噪声方差或标准差与接收到的信号强度关系曲线来确定高频目标信号强度和低频目标信号强度。具体地,当通过距离噪声方差或标准差与接收到的信号强度关系曲线确定参考信号强度所对应的距离噪声方差较大时,应选择合适的距离噪声方差或标准差所对应的信号强度作为目标信号强度。其中,合适的距离噪声方差或标准差是指该距离噪声方差所对应的目标信号强度满足测距精度的要求且可以获得正确的相位解缠系数。In a specific embodiment, the relationship between the variance or standard deviation of the measured distance noise at different frequencies and the received signal strength is combined to determine the high-frequency target signal strength and the low-frequency target signal strength. Specifically, when the distance noise variance corresponding to the reference signal strength is determined by the relationship curve between the distance noise variance or standard deviation and the received signal strength, the signal strength corresponding to the appropriate distance noise variance or standard deviation should be selected as the target Signal strength. Wherein, the appropriate distance noise variance or standard deviation means that the target signal strength corresponding to the distance noise variance meets the requirements of ranging accuracy and the correct phase unwrapping coefficient can be obtained.
在一种实施方式中,计算所述低频曝光时间的一种具体公式如下:In an embodiment, a specific formula for calculating the low-frequency exposure time is as follows:
Figure PCTCN2019113038-appb-000001
Figure PCTCN2019113038-appb-000001
其中,A 2L表示低频目标信号强度,A 1表示参考信号强度,b为每个组合的像素的数量,T 1为预设时间。 Among them, A 2L represents the low-frequency target signal strength, A 1 represents the reference signal strength, b is the number of pixels in each combination, and T 1 is the preset time.
在一种实施方式中,所述参考信号强度为所述预曝光图像的所有像素的平均信号强度;或者,所述参考信号强度为所述预曝光图像的特征像素的平均信号强度;其中,所述特征像素表征所述预曝光图像的特征区域所对应的像素。如此,可以提高对所述高频曝光时间和所述低频曝光时间计算的精度。In an embodiment, the reference signal intensity is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the average signal intensity of the characteristic pixels of the pre-exposure image; wherein, The characteristic pixels represent pixels corresponding to the characteristic regions of the pre-exposure image. In this way, the calculation accuracy of the high-frequency exposure time and the low-frequency exposure time can be improved.
在一种实施方式中,所述根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之前的距离,包括:计算所述高频曝光图像中的每个像素的高频相位延迟信息, 以及计算所述低频曝光图像中组合后的每个像素的低频相位延迟信息;对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样以得到与所述高频曝光图像分辨率相同的低频曝光图像;根据每个像素的高频相位延迟信息和每个像素的低频相位延迟信息计算得出每个像素的高频解缠系数;根据每个像素的高频解缠系数和每个像素的高频相位延迟信息计算每个像素与该像素曝光时所拍摄对象之间的距离。In one embodiment, the calculating the distance between the distance measuring device and the target object based on the high-frequency exposure image and the low-frequency exposure image includes: calculating the high-frequency value of each pixel in the high-frequency exposure image Phase delay information, and calculating the low-frequency phase delay information of each pixel combined in the low-frequency exposure image; up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain The high-frequency exposure image is a low-frequency exposure image with the same resolution; the high-frequency unwrapping coefficient of each pixel is calculated according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel; according to the height of each pixel The frequency unwrapping coefficient and the high-frequency phase delay information of each pixel calculates the distance between each pixel and the subject that the pixel is exposed to.
在本实施方式中,由于对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样以得到与所述高频曝光图像分辨率相同的低频曝光图像,进而可以对组合处理后的图像的进行还原,以提高后续测距的精度。In this embodiment, since the low-frequency phase delay information of each pixel combined in the low-frequency exposure image is up-sampled to obtain the low-frequency exposure image with the same resolution as the high-frequency exposure image, the combination can be processed Restore the subsequent images to improve the accuracy of subsequent ranging.
在一种实施方式中,在进行高频曝光或者低频曝光时,使用连续波调制模式或者脉冲波调制模式,进而可以根据具体需求而采用不同的调制模式,提高了测距方法的适用性。In one embodiment, when performing high-frequency exposure or low-frequency exposure, a continuous wave modulation mode or a pulse wave modulation mode is used, and different modulation modes can be used according to specific requirements, which improves the applicability of the ranging method.
在一种实施方式中,在进行高频曝光时使用连续波调制模式且采用斩波(chopping)技术。如此,可消除高频调制时收集电荷处电容、置位电压和背景光等因素带来的失配,进而可以提升深度信息的精度。In one embodiment, a continuous wave modulation mode and chopping technique are used when performing high-frequency exposure. In this way, the mismatch caused by the capacitance, the set voltage, and the background light at the charge collection site during high-frequency modulation can be eliminated, and the accuracy of the depth information can be improved.
在一种实施方式中,在高频曝光时使用连续波调制模式,在低频曝光使用连续波调制模式或者脉冲波调制模式。如此,可以进一步降低系统功耗。In one embodiment, the continuous wave modulation mode is used for high frequency exposure, and the continuous wave modulation mode or pulse wave modulation mode is used for low frequency exposure. In this way, the power consumption of the system can be further reduced.
在一种实施方式中,在进行高频曝光或者低频曝光时,相邻的像素进行不同相位的曝光,以进一步降低系统功耗。In one embodiment, during high-frequency exposure or low-frequency exposure, adjacent pixels are exposed in different phases to further reduce system power consumption.
第二方面,本申请实施例公开一种测距装置,包括确定模块、曝光模块及计算模块。确定模块用于确定高频曝光时间和低频曝光时间,在确定所述低频曝光时间时对低频像素进行组合处理,并根据组合数确定所述低频曝光时间。曝光模块用于根据所述高频曝光时间进行高频曝光以获得高频曝光图像,以及根据所述低频曝光时间进行低频曝光以获得低频曝光图像。计算模块用于根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之前的距离。In the second aspect, an embodiment of the present application discloses a distance measuring device, which includes a determination module, an exposure module, and a calculation module. The determining module is used to determine the high-frequency exposure time and the low-frequency exposure time, perform combination processing on low-frequency pixels when determining the low-frequency exposure time, and determine the low-frequency exposure time according to the number of combinations. The exposure module is configured to perform high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image, and perform low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image. The calculation module is used to calculate the distance between the distance measuring device and the target object according to the high-frequency exposure image and the low-frequency exposure image.
其中,高频和低频是指测距装置发射的调制信号的频率的高低,是相对而言的,例如,在双频测距技术中,频率较高的称之为高频,而频率较低的则称之为低频。Among them, high frequency and low frequency refer to the frequency of the modulation signal emitted by the ranging device, which is relatively speaking. For example, in dual-frequency ranging technology, the higher frequency is called high frequency, and the lower frequency It is called low frequency.
本申请实施例中的测距装置,由于确定模块在确定所述低频曝光时间时,对低频像素进行了组合处理,进而能够提高低频曝光图像的信噪比,因此,即使在分配较少的时间给低频调制信号时,也可以保证得到正确的相位解缠系数,从而保证测距精度。如此,实现了在保证精度的前提下,减少了系统功耗的目的。In the distance measuring device in the embodiment of the present application, since the determining module performs a combination process on the low-frequency pixels when determining the low-frequency exposure time, the signal-to-noise ratio of the low-frequency exposure image can be improved. Therefore, even when less time is allocated When giving low-frequency modulation signals, it can also ensure that the correct phase unwrapping coefficient is obtained, thereby ensuring the accuracy of ranging. In this way, the purpose of reducing system power consumption is achieved under the premise of ensuring accuracy.
在一种实施方式中,所述确定模块具体用于根据预设时间进行预曝光以获得预曝光图像,并根据所述预曝光图像的每个像素在所述预设时间内接收到的参考信号强度分别确定所述高频曝光时间和所述低频曝光时间。In one embodiment, the determining module is specifically configured to perform pre-exposure according to a preset time to obtain a pre-exposed image, and according to the reference signal received by each pixel of the pre-exposed image within the preset time The intensity determines the high-frequency exposure time and the low-frequency exposure time respectively.
在一种实施方式中,所述确定模块包括获取单元及确定单元。获取单元用于获取所述预曝光图像在所述预设时间接收到的参考信号强度。确定单元用于根据所述参考信号强度分别确定高频目标信号强度和低频目标信号强度。所述确定单元还用于根据所述参考信号强度、所述高频目标信号强度以及所述预设时间计算所述高频曝光时间;以及,根据所述参考信号强度、所述低频目标信号强度、所确定的组合数以及所述预设时间计算所述低频 曝光时间;其中,所述低频曝光时间和每个组合的像素数量呈反比。In an embodiment, the determining module includes an acquiring unit and a determining unit. The acquiring unit is configured to acquire the reference signal intensity received by the pre-exposure image at the preset time. The determining unit is used to determine the high-frequency target signal strength and the low-frequency target signal strength respectively according to the reference signal strength. The determining unit is further configured to calculate the high-frequency exposure time according to the reference signal strength, the high-frequency target signal strength, and the preset time; and, according to the reference signal strength and the low-frequency target signal strength Calculating the low-frequency exposure time based on the determined number of combinations and the preset time; wherein the low-frequency exposure time is inversely proportional to the number of pixels in each combination.
在具体的一种实施方式中,所述确定单元具体用于结合不同频率的测量距离噪声方差或标准差与接收到的信号强度关系曲线来确定高频目标信号强度和低频目标信号强度。具体地,当通过距离噪声方差或标准差与接收到的信号强度关系曲线确定参考信号强度所对应的距离噪声方差较大时,应选择合适的距离噪声方差或标准差所对应的信号强度作为目标信号强度。其中,合适的距离噪声方差或标准差是指该距离噪声方差所对应的目标信号强度满足测距精度的要求且可以获得正确的相位解缠系数。In a specific implementation, the determining unit is specifically configured to determine the high-frequency target signal strength and the low-frequency target signal strength in combination with the relationship curve of the measured distance noise variance or standard deviation of different frequencies and the received signal strength. Specifically, when the distance noise variance corresponding to the reference signal strength is determined by the relationship curve between the distance noise variance or standard deviation and the received signal strength, the signal strength corresponding to the appropriate distance noise variance or standard deviation should be selected as the target Signal strength. Wherein, the appropriate distance noise variance or standard deviation means that the target signal strength corresponding to the distance noise variance meets the requirements of ranging accuracy and the correct phase unwrapping coefficient can be obtained.
在一种实施方式中,所述确定单元用于计算所述低频曝光时间的一种具体公式如下:In an implementation manner, a specific formula used by the determining unit to calculate the low-frequency exposure time is as follows:
Figure PCTCN2019113038-appb-000002
Figure PCTCN2019113038-appb-000002
其中,A2L表示低频目标信号强度,A1表示参考信号强度,b为每个组合的像素的数量,T1为预设时间。Among them, A2L represents the low-frequency target signal strength, A1 represents the reference signal strength, b is the number of pixels in each combination, and T1 is the preset time.
在一种实施方式中,所述参考信号强度为所述预曝光图像的所有像素的平均信号强度;或者,所述参考信号强度为所述预曝光图像的特征像素的平均信号强度;其中,所述特征像素表征所述预曝光图像的特征区域所对应的像素。In an embodiment, the reference signal intensity is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the average signal intensity of the characteristic pixels of the pre-exposure image; wherein, The characteristic pixels represent pixels corresponding to the characteristic regions of the pre-exposure image.
在一种实施方式中,所述计算模块包括计算单元和采样单元。计算单元用于计算所述高频曝光图像中的每个像素的高频相位延迟信息,以及计算所述低频曝光图像中组合后的的每个像素的低频相位延迟信息。采样单元用于对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样以得到与所述高频曝光图像分辨率相同的低频曝光图像。所述计算单元还用于根据每个像素的高频相位延迟信息和每个像素的低频相位延迟信息计算得出每个像素的高频解缠系数;以及根据每个像素的高频解缠系数和每个像素的高频相位延迟信息计算每个像素与该像素曝光时所拍摄对象之间的距离。In an embodiment, the calculation module includes a calculation unit and a sampling unit. The calculation unit is configured to calculate the high-frequency phase delay information of each pixel in the high-frequency exposure image, and calculate the low-frequency phase delay information of each pixel combined in the low-frequency exposure image. The sampling unit is used for up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain a low-frequency exposure image with the same resolution as the high-frequency exposure image. The calculation unit is also used to calculate the high-frequency unwrapping coefficient of each pixel according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel; and according to the high-frequency unwrapping coefficient of each pixel Calculate the distance between each pixel and the subject when the pixel is exposed by using the high-frequency phase delay information of each pixel.
在一种实施方式中,在进行高频曝光或者低频曝光时,使用连续波调制模式或者脉冲波调制模式,进而可以根据具体需求而采用不同的调制模式,提高了测距方法的适用性。In one embodiment, when performing high-frequency exposure or low-frequency exposure, a continuous wave modulation mode or a pulse wave modulation mode is used, and different modulation modes can be used according to specific requirements, which improves the applicability of the ranging method.
在一种实施方式中,在进行高频曝光时使用连续波调制模式且采用斩波(chopping)技术。如此,可消除高频调制时收集电荷处电容、置位电压和背景光等因素带来的失配,进而可以提升深度信息的精度。In one embodiment, a continuous wave modulation mode and chopping technique are used when performing high-frequency exposure. In this way, the mismatch caused by the capacitance, the set voltage, and the background light at the charge collection site during high-frequency modulation can be eliminated, and the accuracy of the depth information can be improved.
在一种实施方式中,在高频曝光时使用连续波调制模式,在低频曝光使用连续波调制模式或者脉冲波调制模式。如此,可以进一步降低系统功耗。In one embodiment, the continuous wave modulation mode is used for high frequency exposure, and the continuous wave modulation mode or pulse wave modulation mode is used for low frequency exposure. In this way, the power consumption of the system can be further reduced.
在一种实施方式中,在进行高频曝光或者低频曝光时,相邻的像素进行不同相位的曝光,以进一步降低系统功耗。In one embodiment, during high-frequency exposure or low-frequency exposure, adjacent pixels are exposed in different phases to further reduce system power consumption.
第三方面,本申请提供一种测距装置,包括发射器、接收传感器和处理器。所述处理器分别和所述发射器和所述接收器耦合。所述处理器用于执行如第一方面以及第一方面中任一可能的实现方式描述的方法。In a third aspect, the present application provides a distance measuring device, including a transmitter, a receiving sensor, and a processor. The processor is respectively coupled with the transmitter and the receiver. The processor is configured to execute the method described in the first aspect and any possible implementation manner in the first aspect.
第四方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质存储有计算 机程序,该计算机程序包含至少一段代码,该至少一段代码可由计算机执行,以控制所述计算机执行如第一方面以及第一方面中任一可能的实现方式描述的方法。In a fourth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer, to control the computer to execute such as the first One aspect and the method described in any possible implementation of the first aspect.
第五方面,本申请提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。In a fifth aspect, the present application provides a computer program product containing instructions. When the computer program product is run on an electronic device, the electronic device is caused to perform the operations described in the first aspect and any one of the possible implementation manners in the first aspect. method.
附图说明Description of the drawings
图1为背景技术中的TOF相机的测距原理示意图。Fig. 1 is a schematic diagram of the ranging principle of a TOF camera in the background art.
图2为本申请一实施例中的测距装置的结构示意图。FIG. 2 is a schematic structural diagram of a distance measuring device in an embodiment of the application.
图3为本申请另一实施例中的测距装置的结构示意图FIG. 3 is a schematic structural diagram of a distance measuring device in another embodiment of the application
图4为本申请一实施例中的测距方法的流程图。FIG. 4 is a flowchart of a distance measurement method in an embodiment of this application.
图5为步骤S11的细节流程图。Fig. 5 is a detailed flowchart of step S11.
图6为步骤S13的细节流程图。Fig. 6 is a detailed flowchart of step S13.
图7为本申请一实施例中的测距装置的功能模块图。Fig. 7 is a functional block diagram of a distance measuring device in an embodiment of the application.
图8为确定模块的子功能模块图。Figure 8 is a diagram of the sub-function modules of the determining module.
图9为计算模块的子功能模块图。Figure 9 is a diagram of the sub-function modules of the computing module.
具体实施方式Detailed ways
本申请实施例提供一种测距装置及应用于该测距装置中的测距方法,所述测距方法可以在测距精度不变的情况下降低功耗。具体地,所述测距方法通过调整高频曝光和低频曝光的时间的占比来实现上述功能,如通过对低频像素进行组合处理来降低低频曝光时间,进而解决因低频信噪比过低而导致的相位解缠失败的问题。下面结合附图,对本申请的实施例进行描述。The embodiments of the present application provide a ranging device and a ranging method applied to the ranging device. The ranging method can reduce power consumption while the ranging accuracy is unchanged. Specifically, the distance measurement method achieves the above-mentioned functions by adjusting the proportion of the time of high-frequency exposure and low-frequency exposure, such as reducing the low-frequency exposure time by combining low-frequency pixels, thereby solving the problem of low-frequency signal-to-noise ratio. Causes the problem of phase unwrapping failure. The embodiments of the present application will be described below in conjunction with the drawings.
请参阅图2,图2为本申请一实施例中的测距装置的结构示意图。所述测距装置100包括发射器10、接收器20以及处理器30。所述发射器10用于发射光信号。所述发射器10可以是发光二极管(Light Emitting Diode,LED)或激光二极管(Laser Diode,LD)。其中,激光的准直性好、能量高,采用激光发射器相较于相同数量的LED灯,可探测范围大,更加适用于远距离的探测。Please refer to FIG. 2, which is a schematic structural diagram of a distance measuring device in an embodiment of the application. The distance measuring device 100 includes a transmitter 10, a receiver 20 and a processor 30. The transmitter 10 is used to transmit optical signals. The transmitter 10 may be a light emitting diode (Light Emitting Diode, LED) or a laser diode (Laser Diode, LD). Among them, the laser has good collimation and high energy. Compared with the same number of LED lights, the laser emitter has a larger detection range and is more suitable for long-distance detection.
所述接收器20用于接收由目标对象200反射的光信号。具体的,所述接收器20由二维布置的多个像素(图未示)构成。所述接收器20用于进行在每个像素处的反射光的接收操作,并且产生与通过光接收操作而获得的反射光的光量(接收到的光量)对应的电荷。其中,所述接收器20可包括感光元件,所述感光元件包括如下至少一种:光电二极管、雪崩光电二极管、电荷耦合元件。The receiver 20 is used to receive the light signal reflected by the target object 200. Specifically, the receiver 20 is composed of a plurality of pixels (not shown) arranged in two dimensions. The receiver 20 is used to perform a receiving operation of reflected light at each pixel, and to generate an electric charge corresponding to the light amount of the reflected light (received light amount) obtained by the light receiving operation. Wherein, the receiver 20 may include a photosensitive element, and the photosensitive element includes at least one of the following: a photodiode, an avalanche photodiode, and a charge-coupled element.
所述处理器30用于根据所述发射单元10发射的光信号和所述接收单元20接收到的由目标对象200反射的光信号,确定目标对象200与测距装置100之间的距离。具体的,所述处理器30用于确定所述发射单元10发射的光信号和所述接收单元20接收到的由目标对 象200反射的光信号之间相位差,并根据该相位差确定目标对象200与测距装置100之间的距离。The processor 30 is configured to determine the distance between the target object 200 and the distance measuring device 100 according to the optical signal emitted by the transmitting unit 10 and the optical signal reflected by the target object 200 received by the receiving unit 20. Specifically, the processor 30 is configured to determine the phase difference between the optical signal emitted by the transmitting unit 10 and the optical signal reflected by the target object 200 received by the receiving unit 20, and determine the target object according to the phase difference The distance between 200 and the distance measuring device 100.
所述处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述测距装置100的控制中心,利用各种接口和线路连接整个所述测距装置100的各个部分。The processor 30 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the distance measuring device 100, and various interfaces and lines are used to connect the entire distance measuring device. 100 parts.
其中,所述处理器30控制所述发射器10向目标对象200发射光信号,且经过目标对象200反射的光信号被所述接收器20接收并形成图像的过程称为曝光。The process in which the processor 30 controls the transmitter 10 to emit light signals to the target object 200, and the light signal reflected by the target object 200 is received by the receiver 20 and forms an image is called exposure.
在实际操作过程中,处理器30控制发射器10发射某一频率f L的光信号进行距离探测,并让接收器20进行同频四相位延迟(0度、90度、180度、270度、)曝光一段时间(t L)。曝光结束后,接收器20的曝光值(DCS0 L、DCS1 L、DCS2 L、DCS3 L)传输给处理器30。接下来处理器30控制发射器11发射另一频率f H的光信号进行距离探测,并让接收器20进行同频四相位延迟(0度、90度、180度、270度、)曝光一段时间(t H)。曝光结束后,接收器20的曝光值(DCS0 H、DCS1 H、DCS2 H、DCS3 H)同样也传输给处理器30。处理器30在收到多次曝光的数据后针对每个像素输出一个所测得的距离。 In actual operation, the processor 30 controls the transmitter 10 to transmit an optical signal of a certain frequency f L for distance detection, and allows the receiver 20 to perform the same frequency four-phase delay (0 degrees, 90 degrees, 180 degrees, 270 degrees, ) Exposure for a period of time (t L ). After the exposure, the exposure value of the receiver 20 (DCS0 L, DCS1 L, DCS2 L, DCS3 L) to the processor 30. Next, the processor 30 controls the transmitter 11 to transmit another optical signal of frequency f H for distance detection, and allows the receiver 20 to perform the same frequency four-phase delay (0 degree, 90 degree, 180 degree, 270 degree,) exposure for a period of time. (t H ). After the exposure, the exposure value (DCS0 H, DCS1 H, DCS2 H, DCS3 H) receiver 20 is also transmitted to the processor 30. The processor 30 outputs a measured distance for each pixel after receiving the data of multiple exposures.
请参阅图3,其为本申请另一实施例中的测距装置100的结构示意图。在本申请实施例中,与图2中所示的测距装置不同的是,所述测距装置100还包括驱动单元40、镜头50和A/D转换单元60。所述驱动单元12连接于所述处理器30和所述发射器10之间,用于驱动所述发射器10发射光信号。所述镜头50用于汇聚由目标对象200反射的光信号。所述A/D转换单元60连接于所述接收器20和所述处理器30之间,用于对来自所述接收器20的像素信号进行A/D转换,并将转换后的像素信号输出至处理器30。Please refer to FIG. 3, which is a schematic structural diagram of a distance measuring device 100 in another embodiment of the application. In the embodiment of the present application, different from the distance measuring device shown in FIG. 2, the distance measuring device 100 further includes a driving unit 40, a lens 50 and an A/D conversion unit 60. The driving unit 12 is connected between the processor 30 and the transmitter 10 for driving the transmitter 10 to emit light signals. The lens 50 is used to converge the light signal reflected by the target object 200. The A/D conversion unit 60 is connected between the receiver 20 and the processor 30, and is configured to perform A/D conversion on the pixel signal from the receiver 20 and output the converted pixel signal To processor 30.
本申请实施例中的测距装置100采用双频测距技术进行测距。下面对双频测距技术原理进行详细的介绍。The distance measurement device 100 in the embodiment of the present application uses a dual-frequency distance measurement technology to perform distance measurement. The principle of dual-frequency ranging technology is described in detail below.
本申请实施例中的双频测距是指采用一个低频率的调制信号和一个高频率的调制信号分别进行曝光来探测距离。其中,高频和低频是相对而言的,例如,在双频测距技术中所采用的两个频率的调制信号,其中频率较高的称之为高频,而频率较低的则称之为低频。在实际使用中,高频和低频的频率可相差2倍左右,例如,低频为100MHz,高频为250MHz,但不限于此,具体可依据实际的测距需求而进行设定。The dual-frequency ranging in the embodiments of the present application refers to using a low-frequency modulation signal and a high-frequency modulation signal to respectively perform exposure to detect the distance. Among them, high frequency and low frequency are relative terms. For example, the two-frequency modulation signal used in dual-frequency ranging technology, of which the higher frequency is called high frequency, and the lower frequency is called For low frequency. In actual use, the frequency of the high frequency and the low frequency can be different by about 2 times, for example, the low frequency is 100 MHz, and the high frequency is 250 MHz, but it is not limited to this, and can be specifically set according to actual ranging requirements.
由于高频信号在进行测距时的模糊距离比较小,例如250MHz对应的模糊距离为0.6m,所以超过0.6m之外的物体,在仅使用250MHz波形对其进行探测时,距离测不准。100MHz对应的模糊距离为1.5m,所以超过1.5m之外的物体在仅使用100MHz波形对其进行探测时,距离测不准。但是100MHz+250MHz的信号搭配工作时的最小工作距离则变成了3m。因此,在3m内对任一像素在某频率测距时,其所测试距离d L、d H由两个变量所决定,一个是解缠系数n L、n H,一个是相位延迟Φ H、Φ L。具体公式如下所示: Since the ambiguity distance of the high-frequency signal during ranging is relatively small, for example, the ambiguity distance corresponding to 250MHz is 0.6m, so when the object exceeds 0.6m, when only the 250MHz waveform is used to detect it, the distance measurement is not accurate. The fuzzy distance corresponding to 100MHz is 1.5m, so when the object beyond 1.5m is detected using only 100MHz waveform, the distance cannot be measured accurately. But the minimum working distance when working with 100MHz+250MHz signals becomes 3m. Therefore, when measuring any pixel at a certain frequency within 3m, the tested distances d L and d H are determined by two variables, one is the unwrapping coefficient n L , n H , and the other is the phase delay Φ H , Φ L. The specific formula is as follows:
Figure PCTCN2019113038-appb-000003
Figure PCTCN2019113038-appb-000003
Figure PCTCN2019113038-appb-000004
Figure PCTCN2019113038-appb-000004
Figure PCTCN2019113038-appb-000005
Figure PCTCN2019113038-appb-000005
其中,c为光速(3*10 8m/s);两个解缠系数用于恢复每个频率的真实相位延迟,可通过解缠算法计算获得;而相位延迟则是通过接收器20的曝光值(DCS0、DCS1、DCS2、DCS3)计算得到;D为模糊距离。 Among them, c is the speed of light (3*10 8 m/s); two unwrapping coefficients are used to restore the true phase delay of each frequency, which can be calculated by the unwrapping algorithm; and the phase delay is the exposure of the receiver 20 The values (DCS0, DCS1, DCS2, DCS3) are calculated; D is the fuzzy distance.
下面对双频测距方法的精度进行分析。其中,双频测距误差公式如下:The accuracy of the dual-frequency ranging method is analyzed below. Among them, the dual-frequency ranging error formula is as follows:
Figure PCTCN2019113038-appb-000006
Figure PCTCN2019113038-appb-000006
其中,A pix为像素面积,过大的像素会降低分辨率、尺寸大且成本高;RE为量子效率,又称QE,直接影响系统性能;FF为填充率;φ active为像素接收到的光源发光功率,高效的光源会带来系统功耗的收益;φ ambient为像素接收到的环境光功率,由用户所在的环境、光源、带通滤波器决定;t int为曝光时间,时间不宜过长;N system为系统噪声,由读出电路决定;F mod为调制频率,调整该参数有利于精度提升,但会造成可测距离减小;C mod为调制对比度又称MC,与像素内部电场设计有关,q为常数。 Among them, A pix is the pixel area, too large pixels will reduce the resolution, large size and high cost; RE is quantum efficiency, also known as QE, which directly affects system performance; FF is the fill rate; φ active is the light source received by the pixel Luminous power, an efficient light source will bring benefits to the system power consumption; φambient is the ambient light power received by the pixel, which is determined by the user's environment, light source, and bandpass filter; t int is the exposure time, and the time should not be too long ; N system is the system noise, which is determined by the readout circuit; F mod is the modulation frequency. Adjusting this parameter will improve the accuracy, but will reduce the measurable distance; C mod is the modulation contrast, also known as MC, and is designed with the internal electric field of the pixel Related, q is a constant.
由上述公式可知,提升调制频率可有效提升测试精度,降低测试误差,而其他参数调整对测距误差的影响有限,或很难调整。It can be known from the above formula that increasing the modulation frequency can effectively improve the test accuracy and reduce the test error, while the adjustment of other parameters has limited influence on the ranging error, or it is difficult to adjust.
对于双频测距技术的测距装置100,如果两个频率数值差不多(如正负10%),且两个频率曝光时间相等(如正负10%),则最终输出距离可通过计算两次测量距离的平均获得。如果两个频率差别较大(如差别约50%),有两种方法可以获得测试距离,一种方式是通过求平均,另一种方式是使用高频的测距结果作为最终的输出,低频虽然也参与曝光,但主要是为了求解高频分量的解缠系数,不参与其他计算,因此可让测距装置100尽可能增加高频曝光时间,降低低频曝光时间,只要保证解缠系数计算正确,则可提升测距精度。For the distance measuring device 100 with dual-frequency ranging technology, if the two frequency values are similar (such as plus or minus 10%), and the exposure time of the two frequencies is equal (such as plus or minus 10%), the final output distance can be calculated twice The average of the measured distance is obtained. If the two frequencies are quite different (for example, the difference is about 50%), there are two ways to obtain the test distance, one way is through averaging, the other way is to use the high frequency range measurement result as the final output, low frequency Although it also participates in the exposure, it is mainly to solve the unwrapping coefficient of the high-frequency component and does not participate in other calculations. Therefore, the distance measuring device 100 can be used to increase the high-frequency exposure time and reduce the low-frequency exposure time as long as the unwrapping coefficient is calculated correctly. , Then the accuracy of ranging can be improved.
基于上述对双频测距原理以及误差的分析,本申请实施例将围绕如何在保证测距精度的提下降低系统功耗。具体地,请参阅图4,其为本申请一实施例中的测距方法的流程图。所述测距方法应用于图1或图2中的测距装置100中。所述测距方法包括如下步骤。Based on the foregoing analysis of the dual-frequency ranging principle and error, the embodiments of the present application will focus on how to reduce the power consumption of the system while ensuring the accuracy of the ranging. Specifically, please refer to FIG. 4, which is a flowchart of a ranging method in an embodiment of this application. The distance measurement method is applied to the distance measurement device 100 in FIG. 1 or FIG. 2. The ranging method includes the following steps.
步骤S11,确定高频曝光时间t H和低频曝光时间t L,在确定所述低频曝光时间时对低频像素进行组合处理,并根据组合数确定所述低频曝光时间t LStep S11: Determine a high-frequency exposure time t H and a low-frequency exposure time t L , perform combination processing on low-frequency pixels when determining the low-frequency exposure time, and determine the low-frequency exposure time t L according to the number of combinations.
在本申请实施方式中,对低频像素进行组合处理是指,对低频像素进行binning处理。其中,binning是一种图像读出模式,将相邻的像元中感应的电荷被加在一起,以一个像素的模式读出。binning分为水平方向binning和垂直方向binning,水平方向binning是将相邻的行的电荷加在一起读出,而垂直方向binning是将相邻的列的电荷加在一起读出, binning这一技术的优点是能将几个像素联合起来作为一个像素使用,提高灵敏度,输出速度,降低分辨率,当行和列同时采用binning时,图像的纵横比并不改变,例如,当采用2*2binning时,图像的解析度将减少75%。具体地,可以根据实际需求进行1*1、1*2、2*1、1*3、3*1或2*2的合并组合,在此不做限定。In the embodiments of the present application, performing combination processing on low-frequency pixels refers to performing binning processing on low-frequency pixels. Among them, binning is an image readout mode in which the charges induced in adjacent pixels are added together and read out in a pixel mode. Binning is divided into horizontal direction binning and vertical direction binning. The horizontal direction binning is to add the charges of adjacent rows and read out, while the vertical direction binning is to add the charges of adjacent columns to read out. This technology is binning. The advantage is that several pixels can be combined as one pixel to increase sensitivity, output speed, and reduce resolution. When row and column binning is used at the same time, the aspect ratio of the image does not change, for example, when using 2*2 binning, The image resolution will be reduced by 75%. Specifically, a combination of 1*1, 1*2, 2*1, 1*3, 3*1, or 2*2 can be performed according to actual needs, which is not limited here.
在一实施方式中,为了较快的确定所述高频曝光时间和所述低频曝光时间,可以根据预设时间T1进行预曝光以获得预曝光图像,并根据所述预曝光图像的每个像素在所述预设时间T1内接收到的参考信号强度分别确定所述高频曝光时间和所述低频曝光时间。其中,预曝光可以采用频率较高的调制信号进行,也可以采用频率较低的调制信号进行,在此不做限定。In one embodiment, in order to quickly determine the high-frequency exposure time and the low-frequency exposure time, pre-exposure may be performed according to a preset time T1 to obtain a pre-exposed image, and according to each pixel of the pre-exposed image The strength of the reference signal received within the preset time T1 determines the high-frequency exposure time and the low-frequency exposure time respectively. Among them, the pre-exposure can be performed using a modulation signal with a higher frequency, or a modulation signal with a lower frequency, which is not limited here.
步骤S12,根据所述高频曝光时间进行高频曝光以获得高频曝光图像,以及根据所述低频曝光时间进行低频曝光以获得低频曝光图像。Step S12, performing high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image, and performing low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image.
其中,高频曝光和低频曝光的顺序不做限制。例如,可以先进行高频曝光,也可以先进行低频曝光。Among them, the sequence of high-frequency exposure and low-frequency exposure is not limited. For example, high-frequency exposure may be performed first, or low-frequency exposure may be performed first.
步骤S13,根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之前的距离。Step S13: Calculate the distance between the distance measuring device and the target object according to the high-frequency exposure image and the low-frequency exposure image.
本申请实施例中的测距方法中,由于在确定所述低频曝光时间时,对低频像素进行了组合处理,进而能够提高低频曝光图像的信噪比,因此,即使在分配较少的时间给低频调制信号时,也可以保证得到正确的相位解缠系数,从而保证测距精度。如此,实现了在保证精度的前提下,减少了系统功耗的目的。In the distance measurement method in the embodiment of the present application, since the low-frequency pixels are combined when determining the low-frequency exposure time, the signal-to-noise ratio of the low-frequency exposure image can be improved. Therefore, even if less time is allocated to When the signal is modulated at low frequency, the correct phase unwrapping coefficient can also be ensured, thereby ensuring the accuracy of ranging. In this way, the purpose of reducing system power consumption is achieved under the premise of ensuring accuracy.
请参阅图5,在一实施方式中,所述根据所述预曝光图像在所述预设时间T 1内接收到的信号强度,分别确定所述高频曝光时间t H和所述低频曝光时间t L,具体包括如下步骤。 Referring to FIG. 5, in an embodiment , the high-frequency exposure time t H and the low-frequency exposure time are respectively determined according to the signal strength of the pre-exposure image received within the preset time T 1 t L specifically includes the following steps.
步骤S111,获取所述预曝光图像在所述预设时间T 1接收到的参考信号强度A 1Step S111, the pre-exposure image acquired at the predetermined time T 1 of the received reference signal strength A 1.
在一实施方式中,所述参考信号强度A 1为所述预曝光图像的所有像素的平均信号强度;或者,所述参考信号强度为所述预曝光图像的特征像素的平均信号强度;其中,所述特征像素表征所述预曝光图像的特征区域所对应的像素。例如,当曝光主体为人的脸部时,特征区域可以是鼻子、眼睛和嘴巴所对应的区域,具体的特征区域可以根据实际的曝光主体而确定。 In one embodiment, the reference signal intensity A 1 is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the average signal intensity of the characteristic pixels of the pre-exposure image; wherein, The characteristic pixels represent pixels corresponding to the characteristic regions of the pre-exposure image. For example, when the exposed subject is a human face, the characteristic area may be the area corresponding to the nose, eyes, and mouth, and the specific characteristic area may be determined according to the actual exposed subject.
步骤S112,根据所述参考信号强度A 1分别确定高频目标信号强度A 2H和低频目标信号强度A 2LStep S112: Determine the high-frequency target signal strength A 2H and the low-frequency target signal strength A 2L respectively according to the reference signal strength A 1 .
具体地,可以结合不同频率的测量距离噪声方差或标准差与接收到的信号强度关系曲线来确定高频目标信号强度A 2H和低频目标信号强度A 2L。例如,当通过距离噪声方差或标准差与接收到的信号强度关系曲线确定参考信号强度所对应的距离噪声方差较大时,应选择合适的距离噪声方差或标准差所对应的信号强度作为目标信号强度。其中,合适的距离噪声方差或标准差是指该距离噪声方差所对应的目标信号强度满足测距精度的要求且可以获得正确的相位解缠系数。 Specifically, the relationship curve between the variance or standard deviation of the measured distance noise at different frequencies and the received signal strength can be combined to determine the high-frequency target signal strength A 2H and the low-frequency target signal strength A 2L . For example, when the distance noise variance corresponding to the reference signal strength is determined by the relationship curve of the distance noise variance or standard deviation and the received signal strength, the signal strength corresponding to the appropriate distance noise variance or standard deviation should be selected as the target signal strength. Wherein, the appropriate distance noise variance or standard deviation means that the target signal strength corresponding to the distance noise variance meets the requirements of ranging accuracy and the correct phase unwrapping coefficient can be obtained.
步骤S113,根据所述参考信号强度A 1、所述高频目标信号强度A 2H以及所述预设时间T 1计算所述高频曝光时间t H;以及,根据所述参考信号强度A 1、所述低频目标信号强度A 2L、每个组合的像素数量b以及所述预设时间T 1计算所述低频曝光时间t L;其中,所述 低频曝光时间t L和每个组合的像素数量b呈反比。 Step S113: Calculate the high-frequency exposure time t H according to the reference signal strength A 1 , the high-frequency target signal strength A 2H, and the preset time T 1 ; and, according to the reference signal strength A 1 , The low-frequency target signal intensity A 2L , the number of pixels b of each combination, and the preset time T 1 are used to calculate the low-frequency exposure time t L ; wherein the low-frequency exposure time t L and the number of pixels of each combination b It is inversely proportional.
其中,一种具体计算所述高频曝光时间t H和所述低频曝光时间t L的公式分别如下: Wherein, a formula for specifically calculating the high-frequency exposure time t H and the low-frequency exposure time t L is as follows:
Figure PCTCN2019113038-appb-000007
Figure PCTCN2019113038-appb-000007
Figure PCTCN2019113038-appb-000008
Figure PCTCN2019113038-appb-000008
请参阅图6,在一实施方式中,步骤S13具体包括如下步骤:Referring to FIG. 6, in an embodiment, step S13 specifically includes the following steps:
步骤S131,计算所述高频曝光图像中的每个像素的高频相位延迟信息,以及计算所述低频曝光图像中的每个像素的低频相位延迟信息。Step S131: Calculate the high-frequency phase delay information of each pixel in the high-frequency exposure image, and calculate the low-frequency phase delay information of each pixel in the low-frequency exposure image.
步骤S132,对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样,以得到与所述高频曝光图像分辨率相同的低频曝光图像。Step S132: Up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain a low-frequency exposure image with the same resolution as the high-frequency exposure image.
例如,在对低频像素进行2*2的binning处理后得到的低频曝光图像的分辨率为160*120的每个像素的相位延迟信息,经对组合后的每个像素的低频相位延迟信息进行上采样后得到分辨率为320*240的低频曝光图像的每个像素的相位延迟信息。For example, after performing 2*2 binning processing on low-frequency pixels, the phase delay information of each pixel of the low-frequency exposure image with a resolution of 160*120 is obtained after the combination of the low-frequency phase delay information of each pixel. After sampling, the phase delay information of each pixel of the low-frequency exposure image with a resolution of 320*240 is obtained.
步骤S133,根据每个像素的高频相位延迟信息和每个像素的低频相位延迟信息计算得出每个像素的高频解缠系数。In step S133, the high-frequency unwrapping coefficient of each pixel is calculated according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel.
步骤S134,根据每个像素的高频解缠系数和每个像素的高频相位延迟信息计算每个像素与该像素曝光时所拍摄对象之间的距离。Step S134: Calculate the distance between each pixel and the object photographed when the pixel is exposed according to the high-frequency unwrapping coefficient of each pixel and the high-frequency phase delay information of each pixel.
在本实施方式中,由于对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样以得到与所述高频曝光图像分辨率相同的低频曝光图像,进而可以对组合处理后的图像的进行还原,以提高后续测距的精度。In this embodiment, since the low-frequency phase delay information of each pixel combined in the low-frequency exposure image is up-sampled to obtain the low-frequency exposure image with the same resolution as the high-frequency exposure image, the combination can be processed Restore the subsequent images to improve the accuracy of subsequent ranging.
在一种实施方式中,在进行高频曝光或者低频曝光时,使用连续波调制模式或者脉冲波调制模式。也即,高频曝光可以在连续波调制模式和脉冲波调至模式间切换配置;低频曝光也可在连续波调制模式和脉冲波调至模式间切换配置。其中,可以默认使用连续波调制模式,也可以根据测距装置100的使用环境而进行切换,例如,当测距装置100应用于室内环境时使用连续波调制模式,而当测距装置100应用于室外环境时使用脉冲波调制模式,进而可以根据具体需求而采用不同的调制模式,提高了测距方法的适用性。In one embodiment, when performing high-frequency exposure or low-frequency exposure, a continuous wave modulation mode or a pulse wave modulation mode is used. That is, high-frequency exposure can be switched between continuous wave modulation mode and pulse wave to mode; low-frequency exposure can also be switched between continuous wave modulation mode and pulse wave to mode. Among them, the continuous wave modulation mode can be used by default, or it can be switched according to the use environment of the distance measuring device 100. For example, the continuous wave modulation mode is used when the distance measuring device 100 is applied to an indoor environment, and the continuous wave modulation mode is used when the distance measuring device 100 is applied to an indoor environment. The pulse wave modulation mode is used in the outdoor environment, and different modulation modes can be adopted according to specific needs, which improves the applicability of the ranging method.
具体的,在曝光调制过程中,根据实际像素、系统和应用需求,为了获得景深信息,可将双频中高/低频曝光调制分为1次,2次,3次,4次或以上。其中,本申请实施例中的1次是指一组连续波形,而不是一个周期波形。下面将以具体的实施例对高低频曝光的次数进行详细说明。Specifically, in the exposure modulation process, according to actual pixel, system, and application requirements, in order to obtain depth information, dual-frequency mid-high/low-frequency exposure modulation can be divided into 1, 2, 3, 4 or more times. Among them, once in the embodiment of the present application refers to a group of continuous waveforms, rather than a periodic waveform. The number of high and low frequency exposures will be described in detail below with a specific embodiment.
实施例1:高频曝光使用连续波曝光调制4次,低频曝光使用连续波曝光调制2次,具体参下表。Example 1: Continuous wave exposure modulation is used for high frequency exposure 4 times, and continuous wave exposure modulation is used for low frequency exposure 2 times. Refer to the table below for details.
Figure PCTCN2019113038-appb-000009
Figure PCTCN2019113038-appb-000009
在本申请实施例中,先进行高频曝光调制,后进行低频曝光调制。实际操作中,高频曝光调制和低频曝光调制的顺序可交换。如上表所示,其中f H表示高频曝光调制,f L表示低频曝光调制。A 0表示相位0°的曝光,A 180表示相位180°的曝光,同理A 90表示相位90°的曝光,A 270表示相位270°的曝光。A 0A 180表示相位窗A和相位窗B分别进行相位0°和180°的曝光,A 180A 0表示相位窗A和相位窗B分别进行相位180°和0°的曝光。上表中依次进行高频连续波A 0A 180,A 90A 270,A 180A 0,A 270A 90和低频连续波A 0A 180,A 90A 270的曝光,实际操作中,顺序可交换。本申请实施例中,由于高频调制决定系统精度,在高频调制时采用斩波(chopping)技术(即进行A 0A 180和A 180A 0的曝光)可消除高频调制时收集电荷处电容(增益误差)、置位电压和背景光等因素带来的失配,进而可以提升深度信息的精度。其中,斩波技术也称存储电荷元器件失配消除技术。 In the embodiment of the present application, high-frequency exposure modulation is performed first, and then low-frequency exposure modulation is performed. In actual operation, the sequence of high-frequency exposure modulation and low-frequency exposure modulation can be exchanged. As shown in the above table, f H represents high-frequency exposure modulation, and f L represents low-frequency exposure modulation. A 0 represents an exposure with a phase of 0°, A 180 represents an exposure with a phase of 180°, similarly, A 90 represents an exposure with a phase of 90°, and A 270 represents an exposure with a phase of 270°. A 0 A 180 indicates that the phase window A and the phase window B perform phase 0° and 180° exposure respectively, and A 180 A 0 indicates that the phase window A and the phase window B perform phase 180° and 0° exposure respectively. In the above table, the high-frequency continuous wave A 0 A 180 , A 90 A 270 , A 180 A 0 , A 270 A 90 and the low-frequency continuous wave A 0 A 180 , A 90 A 270 are exposed in sequence. In actual operation, the order can be exchange. In the embodiments of this application, since high-frequency modulation determines the accuracy of the system, the use of chopping technology (that is , exposure of A 0 A 180 and A 180 A 0 ) during high-frequency modulation can eliminate charge collection during high-frequency modulation. The mismatch caused by factors such as capacitance (gain error), set voltage, and background light can improve the accuracy of depth information. Among them, the chopping technology is also called the mismatch elimination technology of stored charge components.
实施例2:高频曝光使用连续波曝光调制4次,低频曝光使用脉冲波曝光调制1次,具体参下表。Embodiment 2: High-frequency exposure uses continuous wave exposure modulation 4 times, and low-frequency exposure uses pulse wave exposure modulation once. See the table below for details.
Figure PCTCN2019113038-appb-000010
Figure PCTCN2019113038-appb-000010
实施例2与实施例1不同的是,低频采用A 0A 180的脉冲波曝光,且曝光1次。由于低频调制获得的距离信息主要进行相位解缠,采用脉冲调制的方式,使用0°和180°的脉冲方式调制,仅通过一次曝光即可获得相位解缠用的深度信息,进而可以进一步降低系统功耗。需要说明的是,实际操作中,可交换相位窗A和相位窗B的脉冲调制相位。 The difference between Embodiment 2 and Embodiment 1 is that the low frequency adopts A 0 A 180 pulse wave exposure, and the exposure is performed once. Since the distance information obtained by low-frequency modulation is mainly phase unwrapping, pulse modulation is used, and 0° and 180° pulse modulation is used. The depth information for phase unwrapping can be obtained through only one exposure, which can further reduce the system Power consumption. It should be noted that in actual operation, the pulse modulation phases of the phase window A and the phase window B can be exchanged.
实施例3:高频曝光使用连续波曝光调制2次,低频曝光使用连续波曝光调制2次,具体参下表。Embodiment 3: High-frequency exposure uses continuous wave exposure modulation twice, and low-frequency exposure uses continuous wave exposure modulation twice. See the table below for details.
Figure PCTCN2019113038-appb-000011
Figure PCTCN2019113038-appb-000011
本申请实施例中,依次进行高频连续波的A 0A 180,A 90A 270和低频连续波A 0A 180,A 90A 270的曝光,实际操作中,高频曝光和低频曝光的顺序可交换。本示例中,高频调制没有采用斩波技术来消除由工艺、器件和环境因素造成的失调,深度信息的精度会相对降低,但功耗也会相应降低。 In the embodiment of the present application, the high-frequency continuous wave A 0 A 180 , A 90 A 270 and the low-frequency continuous wave A 0 A 180 , A 90 A 270 are sequentially exposed. In actual operation, the sequence of high-frequency exposure and low-frequency exposure Can be exchanged. In this example, the high-frequency modulation does not use chopping technology to eliminate the offset caused by process, device and environmental factors. The accuracy of the depth information will be relatively reduced, but the power consumption will be reduced accordingly.
实施例4:高频曝光使用连续波曝光调制2次,低频曝光使用脉冲波曝光调制1次,具体参下表。Embodiment 4: High-frequency exposure uses continuous wave exposure modulation twice, and low-frequency exposure uses pulse wave exposure modulation once. See the table below for details.
Figure PCTCN2019113038-appb-000012
Figure PCTCN2019113038-appb-000012
本申请实施例中,依次进行高频连续波A 0A 180,A 90A 270和低频脉冲波A 0A 180的曝光。实际操作中,高频曝光和低频曝光的顺序可交换。本申请实施例中,高频调制没有采用斩波技术来消除由工艺、器件和环境因素造成的失调,深度信息的精度会相对降低,但功耗也会相应降低。低频曝光调制仅通过一次曝光即获得相位解缠用的深度信息,进一步降低整体功耗。需要说明的是,实际操作中,可交换相位窗A和相位窗B的脉冲调制相位。 In the embodiment of the present application, the exposure of the high-frequency continuous wave A 0 A 180 , A 90 A 270 and the low-frequency pulse wave A 0 A 180 are sequentially performed. In actual operation, the sequence of high-frequency exposure and low-frequency exposure can be exchanged. In the embodiments of the present application, the high-frequency modulation does not use the chopping technology to eliminate the misalignment caused by the process, the device, and the environmental factors. The accuracy of the depth information will be relatively reduced, but the power consumption will be reduced accordingly. Low-frequency exposure modulation can obtain depth information for phase unwrapping with only one exposure, further reducing overall power consumption. It should be noted that in actual operation, the pulse modulation phases of the phase window A and the phase window B can be exchanged.
需要说明的是,以上几种曝光组合仅仅是示例,其它相似原理的曝光调制次数组合也包括在本申请保护范围内。此外,曝光时将像素在空间上分开,即相邻像素进行不同相位的曝光,可以进一步降低功耗,只要原理相同,也包括在本申请所保护范围内。It should be noted that the above exposure combinations are only examples, and other exposure modulation times combinations with similar principles are also included in the protection scope of the present application. In addition, the pixels are spatially separated during exposure, that is, adjacent pixels are exposed to different phases, which can further reduce power consumption. As long as the principle is the same, it is also included in the scope of protection of the present application.
本申请实施例中,处理器30用于执行上述任一实施方式中的测距方法。In the embodiment of the present application, the processor 30 is configured to execute the ranging method in any of the foregoing implementation manners.
请参阅图7,其为本申请一实施例中的测距装置100的功能模块图。在本申请实施例中,所述测距装置100包括确定模块110、曝光模块120及计算模块130。其中,所述确定模块110可以用于实现上述方法实施例中步骤S11所示的方法;所述曝光模块120可以用于实现上述方法实施例中步骤S12所示的方法;所述计算模块130可以用于实现上述方法实施例中步骤S13所示的方法。Please refer to FIG. 7, which is a functional block diagram of the distance measuring device 100 in an embodiment of the application. In the embodiment of the present application, the distance measuring device 100 includes a determination module 110, an exposure module 120, and a calculation module 130. Wherein, the determination module 110 may be used to implement the method shown in step S11 in the foregoing method embodiment; the exposure module 120 may be used to implement the method shown in step S12 in the foregoing method embodiment; the calculation module 130 may It is used to implement the method shown in step S13 in the foregoing method embodiment.
请参阅图8,在一实施方式中,所述确定模块110包括获取单元111和确定单元112。所述获取单元111可以用于实现上述方法实施例中步骤S111所示的方法;所述确定单元可以分别用于实现上述方法实施例中步骤S112和步骤S113所示的方法。Referring to FIG. 8, in an embodiment, the determining module 110 includes an acquiring unit 111 and a determining unit 112. The acquiring unit 111 may be used to implement the method shown in step S111 in the foregoing method embodiment; the determining unit may be respectively used to implement the method shown in step S112 and step S113 in the foregoing method embodiment.
请参阅图9,在一实施方式中,所述计算模块130包括计算单元131和采样单元132。所述计算单元131可以用于实现上述方法实施例中步骤S131所示的方法。所述采样单元132可以用于实现上述方法实施例中步骤S132所示的方法。所述计算单元131还可以用于实现上述方法实施例中步骤S133及步骤S134所示的方法。Please refer to FIG. 9. In an embodiment, the calculation module 130 includes a calculation unit 131 and a sampling unit 132. The calculation unit 131 may be used to implement the method shown in step S131 in the foregoing method embodiment. The sampling unit 132 may be used to implement the method shown in step S132 in the foregoing method embodiment. The calculation unit 131 may also be used to implement the methods shown in step S133 and step S134 in the foregoing method embodiment.
本申请的各实施方式可以任意进行组合,以实现不同的技术效果。The various embodiments of the present application can be combined arbitrarily to achieve different technical effects.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部 分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions described in this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk).
总之,以上所述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In short, the above descriptions are only examples of the technical solutions of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims (16)

  1. 一种测距方法,其特征在于,包括:A ranging method, characterized in that it comprises:
    确定高频曝光时间和低频曝光时间;其中,在确定所述低频曝光时间时,对低频像素进行组合处理,并根据每个组合的像素数量确定所述低频曝光时间;Determine the high-frequency exposure time and the low-frequency exposure time; wherein, when determining the low-frequency exposure time, combine processing of low-frequency pixels, and determine the low-frequency exposure time according to the number of pixels in each combination;
    根据所述高频曝光时间进行高频曝光以获得高频曝光图像,以及根据所述低频曝光时间进行低频曝光以获得低频曝光图像;Performing high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image, and performing low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image;
    根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之间的距离。The distance between the distance measuring device and the target object is calculated according to the high-frequency exposure image and the low-frequency exposure image.
  2. 如权利要求1所述的测距方法,其特征在于,所述确定高频曝光时间和低频曝光时间,包括:The distance measuring method according to claim 1, wherein the determining the high-frequency exposure time and the low-frequency exposure time comprises:
    进行预设时间的预曝光以获得预曝光图像,并根据所述预曝光图像在所述预设时间内接收到的参考信号强度分别确定所述高频曝光时间和所述低频曝光时间。A pre-exposure for a preset time is performed to obtain a pre-exposed image, and the high-frequency exposure time and the low-frequency exposure time are respectively determined according to the strength of the reference signal received by the pre-exposure image within the preset time.
  3. 如权利要求2所述的测距方法,其特征在于,所述根据所述预曝光图像在所述预设时间内接收到的信号强度,分别确定所述高频曝光时间和所述低频曝光时间,包括:The distance measuring method according to claim 2, wherein the high-frequency exposure time and the low-frequency exposure time are respectively determined according to the signal intensity received by the pre-exposure image within the preset time ,include:
    获取所述预曝光图像在所述预设时间内接收到的参考信号强度;Acquiring the reference signal strength of the pre-exposure image received within the preset time;
    根据所述参考信号强度分别确定高频目标信号强度和低频目标信号强度;Respectively determine the high-frequency target signal strength and the low-frequency target signal strength according to the reference signal strength;
    根据所述参考信号强度、所述高频目标信号强度以及所述预设时间计算所述高频曝光时间;以及,根据所述参考信号强度、所述低频目标信号强度、每个组合的像素数量以及所述预设时间计算所述低频曝光时间;其中,所述低频曝光时间和每个组合的像素数量呈反比。Calculate the high-frequency exposure time according to the reference signal strength, the high-frequency target signal strength, and the preset time; and, according to the reference signal strength, the low-frequency target signal strength, and the number of pixels in each combination And the preset time is used to calculate the low-frequency exposure time; wherein the low-frequency exposure time is inversely proportional to the number of pixels in each combination.
  4. 如权利要求3所述的测距方法,其特征在于,所述参考信号强度为所述预曝光图像的所有像素的平均信号强度;或者,所述参考信号强度为所述预曝光图像的特征像素的平均信号强度;其中,所述特征像素表征所述预曝光图像的特征区域所对应的像素。The distance measurement method according to claim 3, wherein the reference signal intensity is the average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is the characteristic pixel of the pre-exposure image The average signal intensity of the; wherein, the characteristic pixel characterizes the pixel corresponding to the characteristic area of the pre-exposure image.
  5. 如权利要求1-4任一项所述的测距方法,其特征在于,所述根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之前的距离,包括:The distance measuring method according to any one of claims 1 to 4, wherein the calculating the distance between the distance measuring device and the target object according to the high-frequency exposure image and the low-frequency exposure image comprises:
    计算所述高频曝光图像中的每个像素的高频相位延迟信息,以及计算所述低频曝光图像中组合后的每个像素的低频相位延迟信息;Calculating the high-frequency phase delay information of each pixel in the high-frequency exposure image, and calculating the low-frequency phase delay information of each pixel after the combination in the low-frequency exposure image;
    对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样以得到与所述高频曝光图像分辨率相同的低频曝光图像;Up-sampling the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain a low-frequency exposure image with the same resolution as the high-frequency exposure image;
    根据每个像素的高频相位延迟信息和每个像素的低频相位延迟信息计算得出每个像素的高频解缠系数;Calculate the high-frequency unwrapping coefficient of each pixel according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel;
    根据每个像素的高频解缠系数和每个像素的高频相位延迟信息计算每个像素与该像素曝光时所拍摄对象之间的距离。According to the high-frequency unwrapping coefficient of each pixel and the high-frequency phase delay information of each pixel, the distance between each pixel and the subject that the pixel is exposed to is calculated.
  6. 如权利要求1所述的测距方法,其特征在于,在进行低频曝光时,使用连续波调制模式或者脉冲波调制模式。The distance measurement method according to claim 1, wherein the continuous wave modulation mode or the pulse wave modulation mode is used when performing low-frequency exposure.
  7. 如权利要求1所述的测距方法,其特征在于,在进行高频曝光或者低频曝光时,相邻的像素进行不同相位的曝光。The distance measuring method according to claim 1, wherein when performing high-frequency exposure or low-frequency exposure, adjacent pixels are exposed in different phases.
  8. 一种测距装置,其特征在于,包括:A distance measuring device, characterized in that it comprises:
    确定模块,用于确定高频曝光时间和低频曝光时间,在确定所述低频曝光时间时对低频像素进行组合处理,并根据组合数确定所述低频曝光时间;A determining module, configured to determine high-frequency exposure time and low-frequency exposure time, perform combination processing on low-frequency pixels when determining the low-frequency exposure time, and determine the low-frequency exposure time according to the number of combinations;
    曝光模块,用于根据所述高频曝光时间进行高频曝光以获得高频曝光图像,以及根据所述低频曝光时间进行低频曝光以获得低频曝光图像;以及An exposure module for performing high-frequency exposure according to the high-frequency exposure time to obtain a high-frequency exposure image, and performing low-frequency exposure according to the low-frequency exposure time to obtain a low-frequency exposure image; and
    计算模块,用于根据所述高频曝光图像和所述低频曝光图像计算测距装置与目标对象之前的距离。The calculation module is used to calculate the distance between the distance measuring device and the target object according to the high-frequency exposure image and the low-frequency exposure image.
  9. 如权利要求8所述的测距装置,其特征在于,所述确定模块具体用于根据预设时间进行预曝光以获得预曝光图像,并根据所述预曝光图像的每个像素在所述预设时间内接收到的参考信号强度分别确定所述高频曝光时间和所述低频曝光时间。The distance measuring device according to claim 8, wherein the determining module is specifically configured to perform pre-exposure according to a preset time to obtain a pre-exposure image, and according to each pixel of the pre-exposure image in the pre-exposure It is assumed that the intensity of the reference signal received within the time period respectively determines the high-frequency exposure time and the low-frequency exposure time.
  10. 如权利要求9所述的测距装置,其特征在于,所述确定模块包括:The distance measuring device according to claim 9, wherein the determining module comprises:
    获取单元,用于获取所述预曝光图像在所述预设时间接收到的参考信号强度;以及An obtaining unit, configured to obtain the reference signal strength of the pre-exposure image received at the preset time; and
    确定单元,用于根据所述参考信号强度分别确定高频目标信号强度和低频目标信号强度;The determining unit is configured to determine the high-frequency target signal strength and the low-frequency target signal strength respectively according to the reference signal strength;
    所述确定单元还用于根据所述参考信号强度、所述高频目标信号强度以及所述预设时间计算所述高频曝光时间;以及,根据所述参考信号强度、所述低频目标信号强度、所确定的组合数以及所述预设时间计算所述低频曝光时间;其中,所述低频曝光时间和每个组合的像素数量呈反比。The determining unit is further configured to calculate the high-frequency exposure time according to the reference signal strength, the high-frequency target signal strength, and the preset time; and, according to the reference signal strength and the low-frequency target signal strength Calculating the low-frequency exposure time based on the determined number of combinations and the preset time; wherein the low-frequency exposure time is inversely proportional to the number of pixels in each combination.
  11. 如权利要求10所述的测距装置,其特征在于,所述参考信号强度为所述预曝光图像的所有像素的平均信号强度;或者,所述参考信号强度为所述预曝光图像的特征像素的平均信号强度;其中,所述特征像素表征所述预曝光图像的特征区域所对应的像素。The distance measuring device according to claim 10, wherein the reference signal intensity is an average signal intensity of all pixels of the pre-exposure image; or, the reference signal intensity is a characteristic pixel of the pre-exposure image The average signal intensity of the; wherein, the characteristic pixel characterizes the pixel corresponding to the characteristic area of the pre-exposure image.
  12. 如权利要求8-11任一项所述的测距装置,其特征在于,所述计算模块包括:The distance measuring device according to any one of claims 8-11, wherein the calculation module comprises:
    计算单元,用于计算所述高频曝光图像中的每个像素的高频相位延迟信息,以及计算所述低频曝光图像中组合后的的每个像素的低频相位延迟信息;以及A calculation unit for calculating the high-frequency phase delay information of each pixel in the high-frequency exposure image, and calculating the low-frequency phase delay information of each pixel combined in the low-frequency exposure image; and
    采样单元,用于对所述低频曝光图像中组合后的每个像素的低频相位延迟信息进行上采样以得到与所述高频曝光图像分辨率相同的低频曝光图像;A sampling unit, configured to up-sample the low-frequency phase delay information of each pixel combined in the low-frequency exposure image to obtain a low-frequency exposure image with the same resolution as the high-frequency exposure image;
    所述计算单元还用于根据每个像素的高频相位延迟信息和每个像素的低频相位延迟信息计算得出每个像素的高频解缠系数;以及The calculation unit is further configured to calculate the high-frequency unwrapping coefficient of each pixel according to the high-frequency phase delay information of each pixel and the low-frequency phase delay information of each pixel; and
    根据每个像素的高频解缠系数和每个像素的高频相位延迟信息计算每个像素与该像素曝光时所拍摄对象之间的距离。According to the high-frequency unwrapping coefficient of each pixel and the high-frequency phase delay information of each pixel, the distance between each pixel and the subject that the pixel is exposed to is calculated.
  13. 如权利要求8所述的测距装置,其特征在于,在进行低频曝光时使用连续波调制模式或者脉冲波调制模式。8. The distance measuring device according to claim 8, wherein the continuous wave modulation mode or the pulse wave modulation mode is used when performing low-frequency exposure.
  14. 如权利要求8所述的测距装置,其特征在于,在进行高频曝光或者低频曝光时,相邻的像素进行不同相位的曝光。8. The distance measuring device according to claim 8, wherein when performing high-frequency exposure or low-frequency exposure, adjacent pixels are exposed to different phases.
  15. 一种测距装置,其特征在于,包括发射器、接收传感器和处理器;所述处理器分别和所述发射器和所述接收器耦合;所述处理器用于执行如权利要求1-7任一项所述的测距方法。A distance measuring device, characterized in that it comprises a transmitter, a receiving sensor and a processor; the processor is respectively coupled with the transmitter and the receiver; the processor is used to execute any of claims 1-7 The ranging method described in one item.
  16. 一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序包含至少一段代码,该至少一段代码可由计算机执行,以控制所述计算机执行如权利要求1-7任一项所述的测距方法。A computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program contains at least one piece of code, the at least one piece of code can be executed by a computer to control the computer to execute any one of claims 1-7 The described distance measurement method.
PCT/CN2019/113038 2019-10-24 2019-10-24 Ranging method, ranging device, and computer-readable storage medium WO2021077358A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/113038 WO2021077358A1 (en) 2019-10-24 2019-10-24 Ranging method, ranging device, and computer-readable storage medium
CN201980101481.6A CN114556048B (en) 2019-10-24 2019-10-24 Ranging method, ranging apparatus, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/113038 WO2021077358A1 (en) 2019-10-24 2019-10-24 Ranging method, ranging device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2021077358A1 true WO2021077358A1 (en) 2021-04-29

Family

ID=75620323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/113038 WO2021077358A1 (en) 2019-10-24 2019-10-24 Ranging method, ranging device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN114556048B (en)
WO (1) WO2021077358A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024116047A1 (en) * 2022-11-30 2024-06-06 Cilag Gmbh International Pixel binning on a per-frame basis

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100310246A1 (en) * 2009-06-04 2010-12-09 Digital Imaging Systems Gmbh Method for using a variable aperture to tune image quality parameters in a camera system
CN104853113A (en) * 2015-05-15 2015-08-19 零度智控(北京)智能科技有限公司 Adaptive camera exposure time adjustment device and method
CN105651245A (en) * 2014-11-12 2016-06-08 原相科技股份有限公司 Optical ranging system and optical ranging method
CN105872392A (en) * 2015-01-23 2016-08-17 原相科技股份有限公司 Optical distance measuring system enabling dynamic exposure time
CN106289158A (en) * 2015-06-24 2017-01-04 三星电机株式会社 Distance detection device and include the camera model of this distance detection device
US20180302545A1 (en) * 2015-01-13 2018-10-18 Pixart Imaging Inc. Optical measurement system with dynamic exposure time and operating method therefor

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5171158B2 (en) * 2007-08-22 2013-03-27 浜松ホトニクス株式会社 Solid-state imaging device and range image measuring device
US8629976B2 (en) * 2007-10-02 2014-01-14 Microsoft Corporation Methods and systems for hierarchical de-aliasing time-of-flight (TOF) systems
CN104833979B (en) * 2015-04-27 2017-03-15 北京航天控制仪器研究所 A kind of method of the signal transacting of laser ranging and laser ranging data
US10191154B2 (en) * 2016-02-11 2019-01-29 Massachusetts Institute Of Technology Methods and apparatus for time-of-flight imaging
CN106686319B (en) * 2016-12-27 2019-07-16 浙江大华技术股份有限公司 A kind of control method and its device of image exposure
WO2019037088A1 (en) * 2017-08-25 2019-02-28 深圳市大疆创新科技有限公司 Exposure control method and device, and unmanned aerial vehicle
CN108132458B (en) * 2017-12-22 2020-07-17 北京锐安科技有限公司 Indoor distance measuring method, device, equipment and storage medium
CN109597091B (en) * 2018-12-28 2022-11-11 豪威科技(武汉)有限公司 Phase unwrapping method for TOF ranging and TOF ranging system
CN109903241B (en) * 2019-01-31 2021-06-15 武汉市聚芯微电子有限责任公司 Depth image calibration method and system of TOF camera system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100310246A1 (en) * 2009-06-04 2010-12-09 Digital Imaging Systems Gmbh Method for using a variable aperture to tune image quality parameters in a camera system
CN105651245A (en) * 2014-11-12 2016-06-08 原相科技股份有限公司 Optical ranging system and optical ranging method
US20180302545A1 (en) * 2015-01-13 2018-10-18 Pixart Imaging Inc. Optical measurement system with dynamic exposure time and operating method therefor
CN105872392A (en) * 2015-01-23 2016-08-17 原相科技股份有限公司 Optical distance measuring system enabling dynamic exposure time
CN104853113A (en) * 2015-05-15 2015-08-19 零度智控(北京)智能科技有限公司 Adaptive camera exposure time adjustment device and method
CN106289158A (en) * 2015-06-24 2017-01-04 三星电机株式会社 Distance detection device and include the camera model of this distance detection device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024116047A1 (en) * 2022-11-30 2024-06-06 Cilag Gmbh International Pixel binning on a per-frame basis

Also Published As

Publication number Publication date
CN114556048A (en) 2022-05-27
CN114556048B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
WO2021008209A1 (en) Depth measurement apparatus and distance measurement method
US20210181317A1 (en) Time-of-flight-based distance measurement system and method
CN111045029B (en) Fused depth measuring device and measuring method
WO2020009011A1 (en) Optical distance measuring apparatus
WO2021023285A1 (en) Echo processing method and apparatus for laser radar, ranging method and apparatus, and laser radar system
TWI722519B (en) Time-of-flight ranging sensor and time-of-flight ranging method
WO2022160611A1 (en) Time fusion-based distance measurement method, system, and device
US20220120872A1 (en) Methods for dynamically adjusting threshold of sipm receiver and laser radar, and laser radar
WO2021051481A1 (en) Dynamic histogram drawing time-of-flight distance measurement method and measurement system
WO2021051480A1 (en) Dynamic histogram drawing-based time of flight distance measurement method and measurement system
WO2020006924A1 (en) Tof module-based depth information measurement method and device
TWI723413B (en) System and method for measuring a distance between an imaging sensor and an object
US20220205835A1 (en) Systems and methods for imaging and sensing vibrations
WO2023004628A1 (en) Reflectivity correction method and apparatus, computer readable storage medium, and terminal device
WO2021077358A1 (en) Ranging method, ranging device, and computer-readable storage medium
WO2022241942A1 (en) Depth camera and depth calculation method
CN111366943A (en) Flight time ranging system and ranging method thereof
CN110986816A (en) Depth measurement system and measurement method thereof
TWI693421B (en) Time-of-flight ranging device and time-of-flight ranging method
WO2022160622A1 (en) Distance measurement method, device, and system
WO2023279621A1 (en) Itof distance measurement system and method for calculating reflectivity of measured object
WO2022204895A1 (en) Method and apparatus for obtaining depth map, computing device, and readable storage medium
WO2023279619A1 (en) Itof ranging system, and method for shielding fuzzy distance value
TWI703341B (en) Time-of-flight ranging device and time-of-flight ranging method
US20220284543A1 (en) Signal processing apparatus and signal processing method

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: 19949813

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: 19949813

Country of ref document: EP

Kind code of ref document: A1