TOF and stripe structure light fusion depth module and electronic equipment

By fusing TOF with striped structured light into a depth module, and using TOF depth values ​​to guide stripe matching, the problems of slow measurement speed and insufficient accuracy of line structured light are solved, achieving efficient and accurate three-dimensional measurement.

CN118565375APending Publication Date: 2024-08-30SHENZHEN GUANGJIAN TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410660860.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-11-06
Filing Date
2024-05-27
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing line structured light 3D measurement technology suffers from problems such as slow measurement speed, insufficient accuracy, and high requirements on the surface morphology of the measured object.

Method used

By simultaneously projecting stripes and floodlight, and using TOF depth values ​​to guide stripe matching, combined with a TOF sensor and processor, structured light depth can be obtained with a single projection. By fusing TOF and stripe structured light depth, measurement speed and accuracy are improved.

Benefits of technology

It achieves simultaneous acquisition of near-range high-precision structured light depth and long-range TOF depth, and has the advantages of fast measurement speed, high reconstruction accuracy, wide measurement range, low resource consumption, and high robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118565375A
    Figure CN118565375A
Patent Text Reader

Abstract

The invention discloses a TOF and stripe structured light fusion depth module and electronic equipment, and the module comprises a projector which is used for projecting a plurality of stripes and floodlight to a target object at the same time; the TOF sensor is used for receiving reflected signals of the fringes and the floodlight to generate a depth image; and the processor is used for obtaining the TOF depth according to a time flight algorithm and decoding the fringes according to the TOF depth so as to determine the serial numbers of the fringes, so that the structured light depth can be calculated according to the parallax. The depth of the structured light can be obtained only through one-time projection, and the method has the advantages of being high in measurement speed, high in reconstruction precision, wide in measurement range, low in resource consumption and high in robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of depth cameras, and in particular to a TOF and stripe structured light fusion depth module and electronic device. Background Art

[0002] Line structured light is a common 3D measurement technology that projects a beam of light onto an object and modulates the beam using the changes in the depth of the object's surface and possible gaps to cause the light strip to become distorted and discontinuous. The degree of distortion is proportional to the depth, and the discontinuity shows the physical gaps on the surface of the object. The line structured light mode obtains 3D information about the surface of the object from the distorted light strip image information. Compared with the point structure mode, the line structured light mode has a greatly increased amount of measurement information, and the implementation complexity has not increased, so it is widely used.

[0003] Line structured light mainly has the following technologies:

[0004] (1) Encoding and decoding technology: The commonly used encoding technologies in line structured light are phase encoding and amplitude encoding. Phase encoding encodes depth information by changing the phase of light, while amplitude encoding encodes depth information by changing the intensity of light. Decoding is the process of obtaining depth information by measuring the degree of distortion or discontinuity of the light strip.

[0005] (2) Phase shift technology: Phase shift technology measures the depth information of an object by changing the phase of the projected light beam. This technology requires changing the phase in each measurement cycle and measuring the phase difference of the light strip reflected from the surface of the object to determine the depth information.

[0006] (3) Moiré fringe technology: Moiré fringe technology is to form a stable and measurable moiré fringe by projecting two light beams onto the surface of an object and keeping their optical path difference constant. By measuring the changes in the moiré fringe, the depth information of the object can be determined.

[0007] (4) Fourier transform profilometry: Fourier transform profilometry is to perform Fourier transform on the light beam projected onto the surface of an object to obtain the spectrum of the light beam. By measuring the changes in the spectrum, the depth information of the object can be determined.

[0008] The application of these technologies requires selecting the most suitable measurement scenario and object to be measured according to specific circumstances.

[0009] Although line structured light is an effective 3D measurement method, it also has some disadvantages.

[0010] (1) Slow measurement speed: Line structured light needs to be scanned point by point in both horizontal and vertical directions, which is relatively inefficient;

[0011] For the phase method, multiple images are also required to obtain depth information.

[0012] (2) Insufficient accuracy: Due to the loss of surface information during the scanning process, this method may produce errors when measuring complex surfaces.

[0013] (3) There are requirements for the surface morphology of the object being measured: If the surface morphology of the object being measured is complex and the curvature varies greatly, it is possible that the line structured light strip information is lost in the camera's field of view, resulting in incomplete final 3D measurement data.

[0014] There are also some technical solutions in the prior art for improving the above-mentioned shortcomings.

