A dataset generation method for phase estimation network training

By using the binocular stereo matching data set to generate a monocular structured light data set, the problems of time-consuming and labor-intensive data set collection and low recognition rate in monocular structured light measurement technology are solved, and efficient data set generation and deep learning model development are achieved. Generalization capabilities reduce labor costs and computing resource requirements.

CN114596351BActive Publication Date: 2024-09-27HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210070982.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2024-09-27
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

Existing monocular structured light 3D measurement technology is time-consuming and laborious in data set collection and sample database maintenance, and is difficult to apply to real scenes. It requires high computing resources, resulting in low recognition rate.

Method used

By using the binocular stereo matching data set to generate a monocular structured light data set, a structured light 3D scanner is used to project the phase shift fringe image, and the phase label value is calculated by combining the left image, right image and disparity image in the binocular stereo matching data set. Generate training images and phase labels, and synthesize a monocular structured light data set.

Benefits of technology

It realizes that there is no need to actually collect data, and a large number of monocular structured light data sets suitable for real scenes are generated, which reduces labor costs. The trained deep learning model is better than traditional methods in real scenes, and the accuracy is equivalent to that of real data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114596351B
    Figure CN114596351B
Patent Text Reader

Abstract

The present invention relates to a data set generation method for phase estimation network training, comprising: using a structured light three-dimensional scanner to project a phase shift fringe pattern onto a plane, photographing the phase shift fringe pattern and storing it as a reference pattern; collecting and acquiring a binocular stereo matching data set, replacing its right image with a reference image, determining the final fringe intensity falling on each point of the left image, and generating a training image; calculating the wrapped phase according to the reference image, and obtaining the phase label value of a certain point according to the parallax mapping; combining the training image and the phase label value to synthesize a monocular structured light data set; the present invention synthesizes an image of a monocular structured light data set by using an existing binocular stereo matching data set, and a deep learning model trained by the data set can be generalized in real scenes, and its effect is better than a traditional three-step phase shift algorithm, and the accuracy is equivalent to that of a model trained by using a real data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of three-dimensional vision technology, in particular to the field of monocular fringe structured light three-dimensional measurement. Background Art

[0002] With the development of deep learning technology, its application in various fields has shown good results and strong vitality. In recent years, there has been more and more research on structured light 3D reconstruction technology based on deep learning, and some good progress has been made. For deep learning technology, data sets are a crucial part. For structured light, there are currently two main methods for obtaining data sets. One method is to use a structured light system to collect real data sets. The quality of the data sets obtained in this way is relatively high and can be used in real scenes, but the disadvantage is that it is difficult to collect a large amount of data. The other method is to use a simulated data set. This method can easily obtain a large amount of data, but it is often only applicable to It is only suitable for simulation scenes and difficult to apply to real scenes. In addition, although the binocular vision system is the preferred method for three-dimensional stereoscopic vision at present, one difficulty of the binocular system is that the amount of calculation is very large and the performance requirements of the computing unit are very high, which makes the productization and miniaturization of the binocular system difficult and the cost is very high. Therefore, monocular vision technology is still preferred in practical applications. The advantages of monocular vision are low cost, low requirements for computing resources, and relatively simple system structure. However, its disadvantage is that a huge sample database must be continuously updated and maintained to ensure that the system achieves a high recognition rate. Therefore, it is urgent to solve the problems of time-consuming and labor-intensive collection of monocular sample data sets and insufficient samples. Summary of the invention

[0003] In order to solve the above problems, the present invention achieves the above objectives through the following technical solutions:

[0004] A method for generating a data set for phase estimation network training comprises the following steps:

[0005] S1, using a structured light 3D scanner to project a phase-shift fringe pattern onto a plane, and photographing the phase-shift fringe pattern to store it as a reference image;

[0006] S2, collect and obtain the binocular stereo matching data set, and after replacing the right image with the reference image, determine the final stripe intensity falling on each point in the left image to generate a training image;

[0007] S3, calculating the wrapped phase according to the reference image, and obtaining the phase label value of a certain point according to the disparity mapping;

[0008] S4. Combine training images and phase label values ​​to synthesize a monocular structured light dataset.

[0009] As a further optimization solution of the present invention, the binocular stereo matching data in S2 includes a left image, a right image and a left disparity image.

[0010] As a further optimization solution of the present invention, the binocular stereo matching data set in S2 also includes a surface normal map and a surface reflectivity map.

[0011] As a further optimization solution of the present invention, the step of determining the final fringe intensity of each point in the left image in S2 includes:

