A method and system for measuring target three-dimensional information
Through compound fringe pattern projection and Fourier analysis, combined with the compressed sensing algorithm, the problem of low robustness and low accuracy of depth estimation in light field acquisition technology is solved, efficient three-dimensional information measurement is achieved, and optical throughput and resolution.
Patent Information
- Application Number
- CN202210947414.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-08-09
AI Technical Summary
Existing light field acquisition technology has problems with low robustness and low accuracy in depth estimation, and traditional methods need to sacrifice spatial resolution in exchange for angular resolution or reduce the optical throughput of the imaging system.
Using composite fringe pattern projection, compressed sensing algorithm and Fourier analysis method, through the light field transmission matrix and the modified intensity of the encoded image, the structured light field and phase information are obtained, the angle variance and light field depth are determined, the depth map is constructed and the three-dimensional coordinates are calculated Information conversion to achieve three-dimensional measurement of target objects.
It improves the robustness and accuracy of depth estimation, avoids resolution trade-offs, and improves the optical throughput of imaging systems, enabling simultaneous measurement of object shape and color information.
Smart Images

Figure CN115307577B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of light field information measurement, and in particular to a method and system for measuring target three-dimensional information. Background Art
[0002] Light field acquisition technology can not only capture traditional two-dimensional images, but also capture scene depth information that traditional cameras cannot obtain.
[0003] At present, there are three main types of light field acquisition technologies: camera array, integral imaging technology, and mask-based light field acquisition technology. Camera array uses multiple cameras to shoot the same target at the same time, but its structure is large and expensive; integral imaging is to add a microlens array in front of the sensor to split the light again to achieve the acquisition of images from different directions and obtain the light field. This method uses a single camera to capture light field information, which inevitably requires sacrificing spatial resolution in exchange for angular resolution. That is, when the sensor resolution is constant, although multi-view images can be obtained, the spatial resolution of each image is reduced; mask-based light field acquisition is to add an optical element mask between the camera lens and the sensor to achieve optical modulation of the light entering the camera aperture, and then restore the light field through linear or nonlinear algorithms. Although the resolution trade-off problem is avoided, the light throughput of the imaging system is reduced. The above three light field imaging methods are all passive light field imaging, and they all have problems with low robustness and accuracy when performing depth estimation. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides a method and system for measuring three-dimensional information of a target.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A method for measuring three-dimensional information of a target, comprising:
[0007] Acquire a light field transmission matrix and a composite fringe pattern; the composite fringe pattern comprises a red layer, a green layer and a blue layer; the red layer, the green layer and the blue layer are all composed of sinusoidal fringe patterns with different fringe frequencies;
[0008] Projecting the composite fringe pattern onto the target object to be measured to obtain a composite fringe pattern carrying contour information of the target object to be measured;
[0009] Capturing a composite fringe pattern carrying the contour information of the target object to be tested into three color channels to obtain a coded image modulated by the target object to be tested;
[0010] Introducing a coupling coefficient to obtain a modified intensity of the coded image based on the coded image;
[0011] Using the light field transmission matrix and the modified intensity of the coded image, a compressed sensing algorithm is used under an imaging model of a light field camera to obtain a structured light field of each color channel; the structured light field includes spatial information and angle information of light reflected by the target object to be measured;
[0012] Using Fourier analysis method, phase information is obtained based on the structured light field;
[0013] determining an angle variance based on the phase information;
[0014] determining a light field depth based on the angular variance;
[0015] Constructing a depth map of the object to be measured based on the light field depth;
[0016] The depth map is fused and the three-dimensional coordinate information is converted to obtain three-dimensional measurement information of the object to be measured; the three-dimensional measurement information includes three-dimensional coordinate information and three-dimensional color information.
[0017] Preferably, a three-frequency selection method is used to determine the number of projected fringes in each color channel in the composite fringe pattern.
[0018] Preferably, the modification intensity of the encoded image is d′ i (m,n):
[0019] d′ i (m,n)=d i (m,n)-∑c ij d i (m,n)
[0020] Among them, d i (m,n) is the encoded image, (m,n) is the pixel coordinate, c ij is the coupling coefficient, i=1,2,3, j=1,2,3, 1 is red, 2 is green, and 3 is blue.
[0021] Preferably, the Fourier analysis method is used to obtain phase information based on the structured light field, specifically including:
[0022] Perform Fourier transform on the structured light field of color channel i to obtain the spatial spectrum of color channel i; the spatial spectrum includes zero-order A i (f s ,f u ), side lobe C i (f s -f i,0 ,f u ) and side lobe C i * (f s +f i,0 ,fu ), where f s is the frequency in the spatial plane, f u is the frequency in the angle plane, f i,0 is the carrier frequency of color channel i;
[0023] Taking the carrier frequency of the color channel i as the center frequency, a bandpass filter is used to separate the side lobe C from the spatial spectrum. i (f s -f i,0 ,f u );
[0024] The side lobe C i (f s -f i,0 ,f u ) performs Fourier transform to obtain a Fourier transform result;
[0025] Performing an inverse tangent calculation on the Fourier transform result obtains the phase information of the color channel i.
[0026] Preferably, determining the angle variance according to the phase information specifically includes:
[0027] Performing a shearing operation on the phase information to obtain a phase encoding field after digital refocusing;
[0028] Integrating the digitally refocused phase encoding field in the angle dimension to obtain a refocused phase map;
[0029] Determine a weighted angular variance of the phase encoding field after the digital refocusing relative to the refocused phase map; and use the weighted angular variance as the angular variance.
[0030] Preferably, the depth map is fused and the three-dimensional coordinate information is converted to obtain three-dimensional measurement information of the object to be measured, which specifically includes:
[0031] Extracting pixel coordinates of the object to be measured in the depth map, and converting the pixel coordinates into a world coordinate system to obtain three-dimensional coordinate information of the object to be measured;
[0032] The depth map of each color channel is fused to obtain the three-dimensional color information of the object to be measured.
[0033] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0034] The target three-dimensional information measurement method provided by the present invention projects the acquired composite fringe pattern onto the target object to be measured to obtain the composite fringe pattern carrying the contour information of the target object to be measured, captures the composite fringe pattern to three color channels to obtain a coded image modulated by the target object to be measured, then introduces a coupling coefficient to obtain the modified intensity of the coded image based on the coded image, uses the light field transmission matrix and the modified intensity of the coded image, and adopts a compressed sensing algorithm under the imaging model of a light field camera to obtain the structured light field of each color channel, then adopts a Fourier analysis method to obtain phase information based on the structured light field, determines the angular variance based on the phase information, and then determines the light field depth based on the angular variance to obtain a depth map, and finally, fuses the depth map and converts the three-dimensional coordinate information to obtain the three-dimensional measurement information of the object to be measured, thereby achieving shape and color measurement of the target object to be measured while improving the robustness and accuracy of depth estimation.
[0035] The present invention also provides a target three-dimensional information measurement system, the system comprising:
[0036] A calibration device, used to obtain a system transmission matrix;
[0037] A projection device, used for generating a composite fringe pattern and for projecting the composite fringe pattern onto an object to be measured;
[0038] A light field imaging device, connected to the calibration device, used to capture a composite fringe pattern carrying the contour information of the target object to be measured to three color channels, obtain a coded image modulated by the target object to be measured, introduce a coupling coefficient to obtain a modified intensity of the coded image based on the coded image, and use the light field transmission matrix and the modified intensity of the coded image to obtain a structured light field of each color channel using a compressed sensing algorithm under an imaging model of a light field camera, and record the structured light field on a two-dimensional sensor image; the structured light field includes spatial information and angle information of light reflected by the target object to be measured;
[0039] A computing device is connected to the light field imaging device, and is used to obtain phase information based on the structured light field by using a Fourier analysis method, to determine an angular variance based on the phase information, to determine a light field depth based on the angular variance, to construct a depth map of the object to be measured based on the light field depth, and to fuse the depth map and convert three-dimensional coordinate information to obtain three-dimensional measurement information of the object to be measured; the three-dimensional measurement information includes three-dimensional coordinate information and three-dimensional color information.
[0040] Preferably, the computing device comprises:
[0041] A light field reconstruction unit, connected to the light field imaging device, and used to demodulate the structured light field information encoded by the light field imaging device;
[0042] A light field depth estimation unit is connected to the light field reconstruction unit, and is used to perform Fourier analysis on the structured light field information of each color channel to obtain phase information, determine the angular variance according to the phase information, determine the light field depth based on the angular variance, construct a depth map of the object to be measured based on the light field depth, fuse the depth map and convert the three-dimensional coordinate information to obtain three-dimensional measurement information of the object to be measured.
[0043] Since the technical effect achieved by the target three-dimensional information measurement system provided by the present invention is the same as the technical effect achieved by the target three-dimensional information measurement method provided above, it will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A flow chart of the target three-dimensional information measurement method provided by the present invention;
[0046] Figure 2 A flowchart of the implementation process provided for an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of encoding an optical fiber by a diffuser provided in an embodiment of the present invention;
[0048] Figure 4 A structural diagram of a light field imaging device provided by an embodiment of the present invention;
[0049] Figure 5 A composite fringe projection diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] The object of the present invention is to provide a method and system for measuring three-dimensional information of a target, which can improve the robustness and accuracy of depth estimation.
[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] like Figure 1 As shown, the target three-dimensional information measurement method provided by the present invention includes:
[0054] Step 100: Obtain the light field transmission matrix and the composite fringe pattern. The composite fringe pattern includes a red layer, a green layer, and a blue layer. The red layer, the green layer, and the blue layer are all composed of sinusoidal fringe patterns with different fringe frequencies. Among them, the three-frequency optimal selection method is used to determine the number of projected fringes for each color channel in the composite fringe pattern. For example, a sinusoidal fringe pattern with n frequencies is generated using Matlab software. Since the field of view of the projector is determined, the sinusoidal fringe frequency is only related to the number of projected fringes. The optimal frequency selection process is used to determine the number of projected fringes for the corresponding channel. The calculation formula is:
[0055] N fh =N f0 -(N f0 ) (h-1) / (n-1) , h=1,...,n-1
[0056] Among them, N f0 and N fh are the number of fringes in the largest fringe set and the number of fringes in the hth fringe set, respectively. In the embodiment of the present invention, n=3, and the three projection fringe frequencies correspond to the three color channels of R, G, and B, respectively, so as to obtain parallel collection of fringe data.
[0057] Step 101: Projecting the composite fringe pattern onto a target object to be measured to obtain a composite fringe pattern carrying contour information of the target object to be measured.
[0058] Step 102: Capture the composite fringe pattern carrying the contour information of the target object to be tested into three color channels to obtain a coded image modulated by the target object to be tested.
[0059] Step 103: Introduce the coupling coefficient to obtain the modification strength of the coded image based on the coded image. The modification strength of the coded image is d′ i (m,n):
[0060] d′ i (m,n)=d i (m,n)-∑c ij d i (m,n), where d i (m,n) is the encoded image, (m,n) is the pixel coordinate, c ij is the coupling coefficient, i=1,2,3, j=1,2,3, 1 is red, 2 is green, and 3 is blue.
[0061] Step 104: Using the light field transmission matrix and the modified intensity of the coded image, a compressed sensing algorithm is used under the imaging model of the light field camera to obtain the structured light field of each color channel. The structured light field includes the spatial information and angle information of the reflected light of the target object to be measured.
[0062] Step 105: Use Fourier analysis to obtain phase information based on the structured light field. Specifically:
[0063] The spatial spectrum of color channel i is obtained by Fourier transforming the structured light field of color channel i. The spatial spectrum includes zero-order A i (f s ,f u ), and the side lobe C i (f s -f i,0 ,f u ) and C i * (f s +f i,0 ,f u ). Among them, f s is the frequency in the spatial plane, f u is the frequency in the angle plane, f i,0 is the carrier frequency of color channel i.
[0064] Taking the carrier frequency of color channel i as the center frequency, a bandpass filter is used to separate the side lobe C from the spatial spectrum. i (f s -f i,0 ,f u ).
[0065] Side lobe C i (f s -f i,0 ,f u ) is subjected to Fourier transform to obtain the Fourier transform result.
[0066] The inverse tangent calculation is performed on the Fourier transform result to obtain the phase information of color channel i.
[0067] Step 106: Determine the angle variance according to the phase information. Specifically:
[0068] The phase information is sheared to obtain the phase encoding field after digital refocusing.
[0069] The phase-encoded field after digital refocusing is integrated in the angular dimension to obtain the refocused phase map.
[0070] The weighted angular variance of the phase-encoded field after digital refocusing relative to the refocused phase map is determined, and the weighted angular variance is used as the angular variance.
[0071] Step 107: Determine the light field depth based on the angular variance.
[0072] Step 108: construct a depth map of the object to be measured based on the light field depth.
[0073] Step 109: Fusing the depth map and converting the three-dimensional coordinate information to obtain the three-dimensional measurement information of the object to be measured. The three-dimensional measurement information includes three-dimensional coordinate information and three-dimensional color information. Specifically:
[0074] The pixel coordinates of the object to be measured in the depth map are extracted, and the pixel coordinates are converted to the world coordinate system to obtain the three-dimensional coordinate information of the object to be measured.
[0075] The depth map of each color channel is fused to obtain the three-dimensional color information of the object to be measured.
[0076] In order to implement the above-mentioned target three-dimensional information measurement method, the present invention also provides a target three-dimensional information measurement system, which includes:
[0077] The calibration device is used to obtain the system transmission matrix.
[0078] The projection device is used to generate a composite fringe pattern and to project the composite fringe pattern onto an object to be measured.
[0079] The light field imaging device is connected to the calibration device, and is used to capture the composite fringe pattern carrying the contour information of the target object to be measured to three color channels, obtain the coded image modulated by the target object to be measured, introduce the coupling coefficient to obtain the modified intensity of the coded image based on the coded image, and use the light field transmission matrix and the modified intensity of the coded image to obtain the structured light field of each color channel using the compressed sensing algorithm under the imaging model of the light field camera, and record the structured light field on the two-dimensional sensor image. The structured light field includes the spatial information and angle information of the light reflected by the target object to be measured.
[0080] A computing device is connected to the light field imaging device, and is used to obtain phase information based on the structured light field using the Fourier analysis method, to determine the angle variance based on the phase information, to determine the light field depth based on the angle variance, to construct a depth map of the object to be measured based on the light field depth, and to fuse the depth map and convert the three-dimensional coordinate information to obtain three-dimensional measurement information of the object to be measured. The three-dimensional measurement information includes three-dimensional coordinate information and three-dimensional color information.
[0081] The computing device includes:
[0082] The light field reconstruction unit is connected to the light field imaging device and is used to demodulate the structured light field information encoded by the light field imaging device.
[0083] The light field depth estimation unit is connected to the light field reconstruction unit, and is used to perform Fourier analysis on the structured light field information of each color channel to obtain phase information, determine the angular variance based on the phase information, determine the light field depth based on the angular variance, construct a depth map of the object to be measured based on the light field depth, fuse the depth map and convert the three-dimensional coordinate information to obtain three-dimensional measurement information of the object to be measured.
[0084] An embodiment is provided below to illustrate the implementation process of the above-mentioned target three-dimensional information measurement method and system.
[0085] In this embodiment, first, a projection device is used at the light source end to color encode the illumination light source, and the color channel is used as a carrier of fringes at three different frequencies to achieve active light field depth estimation. Then, a light field imaging device is used at the receiving end to encode the structured light field information, and the plane where the diffuser of the light field imaging device is located is used as the angle sampling plane to encode the incident angle of the light, and another parallel plane is used as the spatial sampling plane to represent the light field encoded by the diffuser, and a lens-free scattered light field transmission model is established to record the relevant information of the structured light field.
[0086] Based on this, Figure 2 As shown, the specific implementation process is as follows:
[0087] Step 201, light field imaging system calibration: Since the light field imaging device adopts a diffuser phase-encoded light field imaging method (such as Figure 3 As shown in the figure, the encoding of light in space by the diffuser has a certain translation invariant property, and the response of a point light source on the optical axis of the light field imaging device to the system is recorded, thereby completing the calibration of the light field imaging device and obtaining the light field transmission matrix T.
[0088] In this embodiment, a calibration device is mainly used to calibrate the light field imaging system. For example, a halogen lamp is used to generate incoherent light. The halogen lamp is placed in a black opaque box. A 15μm pinhole is placed in front of the box to simulate the generation of a point light source. The distance between the pinhole and the camera sensor is approximately 20-50mm. The diffuser is a circular optical diffuser made of polycarbonate with an effective aperture of 22.5mm, a scattering angle of 0.5 degrees, and a transmittance of 85%. The diffuser is placed about 10mm in front of the camera sensor so that the point light source can produce a high-contrast pseudo-random pattern on the camera sensor. At this time, the diffuser can be considered to be in the "focus" position. In front of the diffuser, a 6x6mm 2 The square aperture constrains the size of the generated image, so that the pseudo-random pattern generated by the illuminated diffuser area can be fully recorded by the camera sensor, avoiding the loss of object point information.
[0089] Step 202, designing coded projection stripes: using Matlab software on a personal computer to create three sinusoidal stripe patterns with different stripe frequencies, and combining them into the red, green and blue layers of a color image to form a composite stripe pattern. For example, using Matlab software to generate a sinusoidal stripe pattern with n frequencies, since the field of view of the projector is determined, the sinusoidal stripe frequency is only related to the number of projected stripes, and the number of projected stripes of the corresponding channel is determined by the optimal frequency selection process, and the calculation formula is:
[0090] N fh =N f0 -(N f0 ) (h-1) / (n-1) , h=1,...,n-1
[0091] Among them, N f0 and N fm are the number of fringes in the largest fringe set and the number of fringes in the hth fringe set, respectively. In the embodiment of the present invention, n=3, and the three projection fringe frequencies correspond to the three color channels of R, G, and B, respectively, so as to obtain parallel collection of fringe data. Figure 5 As shown, a composite fringe pattern consisting of three different frequencies is obtained. According to the optimal three-frequency selection process, the number of stripes of the three color channels of R, G, and B are 49, 48, and 42, respectively, covering the field of view of the projector.
[0092] Step 203, projecting the composite fringe pattern onto the target object using a projection device. For example, using a JMGC-JHC700 digital projector to project the composite fringe pattern obtained in step 202 onto the surface of the target object. Steps 202 and 203 are mainly implemented using a projection device.
[0093] Step 204, using a light field imaging device to record the coded fringe image modulated by the contour of the target object to be measured, specifically: first, use a 3-CCD diffuser coded light field camera to shoot the target object to be measured, and capture the composite fringe image carrying the contour information of the target object to be measured into three channels to obtain the coded image modulated by the target object to be measured. i (i=1,2,3). Then, due to the interference between channels, the coupling coefficient is introduced to obtain the modified intensity d′ of the coded image of each channel i , in order to solve the interference problem between the three channels. Among them, the coded image d modulated by the object under test is obtained i (i=1, 2, 3) represents the coded image recorded by the i-th color channel sensor, which can be expressed as d i (m,n):
[0094]
[0095] Among them, (m,n) represents the pixel coordinates of the image on the sensor, a i represents the DC component of the sinusoidal fringe intensity, b i represents the modulation depth, p i Indicates the period of the stripes in pixels. is the phase change produced on the surface of the object, a j The DC component of the sinusoidal fringe intensity of the coupling channel, b j represents the modulation depth of the coupling channel, p j represents the fringe period of the coupling channel, It indicates that the phase change of the sinusoidal fringes in the coupling channel is caused by the height of the object surface.
[0096] For example, when finding the encoded image of the red channel i=1, that is, d1(m,n),
[0097]
[0098] In addition, since the red, green, and blue channels are used as carriers to encode three independent stripe patterns, ideally, in order to obtain correct phase information, there should be no crosstalk between the color channels. However, crosstalk is inevitable in the experiment. Based on this, the coupling coefficient c is introduced in this embodiment. ij To quantify the coupling problem between color channels.
[0099] To calculate the coupling coefficient, first project pure red, green, and blue stripe patterns onto a whiteboard in sequence. For each color, project three phase-shifted images -2π / 3, 0, and 2π / 3, for a total of 9 images. Then, separate these images into R, G, and B components, and obtain a total of 27 grayscale intensity images. Taking the red channel as an example, the coupling effect intensity between the red channel, that is, when i=1, and the other two channels is calculated as:
[0100] c 1i =∑b′ i / ∑b′1
[0101] Thus, the coupling coefficient matrix between each color channel is obtained:
[0102] Among them, c 11 、c 22 and c 33 Both are 1.
[0103] Then, using the coupling coefficient matrix, the modified intensity d′ of the encoded image can be calculated for each color channel i To achieve the first-order compensation of crosstalk, the modified intensity d′ of the i-th color channel is i is d′ i (m,n):
[0104] d′ i (m,n)=d i (m,n)-∑c ij d i (m,n).
[0105] This step is mainly achieved by light field imaging devices, such as Figure 4 As shown, the receiving end adopts a 3-CCD diffuser coded light field camera. The three CCDs respectively use the front optical filter to directly select and image the stripe patterns of the corresponding color channels in the physical structure, and are used to simultaneously record the coded stripe images of the three color channels after being modulated by the contour of the target object. The diffuser is used to encode the angle information of the structured light field to obtain four-dimensional light field information, and the four-dimensional light field information is recorded on the two-dimensional sensor image.
[0106] Step 205: Light field reconstruction: using the light field transfer matrix T obtained in step 201 and the modified intensity d′ of the encoded image obtained in step 204 i According to the imaging model of the light field camera, the compressed sensing algorithm is used to reconstruct the structured light field, that is, d′ i =Tl i =TΨα i , l i The vector describes the light field information of the scene to be tested in the i-th color channel. T is the transfer matrix of the lensless scattered light field imaging system obtained in step 201, which is a mapping from a four-dimensional light field to a two-dimensional image. The number of rows of the transfer matrix T is equal to the number of pixels used on the camera sensor, while the number of columns of the transfer matrix T, i.e., the number of light rays, is determined by the spatial sampling frequency and the angular sampling frequency of the light field. The number of columns of the transfer matrix T is much larger than the number of rows of the matrix. Therefore, this embodiment takes into account the sparsity principle of the compressed sensing algorithm, and believes that the light field corresponding to the imaging scene has a certain sparsity in a certain transformation domain. Ψ is a sparse transformation matrix. Based on this, the discrete cosine transform basis is adopted in this embodiment, α i for l i The sparse coefficients under the sparse basis Ψ, the reconstructed mathematical model is expressed as:
[0107]
[0108] Among them, the modified intensity d′ i , the transfer matrix T and the sparse transformation matrix Ψ are optimized by L1 norm to obtain the sparse coefficient α i , and then by the sparse basis Ψ and the sparse coefficient α i Multiply and finally obtain the four-dimensional light field information l of the corresponding channel i The obtained light field contains the spatial information and angle information of the reflected light from the object being measured, which can be expressed as l i(s,u). In this embodiment, a diffuser coded light field camera is used instead of an ordinary camera to record the structured light field to obtain a four-dimensional light field, and the recorded four-dimensional light field can be expressed as L(s,u). The bold fonts s and u represent the two-dimensional spatial coordinates and two-dimensional angular coordinates of the light field, respectively.
[0109] The steps are mainly implemented by a computing device. Specifically, the light field reconstruction unit is used to demodulate the two-dimensional coded image encoded by the light field imaging device into four-dimensional structured light field information. The light field depth estimation unit is used to perform Fourier analysis on the structured light field information of each color channel to obtain phase information, and calculate the angle variance based on the phase, and use the angle variance to present a single peak distribution in the entire depth range to achieve light field depth estimation.
[0110] Step 206, structured light field depth estimation: Perform Fourier analysis on the structured light field of each color channel obtained in step 205 to obtain phase information, and calculate the angle variance based on the phase information. The angle variance is used to present a single-peak distribution in the entire depth range to achieve light field depth estimation, and then the camera intrinsic parameters are used to complete the conversion from the depth map to the three-dimensional coordinate information, thereby completing the three-dimensional measurement of the object to be measured. Specifically:
[0111] First, the structured light field of each channel obtained in step 205 is subjected to Fourier transform to obtain a spatial spectrum consisting of three parts: zero-order A i (f s ,f u ), and the side lobe C i (f s -f i,0 ,f u ) and C i * (f s +f i,0 ,f u ), the formula is:
[0112] F{l i (s,u)}=A i (f s ,f u )+C i (f s -f i,0 ,f u )+C i * (f s +f i,0 ,f u )
[0113] Among them, f s , f u are the frequencies in the spatial plane and the angular plane, respectively, i,0 =1 / pi is the carrier frequency of the i-th color channel, that is, the preset fringe frequency obtained by the optimal three-frequency method in step 202.
[0114] Then, using the center frequency f i,0 The bandpass filter separates the sidelobe information:
[0115] BPF[F{l i (s,u)}]=C i (f s -f i,0 ,f u )
[0116] Next, perform an inverse Fourier transform on the separated sidelobe information:
[0117] F -1 [C i (f s -f i,0 ,f u )]=c i (s,u)exp[i2πs / p i ]
[0118] By performing inverse tangent calculation on the sidelobe information of the inverse Fourier transform, the phase information of the i-th color channel can be obtained as follows:
[0119]
[0120] Among them, Re(·) and Im(·) represent c i (s,u)exp[i2πs / p i ](sidelobe information of inverse Fourier transform).
[0121] Phase information for the i-th color channel Perform shearing to obtain the phase-encoded field after digital refocusing
[0122]
[0123] Among them, s α =s+u(1-1 / α) represents the spatial coordinate shearing under the shearing value of α, which reflects the depth change of the scene and couples the angle information of the light field through the shearing operation.
[0124] The phase encoding field after digital refocusing is integrated in the angle dimension to obtain the refocused phase map at a specific depth, i.e., the shear value α:
[0125]
[0126] Among them, N u Represents the angular resolution of the light field.
[0127] For phase-encoded fields under digital refocusing Its phase diagram relative to refocusing The weighted angular variance of is:
[0128]
[0129] The angular variance shows a unimodal distribution trend in the entire depth range. When the depth of the target object point is consistent with the refocusing depth, the refocused phase encoding field will have consistent angular coordinates, and the corresponding angular variance is also minimum. The angular variance of the sheared light field changes with the shear value α. Through continuous iteration, it has an extreme value at the shear value corresponding to the correct depth, that is, the α value corresponding to the peak position is found, thereby locating the depth of the corresponding object point.
[0130] Finally, the light field depth information is mapped to three-dimensional coordinates: In this embodiment, the calculated depth value of the scene to be measured, that is, the shear value, corresponds to the coordinate system one by one, and the depth value is mapped to the three-dimensional coordinate, that is, the pixel coordinate system is converted to the world coordinate system, and the formula is:
[0131]
[0132] Among them, f x , f y , c x , c y It is the camera internal parameter, which is obtained by calibrating the light field imaging device in advance. Then, the Z value at the pixel (m,n) in the image is converted to (X,Y,Z) in the three-dimensional physical scene, which is the mapping from the pixel coordinate system to the world coordinate system, and then the three-dimensional coordinate information of the target object is obtained. In addition, the depth map obtained by the three channels is combined to obtain the true color information of the three-dimensional object. The measurement of the shape and color data of the three-dimensional object is achieved in a single frame.
[0133] Based on pixel description, compared with the prior art, the target three-dimensional information measurement method and system provided by the present invention also have the following advantages:
[0134] (1) The diffuser is used to uniquely encode light according to the incident angle, which improves the light throughput of the imaging system compared to traditional mask light field imaging, and does not require the resolution trade-off of traditional microlens array light field cameras.
[0135] (2) The introduction of structured illumination provides intensity-insensitive phase-encoded information for light field imaging, solving the problems of passive light field depth estimation that relies on the geometric structure of the object surface texture and has low robustness and accuracy.
[0136] (3) The red, green and blue color channels are used as carriers of stripes at three different frequencies to achieve parallel acquisition of scenes and improve sampling efficiency.
[0137] (4) A single-frame synthetic RGB image can be used to simultaneously measure the shape and color information of a three-dimensional object.
[0138] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0139] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for measuring three-dimensional information of a target, characterized in that: include: Obtain light field transmission matrix and composite fringe pattern; The composite fringe pattern includes a red layer, a green layer and a blue layer; The red layer, the green layer and the blue layer are all composed of sinusoidal fringe patterns with different fringe frequencies; Projecting the composite fringe pattern onto the target object to be measured to obtain a composite fringe pattern carrying contour information of the target object to be measured; Capturing a composite fringe pattern carrying the contour information of the target object to be tested into three color channels to obtain a coded image modulated by the target object to be tested; The coupling coefficient is introduced to obtain the modification strength of the coded image based on the coded image; the modification strength of the coded image is d' i (m,n): d’ i (m,n)=d i (m,n)-∑c ij d i (m,n); Among them, d i (m,n) is the encoded image, (m,n) is the pixel coordinate, c ij is the coupling coefficient, i = 1, 2, 3, j = 1, 2, 3, 1 is red, 2 is green, 3 is blue; Using the light field transmission matrix and the modified intensity of the coded image, a compressed sensing algorithm is used under an imaging model of a light field camera to obtain a structured light field of each color channel; the structured light field includes spatial information and angle information of light reflected by the target object to be measured; Using Fourier analysis method, phase information is obtained based on the structured light field; determining an angle variance based on the phase information; determining a light field depth based on the angular variance; Constructing a depth map of the target object to be measured based on the light field depth; The depth map is fused and the three-dimensional coordinate information is converted to obtain three-dimensional measurement information of the target object to be measured; the three-dimensional measurement information includes three-dimensional coordinate information and three-dimensional color information; The step of determining the angle variance according to the phase information specifically includes: Performing a shearing operation on the phase information to obtain a phase encoding field after digital refocusing; Integrating the digitally refocused phase encoding field in the angle dimension to obtain a refocused phase map; Determine a weighted angular variance of the phase encoding field after the digital refocusing relative to the refocused phase map; and use the weighted angular variance as the angular variance.
2. The target three-dimensional information measurement method according to claim 1, characterized in that: The calculation formula for the number of projected fringes of each color channel in the composite fringe image is: N fh =N f0 -(N f0 ) (h-1)(n-1) ,h=1,...,n-1; Among them, N f0 and N fh are the number of fringes in the largest fringe set and the number of fringes in the hth fringe set respectively; n=3, the three projected fringe frequencies correspond to the three color channels of R, G, and B respectively.
3. The target three-dimensional information measurement method according to claim 1, characterized in that: The Fourier analysis method is used to obtain phase information based on the structured light field, specifically including: Perform Fourier transform on the structured light field of color channel i to obtain the spatial spectrum of color channel i; the spatial spectrum includes zero-order A i (f s ,f u ), and the side lobe C i (f s -f i,0 ,f u ) and C i * (f s +f i,0 ,f u ), where f s is the frequency in the spatial plane, f u is the frequency in the angle plane, f i,0 is the carrier frequency of color channel i; Taking the carrier frequency of the color channel i as the center frequency, a bandpass filter is used to separate the side lobe C from the spatial spectrum. i (f s -f i,0 ,f u ); For the side lobe C i (f s -f i,0 ,f u ) performs Fourier transform to obtain a Fourier transform result; Performing an inverse tangent calculation on the Fourier transform result obtains the phase information of the color channel i.
4. The target three-dimensional information measurement method according to claim 1, characterized in that: The depth map is fused and the three-dimensional coordinate information is converted to obtain three-dimensional measurement information of the target object to be measured, specifically including: Extracting pixel coordinates of the target object to be measured in the depth map, and converting the pixel coordinates into a world coordinate system to obtain three-dimensional coordinate information of the target object to be measured; The depth map of each color channel is fused to obtain the three-dimensional color information of the target object.
5. A target three-dimensional information measurement system, characterized in that: include: A calibration device, used to obtain a light field transmission matrix; A projection device, used to generate a composite fringe pattern, and used to project the composite fringe pattern onto a target object to be measured; A light field imaging device is connected to the calibration device, and is used to capture a composite fringe pattern carrying the contour information of the target object to be measured to three color channels, obtain a coded image modulated by the target object to be measured, introduce a coupling coefficient to obtain a modified intensity of the coded image based on the coded image, and use the light field transmission matrix and the modified intensity of the coded image to obtain a structured light field of each color channel using a compressed sensing algorithm under an imaging model of a light field camera, and record the structured light field on a two-dimensional sensor image; the structured light field includes spatial information and angle information of light reflected by the target object to be measured; wherein the modified intensity of the coded image is d' i (m,n): d’ i (m,n)=d i (m,n)-∑c ij d i (m,n); Among them, d i (m,n) is the encoded image, (m,n) is the pixel coordinate, c ij is the coupling coefficient, i = 1, 2, 3, j = 1, 2, 3, 1 is red, 2 is green, 3 is blue; A computing device connected to the light field imaging device, configured to adopt Fourier analysis to obtain phase information based on the structured light field, to determine angle variance based on the phase information, to determine light field depth based on the angle variance, to construct a depth map of the target object to be measured based on the light field depth, and to fuse the depth map and convert three-dimensional coordinate information to obtain three-dimensional measurement information of the target object to be measured; the three-dimensional measurement information includes three-dimensional coordinate information and three-dimensional color information; The step of determining the angle variance according to the phase information specifically includes: Performing a shearing operation on the phase information to obtain a phase encoding field after digital refocusing; Integrating the digitally refocused phase encoding field in the angle dimension to obtain a refocused phase map; Determine a weighted angular variance of the phase encoding field after the digital refocusing relative to the refocused phase map; and use the weighted angular variance as the angular variance.
6. The target three-dimensional information measurement system according to claim 5, characterized in that: The computing device comprises: A light field reconstruction unit, connected to the light field imaging device, and used to demodulate the structured light field information encoded by the light field imaging device; A light field depth estimation unit is connected to the light field reconstruction unit, and is used to perform Fourier analysis on the structured light field information of each color channel to obtain phase information, determine the angular variance according to the phase information, determine the light field depth based on the angular variance, construct a depth map of the target object to be measured based on the light field depth, fuse the depth map and convert the three-dimensional coordinate information to obtain three-dimensional measurement information of the target object to be measured.