[0015] An application provides a depth measurement device, method and computer-readable storage medium, wherein the depth measurement device comprises: a projection module for projecting at least three frames of phase-shifted stripes and at least one floodlight beam to a target object; a receiving module, comprising a TOF sensor, for collecting at least three frames of phase-shifted stripes and floodlight beams reflected by the target object in different working modes; a processing module for generating at least three frames of phase-shifted stripe images and at least one frame of depth image according to the phase-shifted stripes and floodlight beams received by the receiving module, calculating the relative phase of each pixel in the TOF sensor using at least three frames of phase-shifted stripe images, obtaining the first depth value of each pixel in at least one frame of depth image, performing phase separation on the relative phase of the corresponding pixel to obtain the absolute phase of each pixel, and calculating the target depth value of each pixel according to the absolute phase of each pixel. The application can improve the measurement speed while ensuring the accuracy of depth measurement.

[0016] However, the existing technology still has the disadvantages of slow speed, insufficient precision and high requirements on the surface morphology of the object being measured.

[0017] The disclosure of the above background technology content is only used to assist in understanding the inventive concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention

[0018] To this end, the present invention simultaneously projects stripes and floodlights, uses TOF depth values ​​to guide stripe matching, and obtains structured light depth. The structured light depth can be obtained with only one projection, and the effect of obtaining high-precision structured light depth at close range and TOF depth at long distance can be achieved. It has the advantages of fast measurement speed, high reconstruction accuracy, wide measurement range, low resource consumption, and high robustness.

[0019] In a first aspect, the present invention provides a TOF and stripe structured light fusion depth module, characterized in that it includes:

[0020] A projector for simultaneously projecting multiple stripes and floodlights onto a target object;

[0021] A TOF sensor, used for receiving the reflected signals of the stripes and the floodlight to generate a depth image;

[0022] The processor is used to obtain the TOF depth according to the time-of-flight algorithm, and decode the stripes according to the TOF depth to determine the number of the stripes, so that the structured light depth can be calculated according to the parallax.

[0023] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the angle between the stripes and the baseline is greater than 60 degrees.

[0024] Optionally, the TOF and stripe structured light fusion depth module is characterized in that when the distance between the target object and the depth module is less than the minimum measurable distance, causing the stripes to be out of focus, the TOF depth and its error are used to make a rough depth estimate based on the width of the stripes after defocusing, and then the stripes are decoded to obtain accurate structured light depth.

[0025] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the stripes are bright stripes with uniform intensity.

[0026] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the intensity of the stripes is in a fixed ratio to the intensity of the floodlight.

[0027] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the projector can project at least two stripes of different intensities for detecting target objects at different distances.

[0028] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the projector includes:

[0029] A light source for generating infrared light;

[0030] The stripe generator has a plurality of columns arranged at equal intervals, and filters are arranged between the plurality of columns.

[0031] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the brightness of each stripe varies with the depth of the structured light on the stripe.

[0032] Optionally, the TOF and stripe structured light fusion depth module is characterized in that the processor also uses the structured light depth to correct the TOF depth during processing to solve the wrapping problem, and then fuses the TOF depth with the structured light depth according to the depth value.

[0033] In a second aspect, the present invention provides an electronic device, characterized in that it comprises a TOF and stripe structured light fusion depth module as described in any one of the above.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] The present invention can perform both long-distance and short-distance high-precision reconstruction and has a better measurement range. When applied to mobile devices such as sweepers and robots, it can not only meet the short-distance obstacle avoidance requirements but also meet the long-distance slam reconstruction requirements.

[0036] The present invention can project multiple stripes at the same time and reconstruct multiple stripes at the same time, which has a higher light density and more complete depth data than traditional line structures.

[0037] The present invention adopts stripes for projection, which has a stronger power than uniform light. It can achieve a farther projection distance under the same power of the projector and can perform depth reconstruction at a farther distance.

[0038] The present invention has a smaller amount of calculation, and the spatial angular resolution of the depth point cloud used by SLAM is smaller. At the same time, the stripes of the present invention do not need to set up a DLP device, the structure is simpler, the cost is lower, and it has a very good commercial prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings in the following descriptions are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes and advantages of the present invention will become more obvious:

[0040] Figure 1 This is a schematic diagram of the structure of a TOF and stripe structured light fusion depth module in an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of stripes in an embodiment of the present invention;

[0042] Figure 3 This is a schematic diagram of the structure of a projector in an embodiment of the present invention;

[0043] Figure 4 It is a schematic diagram of the structure of another projector in an embodiment of the present invention;

