Three-dimensional depth measurement method and device, structured light camera and storage medium
By adjusting the driving electrical parameters of the laser array, multiple sets of structured light dot matrixes of different wavelengths are emitted, and the speckled dot matrix is obtained and the depth information is calculated, which solves the problem of large error in three-dimensional depth measurement and achieves higher accuracy of three-dimensional depth data acquisition.
Patent Information
- Application Number
- CN202510184202.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-05-13
AI Technical Summary
During the three-dimensional depth measurement process, bumps or concave points on the surface of the object cause large measurement errors.
By adjusting the driving electrical parameters of the laser array, multiple sets of basic structure light dot matrix are emitted to the surface to be tested. The laser wavelength of each set of dot matrix is different. Each set of scattered dot matrix is obtained, and the depth information is calculated based on these dot matrixes, and the three-dimensional depth data is finally determined.
This method constrains multiple sets of relevant depth information to reduce measurement errors and improve the accuracy of three-dimensional depth measurement.
Smart Images

Figure CN119984199A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser ranging technology, and in particular to a three-dimensional depth measurement method, device, structured light camera and storage medium. Background Art
[0002] With the in-depth development of the spatial computing era, three-dimensional depth perception is attracting more and more people's interest and attention due to its important applications in machine vision and artificial intelligence. At present, non-contact optical three-dimensional depth measurement methods are mainly divided into structured light projection, time-of-flight method and stereoscopic vision. Among them, the three-dimensional perception technology based on structured light has the characteristics of high spatial resolution, miniaturization, and strong anti-interference ability. It is widely used in machine vision, face recognition, human-computer interaction, somatosensory games, bionic robots and other fields. However, when performing three-dimensional depth measurement, large measurement errors may still be caused by convex or concave points on the surface of the object. Summary of the invention
[0003] The main purpose of this application is to provide a three-dimensional depth measurement method, device, structured light camera and storage medium, aiming to solve the technical problem of how to improve the accuracy of three-dimensional depth measurement.
[0004] To achieve the above object, an embodiment of the present application provides a three-dimensional depth measurement method, which is applied to a structured light camera. The three-dimensional depth measurement method includes the following steps: By adjusting the driving electrical parameters of the injection laser array, the laser array is controlled to emit multiple groups of basic structured light dot arrays to the surface to be measured, and the laser wavelengths of each group of the basic structured light dot arrays are different; Respectively acquiring a plurality of groups of scattered spot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; Based on each group of the scattered spot arrays, obtaining multiple groups of depth information corresponding to the surface to be measured; Based on each set of the depth information, three-dimensional depth data of the surface to be measured is determined.
[0005] In one embodiment, the step of acquiring multiple groups of depth information corresponding to the surface to be measured based on each group of the scattered spot arrays includes: Based on the structured light projection formula, the coordinates of each basic structured light dot matrix corresponding to each group of the basic structured light dot matrix projected onto the surface to be measured are calculated; Obtaining the coordinates of each scattered spot array corresponding to each group of the scattered spot arrays; The depth information of each group is determined based on the coordinates of each basic structured light dot array and the coordinates of each scattered light dot array.
[0006] In one embodiment, the step of determining each group of the depth information based on each of the basic structured light dot array coordinates and each of the scattered light dot array coordinates comprises: Based on the basic structured light dot array coordinates and the scattered light dot array coordinates, obtaining each group of dot array offsets corresponding to each group of scattered light dot array coordinates; Based on the dot matrix offsets of each group, the corresponding depth information of each group is determined.
[0007] In one embodiment, the step of determining the corresponding groups of depth information based on the dot matrix offsets of the groups includes: Obtaining each basic dot matrix distance corresponding to each basic structured light dot matrix; Based on the dot matrix offsets, determining the scattered dot matrix distances corresponding to the scattered dot matrixes; By using the least square method, a dot matrix distance error function is established between each of the basic dot matrix distances and each of the corresponding scattered dot matrix distances; When the output value of the lattice distance error function is the minimum value, the depth information of each group is obtained.
[0008] In one embodiment, before the step of calculating the coordinates of each corresponding basic structured light dot matrix projected onto the surface to be measured by each group of the basic structured light dot matrix based on the structured light projection formula, the step further includes: Calibrate the structured light camera to obtain calibration data; Based on the calibration data, the structured light projection formula is determined.
[0009] In one embodiment, the step of determining the three-dimensional depth data of the surface to be measured based on each group of the depth information includes: Based on the depth information of each group, obtaining the fitted scattered spot array distance corresponding to each group of scattered spot arrays; Based on the fitted speckled array distance, three-dimensional depth data of the surface to be measured is determined.
[0010] To achieve the above object, the present application also proposes a three-dimensional depth measurement device, which includes: A structured light emission module, used for controlling the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured by adjusting the driving electrical parameters of the injection laser array, wherein the laser wavelength of each group of the basic structured light dot arrays is different; An image acquisition module, used for respectively acquiring a plurality of groups of scattered spot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; An information acquisition module, used for acquiring multiple groups of depth information corresponding to the surface to be measured based on each group of the basic structured light dot arrays and each group of the scattered light dot arrays; The depth calculation module is used to determine the three-dimensional depth data of the surface to be measured based on each group of the depth information.
[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a structured light camera, which includes: a memory, a processor, and a three-dimensional depth measurement program stored in the memory and executable on the processor, wherein the three-dimensional depth measurement program is configured to implement the steps of the three-dimensional depth measurement method described above.
[0012] In addition, to achieve the above objectives, the present application also proposes a storage medium, on which a three-dimensional depth measurement program is stored. When the three-dimensional depth measurement program is executed by a processor, the steps of the three-dimensional depth measurement method described above are implemented.
[0013] The embodiments of the present application provide a three-dimensional depth measurement method, device, structured light camera and storage medium. The steps of the three-dimensional depth measurement method include: by adjusting the driving electrical parameters of the injection laser array, controlling the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured, and the laser wavelengths of each group of the basic structured light dot arrays are different; respectively obtaining multiple groups of scattered light dot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; based on each group of the scattered light dot arrays, obtaining multiple groups of depth information corresponding to the surface to be measured; based on each group of the depth information, determining the three-dimensional depth data of the surface to be measured.
[0014] By adjusting the driving electrical parameters of the laser array, multiple groups of basic structured light dot arrays with different laser wavelengths are sent to the surface to be measured. Since the laser wavelengths of each group of basic structured light dot arrays are different, the laser emission angles will deflect accordingly according to the law of wavelength change. Therefore, there will be micron-level correlation deviations between the multiple groups of scattered spot arrays formed on the surface to be measured. Multiple groups of related depth information corresponding to the surface to be measured are obtained through each group of related scattered spot arrays. Since each group of depth information is related to each other and constrained, it can be ensured that the three-dimensional depth data corresponding to each group of depth information is obtained more accurately. This method does not require changing the measurement distance and the multiple groups of depth information obtained can constrain each other, which greatly reduces the measurement error and makes the obtained three-dimensional depth data more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] Figure 1 A schematic diagram of a process flow provided for Embodiment 1 of the three-dimensional depth measurement method of the present application; Figure 2 The following are example images of scattered speckle arrays of each group; Figure 3 A schematic diagram of a flow chart provided for Embodiment 2 of the three-dimensional depth measurement method of the present application; Figure 4 A schematic diagram of a flow chart provided for Embodiment 3 of the three-dimensional depth measurement method of the present application; Figure 5 is a structural block diagram of a first embodiment of a three-dimensional depth measurement device of the present invention; Figure 6 It is a schematic diagram of the structure of a structured light camera in a hardware operating environment involved in an embodiment of the present invention.
[0018] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0020] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0021] This application proposes a three-dimensional depth measurement method of the first embodiment, which is applied to a structured light camera. Please refer to Figure 1 , the steps of the three-dimensional depth measurement method include: Step S10, by adjusting the driving electrical parameters of the injection laser array, controlling the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured, and the laser wavelengths of each group of the basic structured light dot arrays are different; It should be understood that in this embodiment, the laser array can specifically be a vertical cavity surface emitting laser array (Vertical Cavity Surface Emitting Laser, VCSEL). When current is injected into the active area through the P-type electrode and the N-type electrode of the VCSEL, it will stimulate the recombination of electrons and holes and release photons. These photons are reflected multiple times in the optical resonant cavity perpendicular to the surface in the optical cavity structure of the VCSEL, thereby enhancing the intensity of the light. When the carrier recombination rate in the active area reaches a threshold, the VCSEL begins to emit laser light, that is, near-infrared light of a specific wavelength.
[0022] It should be noted that, in this embodiment, the laser array can be composed of a plurality of independent sub-lasers, and the working state of each sub-laser can be controlled so that only a specific sub-laser is activated and emits laser light. The laser light intersects in space to form a specific light intensity distribution, thereby forming a specific structured light pattern (or understood as a structured light dot matrix), which is projected onto the surface to be measured of the object, and the surface to be measured is marked in three-dimensional space.
[0023] It is easy to understand that the basic structured light dot matrix refers to the dot matrix or pattern formed by the lasers emitted by each sub-laser in the laser array. In this embodiment, the activated sub-lasers in the laser array can be controlled to remain unchanged, and then the driving electrical parameters (including voltage and current) injected into the laser array can be changed, so that the laser wavelength of the basic structured light dot matrix emitted by the laser array changes. The laser wavelength will affect the reflection and propagation characteristics of the laser in the resonant cavity, which will cause the emission angle (laser deflection angle) of each laser beam in the basic structured light dot matrix emitted by each activated sub-laser to change slightly with the change of wavelength. Therefore, when different driving electrical parameters are injected, the overall distribution of each laser point in each group of basic structured light dot matrix emitted by the laser array does not change, but the specific position of each point will be slightly offset.
[0024] In a specific implementation, the driving electrical parameters of the injection laser array can be adjusted according to a certain rule, so that the laser array can emit multiple groups of basic structured light dot arrays, and each group of basic structured light dot arrays is sequentially emitted to the surface of the object that needs to perform three-dimensional depth measurement, that is, the surface to be measured.
[0025] Step S20, respectively acquiring a plurality of groups of scattered light dot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; It should be noted that the scattered spot array refers to a dot array or pattern formed by projecting the basic structured light dot array emitted by the laser array onto the surface to be measured. In this embodiment, since the laser wavelengths of each group of basic structured light dot arrays are different, the angles of the lasers emitted by the same sub-laser in each group of basic structured light dot arrays are different, so there is a certain offset between each group of scattered spot arrays formed by projecting on the surface to be measured, which is generally micron-level.
[0026] In a specific implementation, when the laser array emits each group of basic structured light dot arrays, a structured light camera may be used to collect scattered light dot arrays formed by projecting the group of basic structured light dot arrays onto the surface to be measured.
[0027] It is worth noting that there is a certain offset between each corresponding laser point in each group of scattered spot arrays collected, and the offset depends on the change in the emission angle of the laser emitted by the corresponding sub-laser (or the change in the laser deflection angle), which can also be understood to depend on the laser wavelength. Therefore, it can be considered that the offset of each group of scattered spot arrays is correlated with the laser wavelength (laser deflection angle) emitted by the laser array. According to the grating equation theory, it can be considered that it is approximately a linear relationship.
[0028] For example, the driving electrical parameters of the laser array can be adjusted to adjust the laser wavelength of the emitted laser, so that the laser wavelength changes to 830nm, 840nm, 850nm, 860nm and 870nm in sequence. If the surface to be measured is a plane, the generated groups of scattered spot arrays are as follows: Figure 2 shown. Figure 2 The right side is an enlarged view of regions A and B, where the offset spacing of the laser spots in region A is 122.9um, 104.2um, 131.9um, and 109.0um, respectively, and the offset spacing of the laser spots in region B is 38.4um, 64.3um, 77.9um, and 73.0um, respectively. As the wavelength increases, the high-order diffraction spots show more obvious offsets, and the quantitative relationship between the deflection angle and the adjustable wavelength can be verified based on the position information of the extracted spot array, so that the above linear relationship can be obtained.
[0029] Step S30, acquiring multiple groups of depth information corresponding to the surface to be measured based on each group of the scattered spot arrays; It should be noted that the depth information refers to the relevant information used to represent the distance between each laser point on the surface to be measured and the laser array. In this embodiment, the overall shape of the basic structured light dot matrix emitted by the laser array under specific driving electrical parameters is specific. In the process of emitting a corresponding group of basic structured light dot matrices, the overall shape of the basic structured light dot matrix will be magnified according to the proportion corresponding to the transmission distance, and the distance between each laser point in the dot matrix will also be magnified accordingly. It can be considered that the laser transmission distance is proportional to the change in the distance between each laser point in the dot matrix formed by projecting to the corresponding distance. Therefore, the distance between each laser point and the laser array can be obtained by detecting the position change of each laser point in the scattered spot matrix located on the surface to be measured relative to the corresponding laser point in the basic structured light dot matrix. In the above manner, the depth information of a corresponding group of the surface to be measured can be obtained in turn through the distribution of each laser point on each group of scattered spot matrices.
[0030] It is worth noting that, in this embodiment, since the offset between each group of scattered spot arrays is at the micron level, the position variation of the scattered spots formed by the same sub-laser emitting laser to the surface to be measured is small, and can be approximately regarded as the same point, or a collection of multiple points in a specific small area. Therefore, the depth information corresponding to each group of scattered spot arrays will be mutually constrained, thereby reducing the cumulative error of the depth calculation of each point position on the surface to be measured.
[0031] Step S40: determining three-dimensional depth data of the surface to be measured based on each group of depth information.
[0032] It is easy to understand that the three-dimensional depth data refers to the distance between each point on the surface to be measured and one of the specific planes of the surface to be measured, which is used to indicate the degree of concavity and convexity of each point on the surface to be measured, wherein the specific plane can be the plane where any point on the surface to be measured is located, and the plane is spatially level with the laser array. In this embodiment, according to each group of depth information, the distance values between multiple groups of points on the surface to be measured (each laser point of the scattered spot array) and the laser array can be obtained, and then the values of each laser point corresponding to the depth information of each group of scattered spot arrays are averaged, and then the above-mentioned specific plane is used as the reference plane to finally determine the three-dimensional depth data of the surface to be measured.
[0033] An embodiment of the present application provides a three-dimensional depth measurement method, the steps of which include: controlling the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured by adjusting the driving electrical parameters of the injection laser array, wherein the laser wavelengths of each group of the basic structured light dot arrays are different; respectively obtaining multiple groups of scattered light dot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; based on each group of the scattered light dot arrays, obtaining multiple groups of depth information corresponding to the surface to be measured; and determining the three-dimensional depth data of the surface to be measured based on each group of the depth information.
[0034] By adjusting the driving electrical parameters of the laser array, multiple groups of basic structured light dot arrays with different laser wavelengths are sent to the surface to be measured. Since the laser wavelengths of each group of basic structured light dot arrays are different, the laser emission angles will deflect accordingly according to the law of wavelength change. Therefore, there will be micron-level correlation deviations between the multiple groups of scattered spot arrays formed on the surface to be measured. Multiple groups of related depth information corresponding to the surface to be measured are obtained through each group of related scattered spot arrays. Since each group of depth information is related to each other and constrained, it can be ensured that the three-dimensional depth data corresponding to each group of depth information is obtained more accurately. This method does not require changing the measurement distance and the multiple groups of depth information obtained can constrain each other, which greatly reduces the measurement error and makes the obtained three-dimensional depth data more accurate.
[0035] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 3 The step of obtaining multiple groups of depth information corresponding to the surface to be measured based on each group of the scattered spot arrays includes: Step S31, based on the structured light projection formula, calculating the coordinates of each corresponding basic structured light dot matrix projected onto the surface to be measured by each group of the basic structured light dot matrix; Step S32, obtaining the coordinates of each scattered spot array corresponding to each group of the scattered spot arrays; It should be noted that the structured light projection formula refers to the formula used to express the corresponding relationship between the distance from the laser array to the surface to be measured and the shape change of the basic structured light dot array and the scattered spot array formed after being projected at the corresponding distance. For example, when the surface to be measured is a plane parallel to the imaging plane of the structured light camera, if a three-dimensional space coordinate system is established with the structured light camera as the origin, the coordinates of any point on the surface to be measured in the three-dimensional space coordinate system are (x, y, z), and the projection coordinates on the imaging plane of the structured light camera are (px, py), then the two have the following relationship: ; ; in, is the focal length of the structured light camera (in pixels), is the horizontal coordinate on the imaging plane, is the ordinate on the imaging plane.
[0036] Through the above-mentioned structured light projection formula, the coordinates of each basic structured light dot array formed by each laser of each group of basic structured light dot arrays at the corresponding distance can be calculated. At the same time, according to the projection of each group of scattered light dot arrays collected on the imaging plane, the plane coordinates formed by each laser in each group of scattered light dot arrays on the surface to be measured can be directly obtained, that is, the coordinates of each scattered light dot array can be obtained.
[0037] Step S33: determining each group of the depth information based on the coordinates of each of the basic structured light dot arrays and the coordinates of each of the scattered light dot arrays.
[0038] It is easy to understand that in this embodiment, since the surface to be measured may be uneven, the laser points on each group of scattered spot arrays actually projected on the surface to be measured are not on the same spatial plane, and the different projection distances will also cause the plane coordinates of each laser on the scattered spot array to change. Therefore, there will be a corresponding offset between the scattered spot array coordinates corresponding to the scattered spot array actually projected on the surface to be measured and the basic structured light dot array coordinates theoretically calculated to be projected on the corresponding plane on the surface to be measured, and the direction and size of the offset can indicate whether there is unevenness in the area and the degree of unevenness, so the depth information corresponding to each group of scattered spot arrays can be obtained by calculation.
[0039] Further, in this embodiment, the step of determining each group of the depth information based on each of the basic structured light dot array coordinates and each of the scattered light dot array coordinates includes: Step S331, based on the basic structured light dot array coordinates and the scattered light dot array coordinates, obtaining each group of dot array offsets corresponding to each group of scattered light dot array coordinates; Step S332: determining the corresponding depth information of each group based on the dot matrix offset of each group.
[0040] It should be noted that, in this embodiment, the dot matrix offset refers to the set of offsets of the coordinates of each laser point between any set of scattered dot matrix coordinates and the corresponding basic structured light dot matrix coordinates. , then its expression is as follows: ; Where, i=1, 2, 3...N; is the basic structured light dot coordinates, is the offset of the i-th group of lattice.
[0041] According to the above structured light projection formula, the corresponding projection distance calculation formula can also be derived as follows: ; in, is the distance from the speckle array to the laser array, is a known calculation formula based on the basic structured light dot array coordinates.
[0042] It is easy to understand that in this embodiment, according to the above two formulas, the distance between each laser point on each group of scattered spot arrays and the laser array can be directly obtained. However, in actual situations, since there are certain differences in the reference planes corresponding to the coordinates of each group of basic structured light dot arrays, and the coordinates of each group of basic structured light dot arrays are also different, there will be certain calculation errors. Therefore, it is necessary to first calculate the dot offset between each group of basic structured light dot arrays and the corresponding group of scattered spot arrays, and then substitute them into the same reference plane to obtain the depth information of each group of scattered spot arrays.
[0043] Further, in this embodiment, the step of determining the corresponding groups of depth information based on the dot matrix offsets of the groups includes: Step S3321, obtaining each basic dot matrix distance corresponding to each basic structured light dot matrix; Step S3322, determining the scattered spot array distances corresponding to the scattered spot arrays based on the dot array offsets; Step S3323, establishing a lattice distance error function between each of the basic lattice distances and each of the corresponding scattered spot lattice distances by the least square method; It should be noted that in the process of calculating the distance of the laser array for the coordinate values of each laser point of any group of scattered spot arrays, each laser point will produce a certain calculation error, and this type of error will accumulate and become larger. The dot matrix offset of each group of scattered spot arrays can be mutually constrained, so as to effectively suppress the cumulative effect of the error. In this embodiment, the distance from each laser point coordinate of each group of basic structured light dot matrix coordinates to the laser array, that is, the basic dot matrix distance, can be first calculated by the above-mentioned projection distance calculation formula; then, after combining the dot matrix offset with the basic structured light dot matrix coordinates, the distance from each laser point in each group of scattered spot arrays to the laser array is obtained by the above-mentioned projection distance calculation formula. The distance from each laser point coordinate of each group of basic structured light dot matrix coordinates to the laser array is subtracted from the distance from each laser point in each group of scattered spot arrays to the laser array, and the distance between each laser point on each group of scattered spot arrays relative to the corresponding basic structured light dot matrix coordinates, that is, the dot matrix distance, is calculated. Finally, the least squares method is used to construct a dot array distance error function to calculate the calculation error of each group of dot array distances, which is used to represent the measurement error of the distance between each laser point in each group of scattered spot arrays relative to the reference plane where the basic structured light dot array coordinates are located.
[0044] Step S3324, when the output value of the lattice distance error function is the minimum value, obtain the depth information of each group.
[0045] It is easy to understand that in this embodiment, when the dot matrix distance error function corresponding to each group of scattered dot matrix takes the minimum value, the distance from each laser point in the corresponding scattered dot matrix to the laser array is considered to be a distance with higher accuracy, so as to be determined as the depth information corresponding to the group of scattered dot matrix. The above operation is repeatedly performed to obtain each group of depth information corresponding to each group of scattered dot matrix.
[0046] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the above-mentioned first and second embodiments can refer to the above introduction, and will not be repeated later. Figure 4 , before the step of calculating the coordinates of each corresponding basic structured light dot matrix projected onto the surface to be measured based on the structured light projection formula, the step further includes: Step S301, calibrating the structured light camera to obtain calibration data; It should be noted that, in this embodiment, the structured light camera can be calibrated by controlling the structured light camera to capture an image of the calibration object. The feature points on the calibration object are extracted using image processing technology, and then the internal and external parameters of the structured light camera are calculated based on the relationship between the spatial coordinates of these feature points and the image coordinates, that is, the calibration data is obtained.
[0047] Step S302: determining the structured light projection formula based on the calibration data.
[0048] It is easy to understand that different laser wavelengths correspond to different laser deflection angles, so the structured light projection formulas under different laser wavelengths will be different. In this embodiment, the focal length and other parameters of the structured light camera can be determined based on the obtained calibration data, thereby determining the structured light projection formula corresponding to the current laser wavelength.
[0049] Further, in this embodiment, the step of determining the three-dimensional depth data of the surface to be measured based on each group of depth information includes: Step S41, based on each group of the depth information, obtaining a fitting scattered spot array distance corresponding to each group of the scattered spot array; Step S42: determining three-dimensional depth data of the surface to be measured based on the fitted speckle array distance.
[0050] It is easy to understand that the fitted scattered spot array distance refers to the set of distances between each laser point in the scattered spot array and the laser array obtained by fitting after averaging the data. In this embodiment, the distances from each group of scattered spot arrays to the laser array can be obtained respectively according to each group of depth information corresponding to each group of scattered spot arrays, and the distances from each group of scattered spot arrays to the laser array can be averaged to obtain the corresponding fitted scattered spot array distance with higher accuracy. Finally, the relative distances from each point on the surface to be measured to the reference plane can be calculated according to the fitted scattered spot array distance and the corresponding basic dot array distance, that is, the three-dimensional depth data of the surface to be measured can be obtained.
[0051] The present application also provides a three-dimensional depth measurement device. Figure 5 , the three-dimensional depth measurement device comprises: The structured light emission module 10 is used to control the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured by adjusting the driving electrical parameters of the injection laser array, and the laser wavelengths of each group of the basic structured light dot arrays are different; An image acquisition module 20, used for respectively acquiring a plurality of scattered spot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; An information acquisition module 30, configured to acquire multiple groups of depth information corresponding to the surface to be measured based on each group of the basic structured light dot arrays and each group of the scattered light dot arrays; The depth calculation module 40 is used to determine the three-dimensional depth data of the surface to be measured based on each group of the depth information.
[0052] The three-dimensional depth measurement device provided in the embodiment of the present application adopts the three-dimensional depth measurement method in the above embodiment, which can solve the technical problem of how to improve the accuracy of three-dimensional depth measurement. Compared with the prior art, the beneficial effects of the three-dimensional depth measurement device provided in the embodiment of the present application are the same as the beneficial effects of the three-dimensional depth measurement method provided in the above embodiment, and other technical features in the three-dimensional depth measurement device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0053] The present application provides a structured light camera, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the three-dimensional depth measurement method in the above-mentioned embodiment 1.
[0054] Reference below Figure 6 , which shows a schematic diagram of the structure of a structured light camera suitable for implementing the embodiment of the present application. The structured light camera in the embodiment of the present application may include but is not limited to a fixed terminal such as a vehicle-mounted terminal. Figure 6The structured light camera shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0055] like Figure 6 As shown, the structured light camera may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the structured light camera are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the structured light camera to communicate with other devices wirelessly or wired to exchange data. Although the structured light camera with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0056] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0057] The structured light camera provided by the present application adopts the three-dimensional depth measurement method in the above embodiment, which can solve the technical problem of how to improve the accuracy of three-dimensional depth measurement. Compared with the prior art, the beneficial effects of the structured light camera provided by the present application are the same as the beneficial effects of the three-dimensional depth measurement method provided by the above embodiment, and the other technical features in the structured light camera are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0058] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0059] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0060] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the three-dimensional depth measurement method in the above-mentioned embodiment.
[0061] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0062] The computer-readable storage medium may be included in the structured light camera; or may exist independently without being assembled into the structured light camera.
[0063] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the structured light camera, the structured light camera: controls the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured by adjusting the driving electrical parameters of the injection laser array, and each group of the basic structured light dot arrays has a different laser wavelength; obtains multiple groups of scattered light dot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; obtains multiple groups of depth information corresponding to the surface to be measured based on each group of the scattered light dot arrays; and determines the three-dimensional depth data of the surface to be measured based on each group of the depth information.
[0064] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0065] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0066] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0067] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned three-dimensional depth measurement method, and can solve the technical problem of how to improve the accuracy of three-dimensional depth measurement. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the three-dimensional depth measurement method provided in the above-mentioned embodiment, and will not be repeated here.
[0068] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A three-dimensional depth measurement method, characterized in that: Applied to a structured light camera, the three-dimensional depth measurement method comprises the following steps: By adjusting the driving electrical parameters of the injection laser array, the laser array is controlled to emit multiple groups of basic structured light dot arrays to the surface to be measured, and the laser wavelengths of each group of the basic structured light dot arrays are different; Respectively acquiring a plurality of groups of scattered spot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; Based on each group of the scattered spot arrays, obtaining multiple groups of depth information corresponding to the surface to be measured; Based on each set of the depth information, three-dimensional depth data of the surface to be measured is determined.
2. The three-dimensional depth measurement method according to claim 1, characterized in that: The step of acquiring multiple groups of depth information corresponding to the surface to be measured based on each group of the scattered spot arrays comprises: Based on the structured light projection formula, the coordinates of each basic structured light dot matrix corresponding to each group of the basic structured light dot matrix projected onto the surface to be measured are calculated; Obtaining the coordinates of each scattered spot array corresponding to each group of the scattered spot arrays; The depth information of each group is determined based on the coordinates of each basic structured light dot array and the coordinates of each scattered light dot array.
3. The three-dimensional depth measurement method according to claim 2, characterized in that: The step of determining each group of the depth information based on each of the basic structured light dot array coordinates and each of the scattered light dot array coordinates comprises: Based on the basic structured light dot array coordinates and the scattered light dot array coordinates, obtaining each group of dot array offsets corresponding to each group of scattered light dot array coordinates; Based on the dot matrix offsets of each group, the corresponding depth information of each group is determined.
4. The three-dimensional depth measurement method according to claim 3, characterized in that: The step of determining the corresponding groups of depth information based on the dot matrix offsets of the groups includes: Obtaining each basic dot matrix distance corresponding to each basic structured light dot matrix; Based on the dot matrix offsets, determining the scattered dot matrix distances corresponding to the scattered dot matrixes; By using the least square method, a dot matrix distance error function is established between each of the basic dot matrix distances and each of the corresponding scattered dot matrix distances; When the output value of the lattice distance error function is the minimum value, the depth information of each group is obtained.
5. The three-dimensional depth measurement method according to claim 2, characterized in that: Before the step of calculating the coordinates of each corresponding basic structured light dot matrix projected onto the surface to be measured by each group of the basic structured light dot matrix based on the structured light projection formula, the step further includes: Calibrate the structured light camera to obtain calibration data; Based on the calibration data, the structured light projection formula is determined.
6. The three-dimensional depth measurement method according to claim 1, characterized in that: The step of determining the three-dimensional depth data of the surface to be measured based on each group of the depth information comprises: Based on the depth information of each group, obtaining the fitted scattered spot array distance corresponding to each group of scattered spot arrays; Based on the fitted speckled array distance, three-dimensional depth data of the surface to be measured is determined.
7. A three-dimensional depth measurement device, characterized in that: The three-dimensional depth measuring device comprises: A structured light emission module, used for controlling the laser array to emit multiple groups of basic structured light dot arrays to the surface to be measured by adjusting the driving electrical parameters of the injection laser array, wherein the laser wavelength of each group of the basic structured light dot arrays is different; An image acquisition module, used for respectively acquiring a plurality of groups of scattered spot arrays formed by each group of the basic structured light dot arrays on the surface to be measured; An information acquisition module, used for acquiring multiple groups of depth information corresponding to the surface to be measured based on each group of the basic structured light dot arrays and each group of the scattered light dot arrays; The depth calculation module is used to determine the three-dimensional depth data of the surface to be measured based on each group of the depth information.
8. A structured light camera, characterized in that: The structured light camera comprises: a memory, a processor, and a three-dimensional depth measurement program stored in the memory and executable on the processor, wherein the three-dimensional depth measurement program is configured to implement the steps of the three-dimensional depth measurement method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores a three-dimensional depth measurement program, and when the three-dimensional depth measurement program is executed by the processor, the steps of the three-dimensional depth measurement method according to any one of claims 1 to 6 are implemented.