[0012] S21, according to the left disparity map of the binocular stereo matching data set, establish a point-to-point correspondence between the left image and the fringe map, that is, subtract the disparity value of a point in the left image from the abscissa value of the point, and use it as the abscissa of the point on the reference image, so as to obtain the initial fringe intensity falling on the point;

[0013] S22, attenuating the initial fringe intensity at a certain point according to the relationship that the fringe intensity is inversely proportional to the square of the depth, to obtain a first fringe intensity after attenuation; wherein the depth of the certain point is obtained according to the parallax value, the baseline distance and the focal length;

[0014] S23, obtaining the coordinates of a certain point in the camera coordinate system, obtaining the direction vector between the certain point and the projector coordinates, performing an inner product between the direction vector of the certain point and the surface normal vector, and multiplying the inner product with the first fringe intensity to obtain a second fringe intensity;

[0015] S24, multiplying the second fringe intensity by the reflectivity of a certain point to obtain a final fringe intensity.

[0016] As a further optimization scheme of the present invention, the formula for obtaining the final fringe intensity falling on a certain point in S24 is:

[0017]

[0018]

[0019] Among them, I is the pixel intensity of the target image, x, y are the horizontal and vertical coordinates, q is the coefficient used to control the proportion of adding ambient light, and the value range is 0 to 1; α is the reflectivity, is the surface normal vector of the point, I f is the pixel intensity of the fringe image saved above, d is the disparity value of the point, Z is the depth of the point, BF is the baseline length and focal length respectively, I l is the pixel intensity of the left image in the binocular dataset, is the direction vector from the point to the projector in the camera coordinate system.

[0020] As a further optimization solution of the present invention, the step of calculating the wrapping phase according to the reference image and obtaining the phase label value according to the disparity mapping in S3 includes:

[0021] S31, calculating the wrapping phase value according to the N-step phase shift formula based on the phase shift fringe pattern captured in S1;

[0022] S32. Obtain a phase label value corresponding to a certain point according to the disparity mapping.

[0023] As a further optimization solution of the present invention, the formula for calculating the wrapped phase by the N-step phase shift in S31 is:

[0024]

[0025] Among them, Φ(x,y) is the wrapped phase, S and C represent its numerator and denominator respectively; N is the number of phase shift steps.

[0026] As a further optimization solution of the present invention, the formula for obtaining the phase label value corresponding to a certain point according to the disparity mapping in S32 is:

[0027] S′(x,y)=S(xd,y)

[0028] C′(x,y)=C(xd,y)

[0029] Among them, S′(x,y), C′(x,y) are the phase labels of the left scene, S(x,y), C(x,y) are the phase labels of the reference image, and d is the disparity.

[0030] The beneficial effects of the present invention are:

[0031] 1) The present invention synthesizes the image of a monocular structured light dataset by utilizing the existing binocular stereo matching dataset, and the deep learning model trained with the dataset can be generalized to real scenes, with better effect than the traditional three-step phase shift algorithm, and comparable accuracy to the model trained with the real dataset. At the same time, since there are many binocular stereo matching datasets available, a large number of required monocular structured light datasets can be synthesized.

[0032] 2) This achieves the effect of synthesizing the data set required by the phase estimation network using the existing binocular stereo matching data set without the need for real data collection. Compared with the real collected data set, the synthesized data set of the present invention is larger in number, has more scenes, and reduces labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of the steps of converting binocular stereo matching data sets into monocular structured light data sets in the present invention;

[0034] Figure 2 Schematic diagram of the principle of the monocular structured light data set synthesis method in the present invention; DETAILED DESCRIPTION

[0035] The present application is further described in detail below in conjunction with the accompanying drawings. It is necessary to point out here that the following specific implementation methods are only used to further illustrate the present application and cannot be understood as limiting the scope of protection of the present application. Technical personnel in this field can make some non-essential improvements and adjustments to the present application based on the above application content.

[0036] like Figure 1 , Figure 2 A data set generation method for phase estimation network training shown in FIG. 1 comprises the following steps:

[0037] S1, using a structured light 3D scanner to project a phase-shift fringe pattern onto a plane, and photographing the phase-shift fringe pattern to store it as a reference image;

[0038] Specifically, a single-camera-single-projector structured light system was used to project a set of thirty-six phase-shifted fringe patterns onto a plane and photographed and saved;

[0039] S2, collect and obtain the binocular stereo matching data set, and after replacing the right image with the reference image, determine the final stripe intensity falling on each point in the left image to generate a training image;