[0044] Figure 5 This is a schematic diagram of the structure of another projector according to an embodiment of the present invention;

[0045] Figure 6 This is a schematic diagram of the relationship between a baseline and stripes in an embodiment of the present invention;

[0046] Figure 7 This is another schematic diagram of the relationship between the baseline and the stripes in an embodiment of the present invention;

[0047] Figure 8 A flowchart of the steps of a processor during processing in an embodiment of the present invention;

[0048] Fig. 9 is a flowchart of steps of another processor during processing in an embodiment of the present invention;

[0049] Fig.10 A weight curve diagram in an embodiment of the present invention;

[0050] Fig.11 This is a flow chart of the steps of deep fusion of structured light depth and TOF depth in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0052] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0053] A method for fusing a TOF and stripe structured light depth module provided in an embodiment of the present invention is intended to solve the problems existing in the prior art.

[0054] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0055] The present invention simultaneously projects stripes and floodlights and uses TOF depth values ​​to guide stripe matching to obtain structured light depth. The structured light depth can be obtained with only one projection, and the effect of obtaining high-precision structured light depth at close range and TOF depth at long distance can be achieved. It has the advantages of fast measurement speed, high reconstruction accuracy, wide measurement range, low resource consumption and high robustness.

[0056] Figure 1 FIG. 1 is a schematic diagram of a TOF and stripe structured light fusion depth module in an embodiment of the present invention. Figure 1 As shown, a structure of a TOF and stripe structured light fusion depth module in an embodiment of the present invention includes:

[0057] A projector that projects multiple streaks and floodlights simultaneously onto a target object.

[0058] Specifically, the projector is used to periodically project stripes and floodlights. The projector is responsible for projecting a specific pattern of structured light onto the target object, forming a three-dimensional image of light stripes modulated by the surface shape of the object being measured. This three-dimensional image will be detected by a camera at another position to obtain a two-dimensional distorted image of the light stripes.

[0059] Generally speaking, the light source methods of structured light projectors can be divided into three types: point, line, and surface. The point structured light method is that the laser projects a point beam onto the target, and uses a sensor or PSD (Position sensitive detector) to receive the reflected light and measure point by point, but the measurement speed is slow. The line structured light method uses a line laser to obtain a point cloud within a cross section at one time. The surface structured light method uses a surface light source for projection. Stripe structured light is a projection method between line structured light and surface structured light, projecting stripes with a certain width.

[0060] In the prior art, there are many projection modes of structured light projectors, including phase shift method of sinusoidal stripes, binary coded Gray code, phase shift method + Gray code, etc. Different from the prior art, such as Figure 2As shown, the projected stripes in this embodiment are bright stripes with uniform intensity. The area illuminated by the stripes is a bright area, and the adjacent area is a dark area. The bright area and the dark area are arranged in sequence. The width of the stripes on the depth image is less than 10 pixels, and can be any one of 3 pixels, 5 pixels, 6 pixels, 7 pixels, 8 pixels, 9 pixels, or any other number less than 10 that is not listed.

[0061] The projector can be composed of various structures. For example, the projector can be composed of a stripe projector and a flood projector. The stripe projector is used to generate stripes of specific shapes and patterns. These stripes are usually composed of rows of black lines and white intervals. A flood projector is a device used to generate a uniformly irradiated light source, which includes a laser light source and a diffuser. At this time, the processor controls the stripe and flood projection by controlling the stripe generator and the flood projector. The processor enables the stripe generator and the flood projector to project simultaneously, achieving the effect of simultaneously projecting stripes and flood. The stripes projected by the projector can be of various types, such as linear stripes, wavy stripes, irregular stripes, etc.

[0062] The TOF sensor is used to receive the reflected signals of the stripes and the floodlight to generate a depth image.

[0063] Specifically, TOF (Time of Flight) sensor is a distance measurement technology mainly used for depth image generation. Its main working principle is to emit infrared light or laser through the transmitter, which will bounce off the object and return to the sensor. By detecting the flight (round-trip) time of the light pulse, the sensor can calculate the distance between the object and the sensor.

[0064] In specific implementation, depending on the measurement requirements, TOF sensors can use two different working modes: pulse wave (Pulse) and continuous modulation wave (CW). For example, based on the pulse wave mode, the TOF sensor will continuously send light pulses to the target, and then use the sensor to receive the light returned from the object, and obtain the distance of the target object by detecting the flight (round-trip) time of the light pulse. Based on the continuous modulation wave mode, a near-infrared (850nm or 940nm) pulse wave is emitted through a flood illuminator (solid-state laser or LED). After the pulse wave encounters an object, it is reflected back and collected by the sensor.

