Calibration method for fringe projection systems based on plane mirrors
11808564 · 2023-11-07
Assignee
Inventors
- Chao Zuo (Nanjing, CN)
- Wei YIN (Nanjing, CN)
- Qian Chen (Nanjing, CN)
- Shijie Feng (Nanjing, CN)
- Jiasong Sun (Nanjing, CN)
- Tianyang Tao (Nanjing, CN)
- Yan HU (Nanjing, CN)
- Liang ZHANG (Nanjing, CN)
- Jiaming QIAN (Nanjing, CN)
Cpc classification
G01B11/2513
PHYSICS
International classification
Abstract
A calibration method for fringe projection systems based on plane mirrors. Firstly, two mirrors are placed behind the tested object. Through the reflection of mirrors, the camera can image the measured object from the front and other two perspectives, so as to obtain 360-degree two-dimensional information of the measured object. The projector projects three sets of phase-shifting fringe patterns with frequencies of 1, 8, and 64. The camera captures the fringe image to obtain an absolute phase map with a frequency of 64 by using the phase-shifting method and the temporal phase unwrapping algorithm. By using the calibration parameters between the projector and the camera, the absolute phase map can be converted into three-dimensional information of the measured object. Then, the mirror calibration is realized by capturing a set of 3D feature point pairs, so that the 3D information from different perspectives is transformed into a unified world coordinate system. The calibration method does not need to artificially fix the feature pattern on plane mirrors, only needs to capture a set of 3D feature point pairs by the camera to directly realize the mirror calibration that it avoids the loss of measurement accuracy and realizes high-precision panoramic three-dimensional measurement.
Claims
1. A calibration method for fringe projection systems based on plane mirrors, comprising the steps of: Step 1: placing two mirrors including a left mirror and a right mirror behind a measured object and using a camera to obtain 360-degree two-dimensional information of the measured object through reflections off the two mirrors; Step 2: projecting three sets of phase-shifting fringe patterns to the measured object by using a projector, and capturing the projected fringe patterns synchronously with the camera and the two mirrors, wherein an intensity map is obtained for each of the three sets of phase-shifted fringe patterns; Step 3: calculating wrapped phase maps with different frequencies by using a phase shifting method to obtain three sets of wrapped phase maps, performing phase unwrapping on the obtained three sets of wrapped phase maps, and finally obtaining an absolute phase map by using calibration parameters representing a relationship between each pixel of the projector and each pixel of the camera, and converting the absolute phase map into three-dimensional (3D) information of the measured object; Step 4: realizing a mirror calibration for each of the two mirrors by capturing a set of 3D feature point pairs so that the 3D information of the measured object is transformed into a unified world coordinate system, so as to achieve high-precision panoramic 3D measurement.
2. The method according to claim 1 wherein the phase-shifting fringe patterns projected by the projector are represented by the following equation:
I.sub.n(x,y)=A(x,y)+B(x,y)cos[Φ(x,y)−2πn/N] where I.sub.n(x,y) is the intensity map of the corresponding phase-shifting fringe image, (x,y) is pixel coordinates of a camera plane, A(x,y) is a background intensity, B(x,y) is a modulation of fringes, Φ(x,y) is a phase to be calculated.
3. The method according to claim 1, wherein the step 3 comprises the sub-steps of: (1) obtaining the wrapped phase map φ(x,y) by using the following formula:
4. The method according to claim 1, wherein the mirror calibration in the step 4 comprises the subs-steps of: (1) expressing a 3D imaging model of the mirror by the following equation:
5. The method according to claim 4, wherein the 3D information includes 3D measurement of the measured object which is achieved through the step 2 and the step 3; virtual 3D measurement results which are obtained from a perspective of the left mirror and right mirror, real 3D measurement results which is obtained from a perspective of a real camera; and mirror calibration parameters n.sup.r and d.sub.w.sup.r which are used to obtain the 3D imaging model of each mirror, and wherein according to the 3D imaging model of each mirror, the virtual 3D measurement results X.sup.r(x.sup.r,y.sup.r,z.sup.r) obtained from the perspectives of the left mirror and the right mirror are respectively converted to the real 3D measurement results X.sup.o(x.sup.o,y.sup.o,z.sup.o) in the world coordinate system, so as to realize the high-precision panoramic 3D measurement.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
DESCRIPTION OF THE PREFERRED EMBODIMENT
(6) Referring to
(7) Step 1: The fringe projection measurement system with mirrors is built to obtain the 360-degree 2D information of the measured object. In a traditional measurement system based on fringe projection profilometry (FPP) consisting of a camera and a projector, a left mirror and a right mirror are placed behind the measured object. The angle between the two mirrors is about 120 degrees, as shown in
(8) Step 2: The phase-shift fringe images of the measured object is obtained. The projector projects three sets of phase-shifting fringe patterns to the measured object. The frequencies of three sets of phase-shifting fringe patterns are 1, 8, and 64. Any set of phase-shifting fringe patterns projected by the projector is represented as:
(9)
where I.sub.n.sup.p(x.sup.p,y.sup.p) is the phase-shifting fringe pattern projected by the projector, n represents the phase-shifting index of the phase-shifting fringe patterns, n=0, 1, 2, . . . , N−1, N represents the total number of phase-shifting steps, (x.sup.p,y.sup.p) is the pixel coordinates of the projector plane, W is the horizontal resolution of the projector, f is the frequency of the phase-shifting fringe patterns. The projector projects three sets of phase-shifting fringe patterns to the measured object. The frequencies of three sets of phase-shifting fringe patterns are 1, 8, and 64. The fringe patterns within each group have the same frequency. The projected fringe patterns are captured synchronously by the camera, and the three sets of phase-shifting fringe images are collected as the intensity map, which is represented as:
(10)
(11) where I.sub.n(x,y) is the intensity map of the corresponding phase-shifting fringe image, (x,y) is the pixel coordinates of the camera plane, A(x,y) is the background intensity, B(x,y) is the modulation of the fringes, Φ(x,y) is the phase to be calculated.
(12) Step 3: Fringe projection profilometry is used to obtain the 3D information of the measured object. For the intensity maps of three sets of phase-shifting fringe images collected in Step 2, the phase-shifting method is used to calculate the wrapped phase maps with different frequencies. Then, a multi-frequency temporal phase unwrapping algorithm is used to perform phase unwrapping on three sets of obtained wrapped phase maps in turn, and finally an absolute phase map with a frequency of 64 is obtained. By using the calibration parameters between the projector and the camera, the absolute phase map can be converted into three-dimensional information of the measured object. The specific process is as follows.
(13) (1) The wrap phase map of the measured object is obtained, that is, the projected fringe patterns are taken synchronously by the camera in Step 2, and the intensity map of the obtained phase-shifting fringe images can be calculated by the following formula to obtain the wrapped phase map φ(x,y):
(14)
Due to the truncation effect of the function arctan, the obtained phase map φ(x,y) is a wrapped phase with a range of [0, 2π], its relation to the absolute phase map Φ(x,y) is as follows:
(15)
where k(x,y) is the periodic order of phase, and its range is an integer within the range of [0,f−1]. f is the frequency of the fringe pattern. The range of the absolute phase map with unit-frequency is [0,2π], so the wrapped phase map with unit-frequency is also the absolute phase map.
(16) (2) The high-frequency absolute phase map of the measured object is obtained, and the absolute phase map is obtained by multi-frequency algorithm based on temporal phase unwrapping using the wrapped phase map with different frequencies, that is, the absolute phase map unit-frequency is used to assist the expansion of the absolute phase map with a frequency of 8, and the absolute phase map with a frequency of 8 is used to assist the expansion of the absolute phase map with a frequency of 64, as follows:
(17)
where f.sub.h is the frequency of the high-frequency fringe images, f.sub.1 is the frequency of the low-frequency fringe images, φ.sub.h(x,y) is the wrapping phase of the high-frequency fringe images, k.sub.h(x,y) is the periodic order of the phase of the high-frequency fringe images, Φ.sub.h(x,y) and Φ.sub.l(x,y) are the absolute phase of the high-frequency and low-frequency fringe images respectively, and Round is the rounding function.
(18) (3) The absolute phase map is converted into the horizontal pixel coordinates of the projector to obtain the corresponding relationship between the camera and the projector. That is, when the absolute phase map Φ.sub.64 (x,y) with a frequency of 64 is obtained, the relationship between each pixel of the camera and the corresponding pixel in the projector can be described as follows:
(19)
where W represents the horizontal resolution of the projector, f is the frequency of the absolute phase map, which is 64, x.sup.p is the horizontal pixel coordinates of the projector, (x,y) and x.sup.p represent the pixel-by-pixel correspondence between the camera and the projector;
(20) (4) After obtaining the corresponding relationship between the camera and the projector, the calibration parameters between the projector and the camera are used to obtain the 3D information of the measured object. Through system calibration, the calibration parameters of the projector and camera are obtained, and the specific formula is as follows:
(21)
where P.sub.c and P.sub.p are the calibration parameters obtained through system calibration, A.sub.c and A.sub.p are the corresponding internal parameters, M.sub.c and M.sub.p are the corresponding external parameters, p.sub.ij.sup.c and p.sub.ij.sup.p are the corresponding calibration elements in P.sub.c and P.sub.p respectively. Therefore, the corresponding 3D information can be obtained by the following formula:
(22)
where (x,y) is the pixel coordinate of the camera, x.sup.p is the horizontal pixel coordinate of the projector, and (x.sup.w,y.sup.w,z.sup.w) is the 3D information corresponding to (x,y) and x.sup.p, that is, the 3D information of the measured object.
(23) Step 4: The calibration of the mirror includes four steps: in step 1, the 3D imaging model of the mirror will be reported. Based on the 3D imaging model, the virtual 3D measurement results X.sup.r(x.sup.r,y.sup.r,z.sup.r) obtained from the perspectives of the left mirror and the right mirror can be transformed into the real 3D measurement results X.sup.o(x.sup.o,y.sup.o,z.sup.o) in the world coordinate system, so as to realize the panoramic 3D measurement. In order to obtain the 3D imaging model, in step 2, a robust, efficient and high-precision calibration method of plane mirrors is proposed to obtain the 3D imaging model of mirror. In this method, NT 3D feature point pairs including actual points X.sup.o(x.sup.o,y.sup.o,z.sup.o) and virtual points X.sup.r (x.sup.r,y.sup.r,z.sup.r) are captured by the camera, which can be used to obtain the initial estimation n.sup.r and d.sub.w.sup.r of the reflection matrix, and then the Levenberg-Marquardt algorithm with bundle adjustment is used to obtain the accurate estimation of n.sup.r and d.sub.w.sup.r of the reflection matrix, so as to realize high-precision mirror calibration and high-precision panoramic 3D measurement. In step 3, it describes how to obtain the initial estimates of n.sup.r and d.sub.w.sup.r. In step 4, it describes how to use the Levenberg-Marquardt algorithm with bundle adjustment to obtain accurate estimation of n.sup.r and d.sub.w.sup.r of reflection matrix, so as to realize high-precision mirror calibration. The specific process is as follows.
(24) 1. The 3D imaging model of the mirror is reported. Based on the refraction model of the mirror proposed by Mariottini et al., the 3D imaging model of the mirror can be expressed as:
(25)
where I is the identity matrix, X.sup.o(x.sup.o,y.sup.o,z.sup.o) and X.sup.r(x.sup.r,y.sup.r,z.sup.r) are a group of actual points and virtual points, D.sup.r is the reflection matrix of the mirror, so the calibration parameters of the mirror are n.sup.r and d.sub.w.sup.r, n.sup.r is the normal vector of the mirror, d.sub.w.sup.r is the distance from the origin of the world coordinate system to the mirror plane. From this formula, it can be found that the 3D point cloud data obtained from the mirror can be converted to the actual world coordinate system. Based on the 3D imaging model of the mirror, if n.sup.r and d.sub.w.sup.r are known, the 3D data of virtual points obtained from the mirror can be converted into 3D data of real points in the world coordinate system. Therefore, the key technology to realize panoramic 3D measurement is to calculate the accurate n.sup.r and d.sub.w.sup.r.
(26) 2. The mirror is calibrated. From the 3D imaging model of the mirror, it can be found that the mirror calibration can be realized by capturing a set of 3D feature point pairs by the camera. In the invention, the whole calibration process of the proposed calibration method of plane mirror includes two steps: initial estimation of the reflection matrix and accurate calibration of the reflection matrix using the Levenberg-Marquardt algorithm with bundle adjustment, so as to realize high-precision panoramic 3D measurement.
(27) 3. The initial estimates of n.sup.r and d.sub.w.sup.r are obtained. Firstly, N.sup.r 3D feature point pairs, including actual point X.sup.o(x.sup.o,y.sup.o,z.sup.o) and virtual point X.sup.r(x.sup.r,y.sup.r,z.sup.r), are observed by the camera to solve the reflection matrix of the mirror. In other words, step 2 and step 3 are used to achieve 3D measurement of the measured object, so as to obtain 3D information of 3D feature point pairs. Since the actual point X.sup.o(x.sup.o,y.sup.o,z.sup.o) and the virtual point X.sup.r, (x.sup.r,y.sup.r,z.sup.r) are a pair of reflection points, due to the reflection of the mirror, the normal vector {right arrow over (n.sup.r)} is parallel to {right arrow over (X.sup.oX.sup.r)}, that is, {right arrow over (n.sup.r)}×{right arrow over (X.sup.oX.sup.r)}=0. Taking n.sup.r as (a.sup.r,b.sup.r,c.sup.r), and the initial estimation of n.sup.r can be obtained by the following formula:
(28)
where (x.sup.o,y.sup.o,z.sup.o) is the 3D coordinate of the actual point X.sup.o in the world coordinate system, (x.sup.r,y.sup.r,z.sup.r) is the 3D coordinate of the virtual point X.sup.r in the world coordinate system, and (a.sup.r,b.sup.r,c.sup.r) is the 3D coordinate of the normal vector n.sup.r of the mirror in the world coordinate system. The normal vector n.sup.r obtained from the above formula is a least-square problem. A more accurate solution is obtained by the SVD algorithm. The last column vector of the V matrix obtained by SVD is the initial estimate of the normal vector n.sup.r, namely (a.sub.0.sup.r,b.sub.0.sup.r,c.sub.0.sup.r).
(29) Since the actual point X.sup.o(x.sup.o,y.sup.o,z.sup.o) and virtual point X.sup.r(x.sup.r,y.sup.r,z.sup.r) are symmetric about the mirror, Therefore, their midpoints must satisfy the plane equation a.sub.0.sup.rx+b.sub.0.sup.ry+c.sub.0.sup.rz+d.sub.w.sup.r=0 of the mirror, and the initial estimate of d.sub.w.sup.r can be obtained by the following formula:
(30)
where N.sup.r is the number of 3D feature point pairs.
(31) 4. The Levenberg-Marquardt algorithm with bundle adjustment is used to calibrate the reflection matrix accurately. After obtaining the initial estimates of n.sup.r and d.sub.w.sup.r, the 3D imaging model of the mirror is rewritten into the following formula based on the Levenberg-Marquardt algorithm:
(32)
where G={a.sup.r,b.sup.r,c.sup.r,d.sub.w.sup.r}, g.sub.1(G), g.sub.2(G) and g.sub.2(G) represent the residuals of each equation and R(G) represents the sum of squares of the total residuals of the 3D imaging model of the mirror. The minimization of R(G) is a nonlinear least-squares problem, which is solved by the Levenberg-Marquardt algorithm. (The Levenberg-Marquardt algorithm is a common algorithm. Generally, in order to use the Levenberg-Marquardt algorithm, the problem to be solved needs to be written into a fixed formula. The invention rewrites the 3D imaging model of the mirror into the above four formulas, and then it can be solved through the inherent solution method of the Levenberg-Marquardt algorithm). There are two key factors (X.sup.o and X.sup.r) that affect the accuracy of the final optimization results. It is well known that fringe projection profilometry can realize high-precision 3D measurement of the measured object. In this system, the measurement accuracy of the actual point X.sup.o(x.sup.o,y.sup.o,z.sup.o) is about 30 um. Therefore, the influence of the second factor X.sup.r should be mainly considered. In the above calibration process, the virtual point X.sup.r(x.sup.r,y.sup.r,z.sup.r) is always regarded as the known input data, but the imperfect flatness and uneven reflection coefficient of the mirror lead to the low 3D measurement accuracy of the virtual point X.sup.r(x.sup.r,y.sup.r,z.sup.r), which introduces the system error into the calibration of the mirror, thus obtaining calibration results with low accuracy. By further improving the manufacturing quality of the mirror, this disadvantage can be overcome to a certain extent to improve the calibration performance, but the cost is high. Therefore, the bundle adjustment method should be introduced to avoid the problem of low accuracy caused by low-quality mirrors. According to bundle adjustment, the above formula R(G) can be rewritten as the following formula:
(33)
(34) Although the total number of variables has increased from 4 to 4+3N.sup.r, the minimization of R(G) is still a nonlinear least-squares problem, which is solved by the Levenberg-Marquardt algorithm, so that the high-precision calibration parameters n.sup.r and d.sub.w.sup.r are obtained, and the accurate calibration of the reflection matrix is realized.
(35) Step 5: The 3D measurement of the measured object is realized through steps 2 and 3. The virtual 3D measurement results from the perspective of the left mirror and the perspective of the right mirror are obtained, the real 3D measurement results from the perspective of the real camera is obtained. The high-precision 3D imaging model of the mirror is obtained by using the mirror calibration parameters n.sup.r and d.sub.w.sup.r obtained in step 4. The virtual 3D measurement results X.sup.r(x.sup.r,y.sup.r,z.sup.r) obtained from the perspective of the left mirror and the right mirror are transformed into the real 3D measurement results X.sup.o(x.sup.o,y.sup.o,z.sup.o) in the world coordinate system by using the 3D imaging model of the mirror, so as to realize the high-precision panoramic 3D measurement.
Example
(36) In order to verify the effectiveness of the method of the invention, a camera (acA2440-75 um, Basler), a projector (LightCrafter 4500PRO, TI), two front surface reflecting mirrors (30 cm×30 cm), and a computer are used to construct a 3D measuring device based on the calibration method of fringe projection system based on plane mirrors. The acquisition speed of the device for 3D measurement of objects is 25 frames per second. As described in step 1, in the traditional measurement system based on fringe projection profilometry (FPP) composed of a camera and a projector, two mirrors are placed behind the measured object, and the angle between the two mirrors is about 120-degree. Through the reflection of the mirror, the camera can image the measured object from the front and two other different perspectives (left mirror and right mirror), so as to obtain 360-degree 2D information of the measured object. As described in step 2, three groups of nine-step phase-shifting fringe patterns with different frequencies are projected and collected, and the frequencies of the three groups of fringe patterns are 1, 8, and 64 respectively. As described in step 3, three groups of wrapped phase maps with different frequencies are calculated by using the phase-shifting method. Then, the multi-frequency phase unwrapping algorithm based on temporal phase unwrapping is used to unwrap the three groups of wrapped phase maps in turn, and finally the absolute phase map with the frequency of 64 is obtained. Using the calibration parameters between the projector and the camera, the absolute phase map is transformed into the 3D information of the measured object. In step 4, the mirror calibration is realized by capturing a set of 3D feature point pairs, as shown in
(37) TABLE-US-00001 TABLE 1 Comparison table of calibration residuals in different steps Levenberg-Marquardt Initial Levenberg-Marquardt algorithm with bundle RMS (mm) estimate algorithm adjustment Left mirror 0.0704 0.0578 1.7911 × 10.sup.−5 Right mirror 0.0611 0.0534 1.1588 × 10.sup.−5
(38) In order to further evaluate the accuracy of the proposed method, the proposed system is used to measure a standard ceramic ball with a diameter of 50.8 mm. The 3D measurement results of a single perspective and the 3D measurement results of the whole surface are shown in
(39) Finally, the Voltaire model is measured, and the corresponding full-surface 3D reconstruction results are shown in