[0040] In this embodiment, the process of collecting and acquiring a binocular stereo matching data set also includes collecting and acquiring a binocular stereo matching data set. In the present invention, the binocular stereo matching data set only needs to include a left image, a right image, and a left disparity map. Therefore, the binocular stereo matching data set of the present invention can use an IRS data set, which includes a left image, a right image, and a left disparity map. As a preferred solution, the binocular stereo matching data set also includes a surface normal map and a surface reflectivity map. The right image is replaced with the saved fringe map (one or more of them are selected as needed) and image processing is performed.

[0041] Specifically, S21, according to the left disparity map of the binocular stereo matching data set, a point-to-point correspondence between the left image and the fringe image is established, that is, the abscissa value of a point in the left image minus the disparity value of the point is used as the abscissa value of the point on the reference image, and then the initial fringe intensity falling on the point is obtained; since the disparity value is often a decimal, linear interpolation is required when mapping to obtain the fringe intensity;

[0042] S22, considering the depth of the point, the initial fringe intensity of the point is attenuated according to the relationship that the fringe intensity is inversely proportional to the square of the depth, to obtain a first fringe intensity after attenuation; wherein the depth of the point is obtained according to the parallax value, the baseline distance and the focal length;

[0043] S23, considering the curved surface, for a point in the pixel coordinate system, the coordinates of the point in the camera coordinate system are calculated, and the direction vector between the point and the projector coordinate (B, 0, 0) is calculated, and then the inner product of the direction vector of the point and the surface normal vector is calculated, and the inner product is multiplied by the first fringe intensity to obtain the second fringe intensity;

[0044] S24, considering the reflectivity of different materials, the second fringe intensity is multiplied by the reflectivity of a certain point to obtain the final fringe intensity;

[0045] Specifically, for each point on the left image, the following formula can be used to determine the intensity of the stripes that eventually fall on each point:

[0046]

[0047]

[0048] Among them, I is the pixel intensity of the target image, x, y are the horizontal and vertical coordinates, q is the coefficient used to control the proportion of adding ambient light, and the value range is 0 to 1; α is the reflectivity, is the surface normal vector of the point, I f is the pixel intensity of the fringe image saved above, d is the disparity value of the point, Z is the depth of the point, BF is the baseline length and focal length respectively, I l is the pixel intensity of the left image in the binocular dataset,

[0049] is the direction vector from the point to the projector in the camera coordinate system. The specific method of obtaining it is:

[0050] For each point in the left image, convert its pixel coordinate system to the camera coordinate system. Let its coordinates in the pixel coordinate system be (u, v), then its coordinates in the camera coordinate system (X, Y, Z) are:

[0051]

[0052]

[0053] Among them, cx and cy are the coordinates of the main point;

[0054] then:

[0055]

[0056] Of course, when d is a decimal, I f Perform linear interpolation;

[0057] S3, calculate the wrapped phase according to the reference image, and obtain the phase label value of a certain point according to the disparity mapping; specifically,

[0058] S31, according to the phase shift fringe pattern photographed in S1, a calculation is performed according to a formula for obtaining the wrapping phase by N-step phase shift to obtain a wrapping phase value; wherein the formula for obtaining the wrapping phase by N-step phase shift is:

[0059]

[0060] Where Φ(x,y) is the wrapped phase, S and C represent its numerator and denominator respectively; N is the number of phase shift steps, where N = 36;

[0061] S32, obtaining a phase label value corresponding to a certain point according to the disparity mapping; specifically, the formula for obtaining a phase label value corresponding to a certain point according to the disparity mapping is:

[0062] S′(x,y)=S(xd,y)

[0063] C′(x,y)=C(xd,y)

[0064] Among them, S′(x,y), C′(x,y) are the phase labels of the left scene, S(x,y), C(x,y) are the phase labels of the reference image, and d is the disparity;

[0065] Thus, the phase label value of the scene can be obtained; also, since the disparity d may be a decimal, linear interpolation is required during mapping;

[0066] S4, synthesize the monocular structured light dataset by combining the training images and phase label values;

[0067] It should be noted here that after synthesizing the monocular structured light dataset, some secondary processing is required, including occlusion area processing and invalid area processing;

[0068] Specifically, the occlusion area refers to the area that is blocked by the foreground and cannot be illuminated by the projector. The processing method is: if there are two points in the left image that are mapped to the same point in the right image through parallax, the one with the smaller parallax is determined to be the occlusion point, because the smaller the parallax, the greater its depth, belonging to the background, and will be blocked by the foreground;

[0069] Invalid area processing is for overexposed or dark areas; the processing method is: for a scene, if the maximum pixel value minus the minimum pixel value of the three synthesized fringe images at a certain position is less than 10, it is determined to be an invalid area. The threshold can be set according to the specific situation;