[0065] The processor is used to obtain the TOF depth according to the time-of-flight algorithm, and decode the stripes according to the TOF depth to determine the number of the stripes, so that the structured light depth can be calculated according to the parallax.

[0066] Specifically, the processor mainly obtains the TOF depth based on the Time of Flight algorithm, and decodes the stripes according to this depth to determine the stripe number. With this information, the processor can calculate the structured light depth based on the parallax principle.

[0067] In terms of specific implementation, the core part of the processor is a specially designed circuit that can perform complex calculations and logical operations. This circuit is usually composed of many transistors that can be switched on and off in a very short time to perform a large number of calculations. In addition, the processor also needs a certain amount of memory to store intermediate results and the final depth image.

[0068] In the depth image, the reflected signals of stripes and floodlight are obtained at the same time, and the reflection on the image is alternating stripes with different brightness. According to the brightness, the reflection area of ​​the stripes can be obtained by using the local adaptive binarization method, so as to calculate the structured light depth according to the parallax principle. This embodiment is a monocular structured light, and when calculating the parallax, the parallax between the current image and the reference image is used for calculation.

[0069] Since the time-of-flight algorithm is simple and efficient, the TOF depth can be quickly obtained. In the depth image, there are both stripe information and floodlight information. Therefore, the structured light data and TOF data naturally have a one-to-one correspondence. According to the correspondence of pixels, the TOF data and the structured light data can be matched. When the TOF data is matched to the structured light system, the TOF data and the structured light data can be better calculated.

[0070] The stripes in this embodiment are uniform stripes, and there is no corresponding coding design inside. They have the advantages of high brightness, high contrast, and easy identification, but at the same time, conventional stripe processing methods cannot directly process them. When processing stripes, this embodiment uses TOF depth to decode the stripes and obtain the stripe numbers, thereby solving the problem that uniform stripes cannot be identified, and can make full use of the characteristics of high brightness and high precision of uniform stripes to obtain more accurate structured light data. For this embodiment, the data of the edge of the stripes can be accurately calculated, so the width of the stripes determines the density of the structured light data. The smaller the width of the stripes, the greater the amount of data obtained for the structured light depth. At the same time, at the same power, the smaller the width of the stripes, the greater the light intensity, and the longer the effective distance that can be projected, so the stripe width and power are selected according to the actual range to be measured. The spacing between the stripes is proportional to the distance of the baseline. When the baseline is longer, the spacing between the stripes is larger; when the baseline is shorter, the spacing between the stripes is smaller. The stripes in this embodiment may not be horizontal stripes, but only one stripe needs to exist within the parallax range.

[0071] This step uses TOF to guide structured light for stripe decoding, which has a faster decoding speed. Since the stripe density can be very high, it is not constrained by the reconstruction range, but only by the TOF's own accuracy and reconstruction distance, making the reconstruction range larger, the data accuracy higher, and the adaptability wider.

[0072] In some embodiments, it also includes: a second TOF sensor for receiving the reflected signals of the stripes and the floodlight to generate a second depth image. In this embodiment, similar to the previous embodiment, the processor calculates the TOF depth from the second depth image, decodes the stripes, determines the stripe numbers, calculates the structured light depth, and then uses the correspondence between the depth image and the second depth image to calculate the binocular depth using parallax. Compared with traditional binocular calculations, the amount of data in this embodiment is small and the calculation is faster. This embodiment can select the depth value with the smallest error as the final depth value based on the errors of the TOF depth, structured light depth and binocular depth, thereby increasing the measurement range and increasing the robustness of the measurement.

[0073] In some embodiments, the intensity of the stripes is in a fixed ratio to the intensity of the floodlight, so that the measured signal intensity of the stripes and the floodlight on the target object on the depth image is easier to identify, and the surface material information of the target object can be obtained by using the intensity estimation on the depth image. The intensity of the stripes is greater than the intensity of the floodlight. The surface material information of the target object can be obtained by the intensity of the reflected signal. For example, for a metal surface, the intensity of the stripes generated is also higher due to its high reflectivity; and for a plastic surface, the intensity of the stripes generated is also lower due to its low reflectivity. By analyzing these differences, the surface material type of the target object can be inferred. Furthermore, since the relationship between the intensity of the stripes and the intensity of the floodlight is known, the reflected signal of the target object surface at different intensities can be obtained, and the surface information of the target object can be further confirmed by comparing the surface of the target object. The area on the target object with similar or gradually changing depth values ​​is a surface, and the surface material and flatness information can be obtained through adjacent reflected signals of different intensities. Compared with uniform light irradiation, this embodiment can better obtain surface flatness information.

[0074] In some embodiments, the projector can project at least two stripes of different intensities for detecting target objects at different distances. By controlling the current, the projector can quickly change the intensity of the projected stripes, thereby realizing the combination of alternating projections of different intensities within any period such as 1s, 0.5s, 0.1s, etc., thereby realizing simultaneous measurement of long distances and short distances within one period. Stripes of different intensities can help to detect and identify target objects. Brighter stripes can be used for long-distance target object detection, while darker stripes can be used for close-range target object detection. By measuring the distance between the projected stripes and the target object, the distance measurement of the target object can be achieved. Stripes of different intensities can provide different measurement accuracy and range. By controlling the current, this embodiment can flexibly adjust the intensity of the stripes projected by the projector as needed to adapt to different application scenarios and requirements; by precisely controlling the current and other parameters, high-precision target object detection and distance measurement can be achieved; the method of controlling the current is relatively simple, easy to implement and expand, and the performance of the projector can be further optimized and improved as needed.

[0075] In some embodiments, the width of the stripes is the same as the spacing between adjacent stripes. Since the width and spacing of the stripes are equal, the analysis and processing of the stripes can be simplified, and the projector can be made easier to manufacture and at a lower cost. At the same time, the position and size of the target object can be determined more accurately. Because the spacing between the stripes is fixed, the position of the target object in the stripe image can be determined based on the known spacing. This can improve the precision and accuracy of the measurement. The interference of other factors on the measurement results can be reduced. For example, when the width and spacing of the stripes do not match, errors or blurs may be introduced, thereby affecting the accuracy of the measurement results. When the width and spacing of the stripes are the same, this interference can be reduced and the stability and reliability of the measurement can be improved.

[0076] In some embodiments, the brightness of each stripe varies with the depth of the structured light on the stripe. When designing a projector, a controllable brightness adjustment device is added to the light source part of the projector, such as an LED lamp with adjustable current or a laser with adjustable optical power. By controlling the magnitude of the current or optical power, the brightness of the projected stripes can be adjusted. According to the measured distance information, the brightness of the light source in the projector is adjusted by a control algorithm. A PID controller or other feedback control algorithm can be used to achieve precise brightness adjustment. This embodiment can achieve higher resolution by adjusting the brightness of the stripes according to the depth information of the target object. A brighter stripe can be used for a farther target object, while a darker stripe can be used for a closer target object, thereby improving the ability to distinguish target objects at different depths. The contrast between the target object and the background can also be enhanced. A brighter target object will reflect more light, thereby producing a brighter stripe; while a darker background will reflect less light, thereby producing a darker stripe. In this way, the contrast between the target object and the background can be improved, making the target object easier to detect and identify. Since the brightness of the stripes can be adjusted according to the depth information of the target object, it can adapt to different environmental conditions. For example, in brighter light environments, brighter stripes can be used to improve contrast, while in weaker light environments, darker stripes can be used to reduce interference. This allows for more accurate and reliable object detection and measurement under different environmental conditions.

[0077] In some embodiments, the processor also uses the structured light depth to correct the TOF depth during processing to solve the wrapping problem, and then fuses the TOF depth with the structured light depth according to the depth value. Due to the characteristics of iTOF technology, TOF depth may have a wrapping problem. The wrapping problem refers to the deviation of the measured depth value due to the confusion of the receiving cycle when the target object is too close or too far. In order to solve the wrapping problem, the structured light depth can be used to correct the TOF depth. According to the known structured light depth and the measured TOF depth, the number of cycles corresponding to the TOF depth value can be calculated, so that its flight time can be corresponded to the corresponding cycle, so as to obtain the TOF depth under the correct cycle and solve the wrapping problem. Finally, the structured light depth and the corrected TOF depth are fused to obtain the final target object depth information. The fusion method can be a simple weighted average, maximum value selection or other more complex algorithms. The goal of the fusion is to comprehensively consider the advantages of the two depth information and improve the accuracy and reliability of the measurement.

[0078] In some embodiments, the processor also uses the structured light depth to correct the multipath problem in the TOF depth at medium and long distances during processing. The difference between the structured light depth and the TOF depth is used to identify the possible multipath area. The structured light depth is used to perform depth calibration on the location where the TOF depth has a multipath area.