[0070] Furthermore, for occluded areas and invalid areas, special pixel values ​​such as 0 can be set so that they can be eliminated when training the neural network;

[0071] In the binocular stereo matching dataset, we know the structure of each scene (i.e., depth information), and virtually replace the right camera with a projector to project a fringe pattern. Since the scene structure is known, we simulate the imaging principle of the structured light system in the real world, synthesize the required fringe pattern step by step, and generate the corresponding phase label at the same time, which can be used to train the phase estimation network. In this way, the image processing method of synthesizing a monocular structured light dataset based on the existing binocular stereo matching dataset can be generalized to the real scene with the deep learning model trained by using the dataset, which is better than the traditional three-step phase shift algorithm and has the same accuracy as the model trained by using the real dataset. At the same time, since there are many binocular stereo matching datasets at present, a large number of required monocular structured light datasets can be synthesized.

[0072] Compared with the real collected data set, this method can synthesize a sufficient amount of data and save manpower and material costs; compared with the simulated data set, the data set synthesized by this method is of higher quality. The deep learning model trained using this data set can be generalized to real scenes, and the phase accuracy predicted by the network is high, and its accuracy is comparable to that of the model obtained by training the real data set; it greatly reduces the time-consuming and labor-intensive manual collection of data sets, insufficient samples and other problems.

[0073] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A method for generating a data set for phase estimation network training, characterized in that: The following steps are included: S1, using a structured light 3D scanner to project a phase-shift fringe pattern onto a plane, and photographing the phase-shift fringe pattern to store it as a reference image; S2, collecting and acquiring a binocular stereo matching data set, and after replacing the right image with the reference image, determining the final stripe intensity falling on each point of the left image, and generating a training image; wherein the binocular stereo matching data set in S2 includes a left image, a right image and a left disparity map, as well as a surface normal map and a surface reflectivity map; The step of determining the final fringe intensity of each point in the left image in S2 comprises: S21, according to the left disparity map of the binocular stereo matching data set, establish a point-to-point correspondence between the left image and the fringe map, that is, subtract the disparity value of a point in the left image from the abscissa value of the point, and use it as the abscissa of the point on the reference image, so as to obtain the initial fringe intensity falling on the point; S22, attenuating the initial fringe intensity at a certain point according to the relationship that the fringe intensity is inversely proportional to the square of the depth, to obtain a first fringe intensity after attenuation; wherein the depth of the certain point is obtained according to the parallax value, the baseline distance and the focal length; S23, obtaining the coordinates of a certain point in the camera coordinate system, obtaining the direction vector between the certain point and the projector coordinates, performing an inner product between the direction vector of the certain point and the surface normal vector, and multiplying the inner product with the first fringe intensity to obtain a second fringe intensity; S24, multiplying the second fringe intensity by the reflectivity of a certain point to obtain a final fringe intensity; the formula for obtaining the final fringe intensity at a certain point in S24 is: Among them, I is the pixel intensity of the target image, x, y are the horizontal and vertical coordinates, q is the coefficient used to control the proportion of adding ambient light, and the value range is 0 to 1; α is the reflectivity, is the surface normal vector of the point, I f is the pixel intensity of the fringe image saved above, d is the disparity value of the point, Z is the depth of the point, BF is the baseline length and focal length respectively, I l is the pixel intensity of the left image in the binocular dataset, is the direction vector from the point to the projector in the camera coordinate system; S3, calculating the wrapped phase according to the reference image, and obtaining the phase label value of a certain point according to the disparity mapping; S4. Combine training images and phase label values ​​to synthesize a monocular structured light dataset.

2. The method for generating a data set for phase estimation network training according to claim 1, characterized in that: The step of calculating the wrapped phase according to the reference image and obtaining the phase label value according to the disparity mapping in S3 includes: S31, calculating the wrapping phase value according to the N-step phase shift formula based on the phase shift fringe pattern captured in S1; S32. Obtain a phase label value corresponding to a certain point according to the disparity mapping.

3. The method for generating a data set for phase estimation network training according to claim 2, characterized in that: The formula for calculating the wrapping phase by the N-step phase shift in S31 is: Among them, Φ(x,y) is the wrapped phase, S and C represent its numerator and denominator respectively; N is the number of phase shift steps.

4. The method for generating a data set for phase estimation network training according to claim 3, characterized in that: The formula for obtaining the phase label value corresponding to a certain point according to the disparity mapping in S32 is: S ′ (x,y)=S(x-d,y) C ′ (x,y)=C(x-d,y) Among them, S′(x,y), C′(x,y) are the phase labels of the left scene, S(x,y), C(x,y) are the phase labels of the reference image, and d is the disparity.