[0079] In some embodiments, when the distance between the target object and the depth module is less than the minimum measurable distance, resulting in the stripes being out of focus, the TOF depth and its error are used to make a rough depth estimate based on the width of the stripes after the stripes are out of focus, and then the stripes are decoded to obtain an accurate structured light depth. After the stripes are out of focus, according to a preset relationship, the TOF depth and its error are used to make a rough depth estimate based on the width of the stripes after the stripes are out of focus, and the parallax range of the stripes is obtained, and then the reference image is searched to obtain the corresponding relationship between the stripes and the reference image, and the parallax is calculated to obtain an accurate structured light depth.

[0080] Figure 3 FIG. 1 is a schematic diagram of the structure of a projector in an embodiment of the present invention. Figure 3 As shown, a projector in an embodiment of the present invention includes:

[0081] A light source for generating infrared light;

[0082] A stripe generator, used to generate multiple stripes;

[0083] The filter is arranged in parallel with the stripe generator, and is used to proportionally reduce the intensity of the infrared light and project a flood light.

[0084] Specifically, the light source can be an ELL or a vertical cavity surface laser generator. The light source can be a single light source or an array light source. The infrared light passes through either the stripe generator or the filter. When the infrared light is irradiated on the stripe generator, multiple stripes are generated. The filter is arranged in parallel with the stripe generator to ensure that the performance of the projector matches the spectral band, exit pupil position and size, field of view, resolution and other requirements of the system under test. In some more complex devices, the filter may also have the function of correcting the nonlinear effects of the projector. The filter can be any optical device that can reduce the light intensity.

[0085] On the one hand, this embodiment uses floodlight to increase the illumination of the surface of the object being measured, so that the camera can capture clearer images, which helps to improve the accuracy of obtaining depth information. On the other hand, it can ensure the ratio of stripes to floodlight, making it easier to achieve precise control of light intensity, which is beneficial to improving accuracy.

[0086] Figure 4 FIG. 2 is a schematic diagram of the structure of another projector in an embodiment of the present invention. Figure 4 As shown, another projector in an embodiment of the present invention includes:

[0087] A light source for generating infrared light;

[0088] The stripe generator has a plurality of columns arranged at equal intervals, and there are gaps between the plurality of columns.

[0089] Specifically, the infrared light is irradiated on the stripe generator. When the infrared light is irradiated on the column, the infrared light is gathered into stripes with greater brightness. When the infrared light is irradiated on the gap, the infrared light is emitted as flood light. This embodiment has a simple structure, can ensure the ratio of stripes to flood light, has a very low cost, and is conducive to commercial promotion.

[0090] Figure 5 FIG. 2 is a schematic diagram of the structure of another projector according to an embodiment of the present invention. Figure 5 As shown, another projector in an embodiment of the present invention includes:

[0091] A light source for generating infrared light;

[0092] The stripe generator has a plurality of columns arranged at equal intervals, and filters are arranged between the plurality of columns.

[0093] Specifically, the infrared light is irradiated on the stripe generator. When the infrared light is irradiated on the column, the infrared light is gathered into stripes with greater brightness. When the infrared light is irradiated on the filter, the infrared light is emitted as flood light. And due to the filtering effect of the filter, the intensity of the stripes and the flood light can be adjusted in a greater proportion. The filter can be an optical device that reduces the light intensity at will. In some embodiments, the filter also has a diffusion function, so that the irradiated infrared light is emitted at a larger angle, so that the flood light is more uniform.

[0094] This embodiment has a very high degree of integration, can adjust the light intensity of stripes and floodlights over a wider range, can adapt to more application scenarios, and has the advantages of small size and easy installation.

[0095] Figure 6 Schematic diagram of the relationship between a baseline and stripes in an embodiment of the present invention. The baseline is the line connecting the center of the projector and the center of the TOF sensor. In the prior art, due to the characteristics of the stripes, the projector and the sensor are usually arranged up and down, so the baseline is usually in the vertical direction. In this embodiment, there is no special requirement for the direction of the baseline, and the baseline can be horizontal, vertical, or any other angle. Figure 6 An example is shown where the stripes are perpendicular to the baseline direction. When the stripes are perpendicular to the baseline direction, there are the most stripes in the baseline direction, and the strongest structured light depth data density can be obtained.

[0096] Figure 7FIG. 1 is another schematic diagram of the relationship between the baseline and the stripes in an embodiment of the present invention. Figure 7 In the embodiment, the stripes are at a large angle to the baseline direction. The angle can be 61 degrees, 65 degrees, 69 degrees, 71 degrees, 76 degrees, 78 degrees, 83 degrees, 89 degrees or any other angle greater than 60 degrees and less than 90 degrees. This embodiment is suitable for specific application scenarios, especially when the target object has a certain angle with the baseline. The modules in this embodiment can be placed arbitrarily, making the assembly of the product more flexible. When the module is placed horizontally, the baseline length can be longer and the accuracy of the structured light depth is also higher.

[0097] Figure 8 FIG. 1 is a flowchart of the steps of a processor in processing according to an embodiment of the present invention. Figure 8 As shown, the steps of a processor in processing in an embodiment of the present invention include:

[0098] Step S1: Acquire a depth image and determine the effective range of TOF depth.

[0099] In this step, TOF, or time-of-flight, is a method that sends continuous light pulses to the target, which are reflected by the target, and then received by the sensor. The time of flight is recorded to calculate the distance to the target. Therefore, each pixel in the depth image can represent the three-dimensional coordinates of a point in space, also known as a voxel.

[0100] However, due to various factors, such as changes in illumination, characteristics of reflective objects, etc., the acquired depth image may contain noise or errors. In order to improve the accuracy of the depth map, an effective depth data extraction and correction algorithm can be used for processing. The algorithm first adaptively segments the measured depth map based on kernel density estimation and connected domain labeling; then uses an improved structure tensor for edge detection to detect invalid pixels and flying pixels in the depth map; finally, bicubic interpolation or voting operations are used to correct or remove these pixels, and enhanced confidence is used to remove erroneous pixels. The effective range is determined according to the setting of the depth module, such as 5cm to 10m.

[0101] Step S2: Calculate the TOF depth, and decode the stripes according to the TOF depth to determine the number of each stripe.

[0102] In this step, the TOF depth can be obtained by the time-of-flight algorithm. This embodiment adopts iTOF technology so that the TOF depth and the structured light depth have a similar measurement range. In order to determine the number of each stripe, we need to decode the structured light stripes according to the TOF depth. According to the error range of the TOF depth, the parallax range of the current stripe on the reference image can be determined, so that the stripe corresponding to the current stripe on the reference image can be found and the stripe number can be obtained.

[0103] Step S3: Calculate the structured light depth corresponding to the stripe using structured light technology according to the stripe number.

[0104] In this step, unlike the phase shift method, the stripes in this step are uniform. By identifying the stripes, the parallax of each edge point on the stripes can be calculated to obtain the corresponding depth, that is, the structured light depth.

[0105] Fig. 9 FIG. 1 is a flowchart of another processing step of a processor in an embodiment of the present invention. Fig. 9 As shown, compared with the above-mentioned embodiment, another processor in the embodiment of the present invention further includes the following steps during processing:

[0106] Step S4: perform depth fusion on the structured light depth and TOF depth.

[0107] In this step, structured light and TOF are deeply integrated by taking advantage of the fact that structured light has high accuracy at close range and high precision at long distance, and TOF has poor accuracy and precision at close range and poor precision and precision than structured light, and high precision and precision than structured light at long distance. Fig.10 As shown, depending on the distance, the ratio w of the structured light depth to the TOF depth presents three stages. In the first stage, the accuracy of structured light is dominant, and all structured light depth data is used during fusion. In the second stage, the accuracy of structured light and TOF is equivalent, and the structured light depth and TOF depth are weighted and mutually filtered. In the third stage, TOF accuracy is dominant, and TOF depth can be used. This embodiment comprehensively utilizes the advantages of structured light depth and TOF depth, so that the measurement is more accurate and the measurement range is wider. Only one projection is required to achieve the fusion of structured light and TOF depth, with high efficiency.

[0108] Fig.11 This is a flow chart of the steps of deep fusion of structured light depth and TOF depth in an embodiment of the present invention.

[0109] like Fig.11 As shown, in an embodiment of the present invention, a step of deep fusion of structured light depth and TOF depth includes:

[0110] Step S41: Correcting the TOF depth using the structured light depth to solve the wrapping problem.

[0111] In this step, the TOF depth is corrected using structured light depth. Wrap-around problem is a common problem when using iTOF technology for 3D reconstruction. First, the depth information of the object is obtained through structured light technology, and then the TOF depth is corrected using this depth information. The structured light depth is compared with the TOF depth. If it is found that the TOF depth exceeds the actual physical range (for example, for a certain pixel, its TOF depth is negative) and the TOF depth value deviation exceeds the threshold within the range of higher structured light accuracy, then the structured light depth is used to correct it, that is, the TOF depth of the pixel is directly set to the structured light depth.

[0112] Step S42: Correcting the TOF depths at other positions according to the corrected TOF depth to obtain a final TOF depth.

[0113] In this step, the TOF depth of the pixel point obtained after correction in step S41 is used to correct the TOF depth of the adjacent pixel point. Since there is structured light depth only at the edge of the stripe, and other pixels do not have structured light depth, this step needs to use the TOF depth of the corrected pixel point to correct the depth value of the adjacent pixel point. A variety of methods can be used for correction in this step. For example, in the case where there is a large difference with adjacent pixels, a weighted calculation is performed based on the depth value of the pixel point and the pixel point closest to the two adjacent stripe edge lines to obtain the final TOF depth data. The distances between pixel a and the nearest stripe edge lines b and c are ab and ac respectively. The depth value of the pixel point on stripe edge line b that is closest to pixel a is B, and the depth value of the pixel point on stripe edge line c that is closest to pixel a is C, then the TOF depth data of pixel a after correction is

[0114]

[0115] Step S43: fusing the final TOF depth with the structured light depth according to the depth value.

[0116] In this step, the fusion method in the above-mentioned embodiment can be used to obtain a more accurate depth value, making full use of the accuracy of TOF and structured light data to minimize the error of the depth value on the obtained image and maximize the accuracy.

[0117] In this embodiment, the TOF depth is corrected by the structured light depth, and the corrected TOF depth is used to correct adjacent pixels to obtain the final TOF depth, and then the final TOF depth is merged with the structured light depth, which can improve the accuracy of the depth value.

[0118] An embodiment of the present invention further provides an electronic device, which includes the TOF and stripe structured light fusion depth module provided by any of the above embodiments, and the electronic device can be a mobile phone, a tablet computer, a digital camera, etc. The TOF and stripe structured light fusion depth module provided by the present invention simultaneously projects stripes and floodlights, uses the TOF depth value to guide the stripe matching, obtains the structured light depth, and only requires one projection to obtain the structured light depth, so as to achieve the effect of obtaining high-precision structured light depth at close range and TOF depth at long distance, and has the advantages of fast measurement speed, high reconstruction accuracy, wide measurement range, low resource consumption, and high robustness.

[0119] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. The above description of the disclosed embodiments enables professionals and technicians in this field to implement or use the present invention. Various modifications to these embodiments will be obvious to professionals and technicians in this field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown in this article, but will comply with the widest range consistent with the principles and novel features disclosed herein.

[0120] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.

Claims

1. A TOF and stripe structured light fusion depth module, characterized in that: include: A projector for simultaneously projecting multiple stripes and floodlights onto a target object; A TOF sensor, used for receiving the reflected signals of the stripes and the floodlight to generate a depth image; The processor is used to obtain the TOF depth according to the time-of-flight algorithm, and decode the stripes according to the TOF depth to determine the number of the stripes, so that the structured light depth can be calculated according to the parallax.

2. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: The angle between the stripes and the baseline is greater than 60 degrees.

3. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: When the distance between the target object and the depth module is less than the minimum measurable distance, causing the stripes to be out of focus, the TOF depth and its error are used to make a rough depth estimate based on the width of the stripes after defocusing, and then the stripes are decoded to obtain accurate structured light depth.

4. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: The stripes are bright stripes with uniform intensity.

5. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: The intensity of the stripes is in a fixed ratio to the intensity of the floodlight.

6. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: The projector can project at least two stripes of different intensities for detecting target objects at different distances.

7. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: The projector comprises: A light source for generating infrared light; The stripe generator has a plurality of columns arranged at equal intervals, and filters are arranged between the plurality of columns.

8. The TOF and stripe structured light fusion depth module according to claim 1, characterized in that: The brightness of each stripe varies with the depth of the structured light on the stripe.

9. A TOF and stripe structured light fusion depth module according to claim 1, characterized in that: During processing, the processor also uses the structured light depth to correct the TOF depth to solve the wrapping problem, and then fuses the TOF depth with the structured light depth according to the depth value.

10. An electronic device, characterized in that: A TOF and stripe structured light fusion depth module comprising any one of claims 1 to 9.