Motion phase calculation method based on centroid tracking and iterative compensation
Through the method of centroid tracking and iterative compensation, the phase calculation problem of stripe projection technology in moving scenes is solved, and high-precision motion phase data acquisition is achieved, which is suitable for three-dimensional reconstruction.
Patent Information
- Application Number
- CN202410684299.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Existing fringe projection technology is difficult to accurately calculate high-precision phase information in moving scenes, resulting in failure of three-dimensional reconstruction. It is necessary to solve the impact of motion on phase calculation to obtain accurate motion phase data.
A motion phase calculation method based on centroid tracking and iterative compensation is used to obtain fringe images through a binocular camera, and the pixel displacement is calculated using centroid tracking and morphological filtering. A phase calculation method based on the projector coordinate system is used, combined with a stochastic gradient descent iterative compensation algorithm. , accurately calculate the motion phase.
It improves the phase calculation accuracy in moving scenes, expands the scope of phase change calculation, improves the accuracy and speed of three-dimensional reconstruction, and obtains high-precision motion phase values.
Smart Images

Figure CN118608565A
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision, and in particular to a motion phase calculation method based on centroid tracking and iterative compensation. Background Art
[0002] The principle of fringe projection vision measurement technology is to project a pre-coded fringe image onto the object to be measured, collect the deformed fringe image containing surface information, and reconstruct the three-dimensional shape of the object through precise calculation. This technology has been widely used in industrial scenarios due to its simple measurement operation and high measurement accuracy.
[0003] With the continuous advancement of industrial automation technology, the use of fringe projection for 3D reconstruction of moving products on production lines has gradually become the focus of academic research. Conventional fringe projection technology is only applicable to static measurement scenarios. The key to its 3D reconstruction is to calculate high-precision phase information based on the fringe light intensity and use the phase information to reconstruct the point cloud. However, the movement of the product will cause the phase solution to fail. Therefore, it is necessary to calculate the impact of the movement on the phase calculation, compensate for the phase error caused by the movement, and obtain high-precision motion phase data before it can be used for subsequent 3D reconstruction of moving objects. Summary of the invention
[0004] Technical issues:
[0005] The purpose of the present invention is to provide an accurate and reliable motion phase calculation method based on centroid tracking and iterative compensation to solve the problems faced by the above-mentioned background technology.
[0006] Technical solution:
[0007] To achieve the above object, the present invention provides the following technical solution: a motion phase calculation method based on centroid tracking and iterative compensation, the method comprising the following steps:
[0008] S1: Using a binocular camera to obtain a reference fringe image and a deformed fringe image modulated by the moving PCB surface, a projector projects multiple fringe images, and the camera collects them synchronously;
[0009] S2: performing image processing on the fringe image in S1, and obtaining pixel displacement information of the PCB by means of a motion information calculation method based on centroid tracking;
[0010] S3: A phase calculation method based on the projector coordinate system is used to obtain the initial value of the motion phase change in combination with the pixel displacement;
[0011] S4: For the calculation error of the initial value of the phase change, an iterative compensation method based on stochastic gradient descent is used to obtain the accurate value of the motion phase;
[0012] S5: The phase is extracted and expanded to obtain the absolute phase of the moving PCB surface, which can be applied to the subsequent three-dimensional reconstruction of the same-name point matching.
[0013] As an improvement of the present invention, in step S1, 12 reference fringe images are first collected as the background, and then four-step sinusoidal phase-shifted fringe images of three different periods are projected onto the moving PCB surface respectively, and the camera collects these deformed fringe images for calculating the phase information.
[0014] As an improvement of the present invention, the step S2, the motion information calculation method based on centroid tracking, has the following specific process:
[0015] S21: firstly, performing an image difference operation on the reference fringe image and the deformed fringe image modulated by the moving PCB surface from the reference fringe image in step S1. Due to the existence of the object, the fringe image will be obviously bent and offset. This change is obviously different from the flat reference fringe image, which helps to preliminarily identify the approximate position of the object.
[0016] S22: For the differential image obtained in step S21, an appropriate threshold needs to be selected to convert the result of background difference into a clear binary image; in order to accurately distinguish the PCB from the background, an effective threshold determination method needs to be adopted. This study adopts the maximum inter-class variance method as a threshold determination strategy, which can automatically calculate the threshold for distinguishing the foreground and the background;
[0017] S23: In the binary image, due to the diversity of shooting conditions and PCB component shapes, many holes and noise points often appear. In order to improve the accuracy of centroid calculation, morphological filtering is used to post-process the image. The "open first and then close" morphological filtering strategy is adopted. First, the opening operation is used to remove the interfering noise points, and then the closing operation is used to fill the holes in the image;
[0018] S24: For PCB centroid calculation, the image grayscale density average method is used to determine the coordinate position of the centroid.
[0019] S25: In practical applications, the calculation of centroid coordinates often involves sub-pixel accuracy requirements. A method based on image frequency domain changes is used to achieve sub-pixel translation alignment. The formula is:
[0020]
[0021] The displacement of the image along the x-axis and y-axis is quantized in pixels, represented as x0 and y0 respectively. After the translation transformation, the new position of the image can be represented as f(x-Δx, y-Δy). The image f(x, y) is first converted to the frequency domain through Fourier transform to obtain its frequency domain representation F(u, w); the above technology is applied to the pixel displacement calculation of the moving PCB to obtain a high-precision pixel displacement.
[0022] As an improvement of the present invention, in step S3, the phase calculation method based on the projector coordinate system has the following specific process:
[0023] S31: Acquire an image of a checkerboard calibration plate, use a corner point extraction algorithm to obtain the position information of the checkerboard corner points, so as to determine the corresponding relationship between the projector pixel coordinates and the three-dimensional control points of the checkerboard, and the projector projects two sets of phase-shifted fringes that change in the horizontal and vertical directions respectively, and obtains the absolute horizontal and vertical phases through the phase shift method and the multi-frequency heterodyne method;
[0024] S32: Using the absolute phase value of the vertical stripe image, the point u in the projector image plane can be accurately calculated. p The coordinate value of the direction; similarly, using the absolute phase value of the horizontal stripe image, the point v in the projector image plane can be calculated p The coordinate value of the direction; the internal and external parameters of the projector are calculated according to the pixel coordinates of the corner points of multiple calibration plates to complete the reconstruction of the projector coordinate system;
[0025] S33: According to the translation matrix and the rotation matrix of the projector relative to the camera, the phase change in the camera image coordinate system caused by the object movement can be converted into the phase change in the projector image coordinate system;
[0026] The phase of any point on the projector image is known in advance, so when calculating the phase change Δφ′ of the moving object n When the center of mass tracking method is used, the coordinates of the object before and after the movement in the camera image coordinate system (u c , v c ) and Then, according to the projector parameters, the object is obtained in the projector image coordinate system (u p , v p ) and Then calculate the phase of the two points and The final phase change is Δφ′ n Values:
[0027]
[0028] The phase change values of the 12 deformed fringe images are calculated. This method is applicable to all two-dimensional motion directions and expands the scope of phase change calculation. However, there is still a certain error in the phase calculation result, which needs to be compensated.
[0029] As an improvement of the present invention, the phase iteration compensation method based on stochastic gradient descent in step S4 has the following specific process:
[0030] S41: Three inputs of parameters for stochastic gradient descent: initial parameters Δφ′ n (t) and Δφ′ n (t-1), that is, the calculated phase change result Δφ' of this iterative compensation n (t), and the result of the previous iterative compensation Δφ' n (t-1), n=1, 2, ..., N; descending step length L; direction parameter R;
[0031] S42: Distance estimation is to calculate the Euclidean distance of the actual phase change results between two adjacent iteration processes. The distance s is calculated as follows:
[0032]
[0033] Gradient calculation is to solve the difference between the actual phase compensation results of adjacent iterative processes. The calculation method of the gradient g is as follows:
[0034]
[0035] S43: Random descent is to calculate the initial phase value Δφ' of the next iteration process by combining the four input parameters of descent step size L, direction parameter R, distance s and gradient g. n ;
[0036] First calculate the descent step size:
[0037]
[0038] Then determine the direction according to the following formula:
[0039]
[0040] Among them, rand() generates random numbers in the range of (0, 1);
[0041] Finally, the input phase change value Δφ′ for the next iteration is calculated n :
[0042] Δφ′ n (t+1)=Δφ′ n (t)+d(Δφ′n (t))L n
[0043] The final iteration stops when the convergence threshold set by the accuracy requirement is reached; thus, the accurate motion phase value can be obtained.
[0044] As an improvement of the present invention, the moving object phase extraction and expansion method in step S5 has the following specific process:
[0045] S51: The light intensity of the 12 motion deformation fringe images collected is as follows:
[0046] I n (x-Δx n , y-Δy n )=c+dcos(ωy+φ(x, y)+Δφ′ n )
[0047] In the formula, I n (x, y) is the grayscale value of the phase-shifted image at (x, y) in the nth step; c and d represent the ambient light intensity and the light intensity of the stripe, respectively; ω is the angular frequency of the stripe; φ(x, y) is the phase after modulation; Δx n and Δy n represents the pixel displacement in the x-direction and y-direction of the object under test relative to the initial position in the captured nth image, which can be obtained through step S2; Δφ′ n is the motion phase of the nth step of the phase shift method, which can be obtained through step S4, where n=1, 2, ..., N;
[0048] S52: The phase shift method is used to extract the phase of the motion fringe images with three different periods, and the wrapped phase is phase unfolded. Three groups of images with periods of T1, T2, and T3 (24 / 26 / 28) are projected. The absolute phase distribution can be finally calculated by performing pairwise heterodyne operations. The calculated absolute phase can be used for subsequent same-name point matching and three-dimensional reconstruction.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] The problem of fringe phase calculation in motion scenes has been solved, and the measurement results are highly accurate; the motion information calculation method based on center of mass tracking has been improved, and the calculation accuracy of object pixel displacement has been improved; with the help of the phase calculation method based on the projector coordinate system, the disadvantage of limited object motion direction has been overcome, and the scope of phase change calculation has been expanded; by proposing an iterative compensation method of random gradient descent, the speed and accuracy of the phase iteration algorithm have been improved, and a high-precision motion phase value has been obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1A flow chart of a motion phase calculation method based on centroid tracking and iterative compensation provided by the present invention;
[0052] Figure 2 Schematic diagram of centroid extraction, (a) is the original PCB image, (b) is the reference fringe image, (c) is the deformed fringe, (d) is the difference image, (e) is the binarized image, and (f) is the morphological filter image;
[0053] Figure 3 This is a schematic diagram of the reverse reconstruction of the projector coordinate system;
[0054] Figure 4 This is a schematic diagram of the transformation between the camera coordinate system and the projector coordinate system;
[0055] Figure 5 Schematic diagram of phase extraction and expansion of moving objects. DETAILED DESCRIPTION
[0056] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0057] like Figure 1 The present invention provides a motion phase calculation method based on centroid tracking and iterative compensation, which solves the problem of fringe phase calculation in motion scenes, and the measurement result has high accuracy. The specific steps are as follows:
[0058] S1: The reference fringe image and the deformed fringe image modulated by the moving PCB surface are acquired with the help of a binocular camera. The projector projects 12 fringe images, and the camera collects them synchronously. The resolution of all images is 1280*1024.
[0059] S2: performing image processing on the fringe image in S1, and obtaining pixel displacement information of the PCB by means of a motion information calculation method based on centroid tracking;
[0060] S3: A phase calculation method based on the projector coordinate system is used to obtain the initial value of the motion phase change in combination with the pixel displacement;
[0061] S4: For the calculation error of the initial value of the phase change, an iterative compensation method based on stochastic gradient descent is used to obtain the accurate value of the motion phase;
[0062] S5: The phase is extracted and expanded to obtain the absolute phase of the moving PCB surface, which can be applied to the subsequent three-dimensional reconstruction of the same-name point matching.
[0063] In step S1, 12 reference fringe images are first collected as the background, and then four-step sinusoidal phase-shifted fringe images with three different periods (24, 26, and 28 pixels, respectively) are projected onto the moving PCB surface. The camera collects these deformed fringe images for calculating the phase information.
[0064] In step S2, the motion information calculation method based on centroid tracking is specifically performed as follows:
[0065] S21: From the reference fringe image in step S1 and the deformed fringe image modulated by the moving PCB surface, such as Figure 2 (b) and Figure 2 (c) First, the reference image and the deformed image are subjected to image difference operation. Due to the presence of the object, the fringe image will be significantly bent and offset. This change is significantly different from the flat reference fringe image, which helps to preliminarily identify the approximate position of the object.
[0066] S22: For the differential image obtained in step S21, Figure 2 (d) An appropriate threshold needs to be selected to convert the background difference result into a clear binary image. In order to accurately distinguish PCB from the background, an effective threshold determination method needs to be adopted. This study uses the maximum inter-class variance method as a threshold determination strategy, which can automatically calculate the threshold value of 40 for distinguishing foreground and background.
[0067] S23: In the binary image, such as Figure 2 (e), Due to the diversity of shooting conditions and PCB component shapes, many holes and noise points often appear. In order to improve the accuracy of centroid calculation, morphological filtering is used to post-process the image. The "open first and then close" morphological filtering strategy is adopted. First, the opening operation is used to remove the interfering noise points, and then the closing operation is used to fill the holes in the image. The erosion coefficient is 3*3 and the expansion coefficient is 10*10. The final effect is as follows Figure 2 (f)
[0068] S24: For PCB centroid calculation, the gray density average formula is used to determine the coordinate position of the centroid.
[0069] S25: In practical applications, the calculation of centroid coordinates often involves sub-pixel accuracy requirements. A method based on image frequency domain changes is used to achieve sub-pixel translation alignment. The formula is:
[0070]
[0071] The displacement of the image along the x-axis and y-axis is quantified in pixels, expressed as Δx and Δy respectively. After the translation transformation, the new position of the image f(x,y) is f(x-Δx, y-Δy); the image f(x,y) is first converted to the frequency domain through Fourier transform to obtain its frequency domain representation F(u,w); the above technology is applied to the pixel displacement calculation of the moving PCB to obtain a high-precision pixel displacement.
[0072] In step S3, the phase calculation method based on the projector coordinate system is as follows: Figure 3 As shown, specifically:
[0073] S31: First, an image of a checkerboard calibration plate is collected to extract the position information of the checkerboard corner points. The projector projects two sets of phase-shifted fringes that change in the horizontal and vertical directions respectively, and the horizontal and vertical absolute phase unwrapping is achieved by the phase shift method and the multi-frequency heterodyne method.
[0074] S32: By analyzing the absolute phase value in the horizontal or vertical direction, the absolute phase value of the vertical stripe image can be used to accurately calculate the point u in the projector image plane. p The coordinate value of the direction; similarly, using the absolute phase value of the horizontal stripe image, the point v in the projector image plane can be calculated p The coordinate value of the direction; reconstruct the projector coordinate system according to the pixel coordinates of the corner points of multiple calibration plates, and obtain the projector translation matrix R and rotation matrix T;
[0075] S33: According to the translation matrix and the rotation matrix of the projector relative to the camera, the phase change in the camera image coordinate system caused by the object movement can be converted into the phase change in the projector image coordinate system;
[0076] The phase of any point on the projector image is known in advance, so when calculating the phase change Δφ' of the moving object n When Figure 4 As shown in the figure, according to the centroid tracking method, the coordinates of the object before and after the movement of the camera image (u c , v c ) and Then, according to the projector parameters, the object is obtained in the projector image coordinate system (u p , v p ) and Then calculate the phase of each point and The final phase change is Δφ' n Values:
[0077]
[0078] The phase change values of the 12 deformed fringe images are calculated. This method is applicable to all two-dimensional motion directions and expands the scope of phase change calculation. However, there is still a certain error in the phase calculation result, which needs to be compensated.
[0079] In step S4, the phase iteration compensation method based on stochastic gradient descent is specifically performed as follows:
[0080] S41: The parameter input of stochastic gradient descent includes three parts: initial parameter Δφ′ n (t) and Δφ′ n (t-1), that is, the calculated phase change result Δφ′ of this iterative compensation n (t), and the result of the previous iteration compensation Δφ′ n (t-1), n = 1, 2, ..., N; descending step length L, this paper selects L = 0.02rad; direction parameter R, this paper selects R = 0.1;
[0081] S42: Distance estimation is to calculate the Euclidean distance of the actual phase change results between two adjacent iteration processes. The distance s is calculated as follows:
[0082]
[0083] Gradient calculation is to solve the difference between the actual phase compensation results of adjacent iterative processes. The gradient g calculation method is as follows:
[0084]
[0085] S43: Random descent is to calculate the initial phase value Δφ' of the next iteration process by combining the four input parameters of descent step size L, direction parameter R, distance s and gradient g. n ;
[0086] First calculate the descent step size:
[0087]
[0088] Then determine the direction according to the following formula:
[0089]
[0090] Among them, rand() generates random numbers in the range of (0, 1);
[0091] Finally, the input phase change value Δφ′ for the next iteration is calculated n :
[0092] Δφ′ n (t+1)=Δφ′ n (t)+d(Δφ′ n (t))L n
[0093] The iterative process is in |Δφ' n (t+1)-Δφ' n The process stops when (t)| is less than the threshold required for accuracy, and the threshold is set to 0.03°; thus, the accurate motion phase value can be obtained.
[0094] The specific process of the motion phase extraction and expansion method in step S5 is as follows:
[0095] S51: The light intensity of the 12 motion deformation fringe images collected is as follows:
[0096] I n (x-Δx n ,y-Δy n )=c+dcos(ωy+φ(x, y)+Δφ' n )
[0097] In the formula, I n (x, y) is the grayscale value of the phase-shifted image at (x, y) in the nth step; c and d represent the ambient light intensity and the fringe light intensity, respectively; ω is the fringe angular frequency; φ(x, y) is the phase after modulation; Δx n and Δy n represents the pixel displacement in the x-direction and y-direction of the object under test relative to the initial position in the captured nth image, which can be obtained through step S2; Δφ′ n is the motion phase of the nth step of the phase shift method, which can be obtained through step S4, where n=1, 2, ..., N;
[0098] S52: Phase extraction is performed on the three different period motion fringe images using the phase shift method, and phase unwrapping is performed on the wrapped phase, such as Figure 5 As shown, three groups of images with periods of T1, T2, and T3 (24 / 26 / 28) are projected, and the absolute phase distribution can be calculated by performing pairwise heterodyne operations on them. The calculated absolute phase can be used for subsequent three-dimensional reconstruction work.
[0099] The present invention proposes a motion phase calculation method based on centroid tracking and iterative compensation, which solves the problem of fringe phase calculation in motion scenes and has high measurement accuracy. The motion information calculation method based on centroid tracking is improved, and the calculation accuracy of object pixel displacement is improved. With the help of a phase calculation method based on a projector coordinate system, the scope of phase change calculation is expanded. Through the iterative compensation method of random gradient descent, a high-precision motion phase value is obtained, and the phase calculation accuracy reaches ±0.3°.
[0100] The technical means disclosed in the present invention are not limited to the technical means disclosed in the above-mentioned embodiments, but also include technical solutions composed of any combination of the above-mentioned technical features. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also regarded as the protection scope of the present invention.
Claims
1. A motion phase calculation method based on centroid tracking and iterative compensation, characterized in that: The following steps are involved: S1: Using a binocular camera to obtain a reference fringe image and a deformed fringe image modulated by the moving PCB surface, a projector projects multiple fringe images, and the camera collects them synchronously; S2: performing image processing on the fringe image in S1, and obtaining pixel displacement information of the PCB by means of a motion information calculation method based on centroid tracking; S3: A phase calculation method based on the projector coordinate system is used to obtain the initial value of the motion phase change in combination with the pixel displacement; S4: For the calculation error of the initial value of the phase change, an iterative compensation method based on stochastic gradient descent is used to obtain the accurate value of the motion phase; S5: The phase is extracted and expanded to obtain the absolute phase of the moving PCB surface, which can be applied to the subsequent three-dimensional reconstruction of the same-name point matching.
2. The motion phase calculation method based on centroid tracking and iterative compensation as claimed in claim 1, characterized in that: In step S1, 12 reference fringe images are first collected as the background, and then four-step sinusoidal phase-shifted fringe images of three different periods are projected onto the moving PCB surface. The camera collects these deformed fringe images for calculating the phase information.
3. The motion phase calculation method based on centroid tracking and iterative compensation as claimed in claim 1, characterized in that: The specific process of step S2, a motion information calculation method based on centroid tracking, is as follows: S21: firstly, performing an image difference operation on the reference fringe image and the deformed fringe image modulated by the moving PCB surface from the reference fringe image in step S1. Due to the existence of the object, the fringe image will be obviously bent and offset. This change is obviously different from the flat reference fringe image, which helps to preliminarily identify the approximate position of the object. S22: For the difference image obtained in step S21, an appropriate threshold needs to be selected. The maximum inter-class variance method is used as a strategy for determining the threshold, and the threshold for distinguishing the foreground and the background can be automatically calculated; S23: In the binary image, morphological filtering is used for post-processing of the image. The "open first and then close" morphological filtering strategy is adopted. First, the interfering noise points are removed by opening operation, and then the holes in the image are filled by closing operation. S24: For PCB centroid calculation, the gray density average method is used to determine the centroid coordinates; S25: In practical applications, the calculation of centroid coordinates often involves sub-pixel accuracy requirements. A method based on image frequency domain changes is used to achieve translation alignment. The formula is as follows: The displacement of the image along the horizontal x-axis and y-axis is quantified in pixels, expressed as Δx and Δy respectively. After the translation transformation, the new position of the image f(x, y) can be expressed as f(x-Δx, y-Δy). The image f(x, y) is first converted to the frequency domain through Fourier transform to obtain its frequency domain representation F(u, w); the above technology is applied to the pixel displacement calculation of the moving PCB to obtain a pixel displacement with higher accuracy.
4. The motion phase calculation method based on centroid tracking and iterative compensation as claimed in claim 1, characterized in that: In step S3, the phase calculation method based on the projector coordinate system has the following specific process: S31: First, an image of a checkerboard calibration plate is acquired to extract the position information of the checkerboard corner points; the projector projects two sets of phase-shifted fringes that change in the horizontal and vertical directions respectively, and the horizontal and vertical absolute phases are obtained by the phase-shift method and the multi-frequency heterodyne method; S32: Using the absolute phase value of the vertical stripe image, the point u in the projector image plane can be calculated. p The coordinate value of the direction; similarly, using the absolute phase value of the horizontal stripe image, the point v in the projector image plane can be calculated p The internal and external parameters of the projector are calculated from the pixel coordinates of the corner points of the calibration plates in different directions, and the projector coordinate system is reconstructed; S33: According to the translation matrix and the rotation matrix of the projector relative to the camera, the phase change in the camera image coordinate system caused by the object movement can be converted into the phase change in the projector image coordinate system; The phase of any point on the projector image is known in advance, so when calculating the phase change Δφ′ of the moving object n When the center of mass tracking method is used, the coordinates of the object before and after the movement in the camera image coordinate system (u c , v c ) and Then, according to the internal and external parameters of the projector, the object in the projector coordinate system (u p , v p ) and Then calculate the phase of the two points and The final phase change is Δφ′ n Values: The phase change value is calculated for each deformed fringe image. This method is applicable to all two-dimensional motion directions and expands the scope of phase change calculation. However, there is still a certain error in the phase calculation result, which needs to be compensated.
5. The motion phase calculation method based on centroid tracking and iterative compensation as claimed in claim 1, characterized in that: The phase iteration compensation method based on stochastic gradient descent in step S4 has the following specific process: S41: There are three initial parameter inputs for stochastic gradient descent: Δφ′ n (t) and Δφ′ n (t-1), that is, the calculated phase change result of this iteration Δφ′ n (t), and the result of the previous iteration Δφ′ n (t-1), where n=1, 2, ..., N; Descending step length L; direction parameter R; S42: Distance estimation is to calculate the Euclidean distance of the actual phase change results between two adjacent iteration processes. The distance s is calculated as follows: Gradient calculation is to solve the difference between the actual phase compensation results of adjacent iterative processes. The calculation method of the gradient g is as follows: S43: Random descent is to calculate the initial phase value Δφ′ of the next iteration process by combining the four input parameters of descent step size L, direction parameter R, distance s and gradient g. n ; First calculate the descent step size: Then determine the direction according to the following formula: Among them, rand() generates a random number in the range of (0, 1); Finally, the input phase change value Δφ' for the next iteration is calculated. n : Df' n (t+1)=Δφ' n (t)+d(Δφ' n (t))L n The iteration stops when the result reaches the accuracy threshold requirement, and the accurate motion phase value can be obtained accordingly.
6. The motion phase calculation method based on centroid tracking and iterative compensation as claimed in claim 1, characterized in that: The motion phase extraction and expansion method in step S5 is specifically as follows: S51: The light intensity of the 12 motion deformation fringe images collected is as follows: I n (x-Δx n ,y-Δy n )=c+dcos(ωy+φ(x,y)+Δφ' n ) Where I n (x, y) is the grayscale value of the phase-shifted image at (x, y) in the nth step; c and d represent the ambient light intensity and the light intensity of the stripe, respectively; ω is the angular frequency of the stripe; φ(x, y) is the phase after modulation; Δx n and Δy n represents the pixel displacement in the x-direction and y-direction of the object under test relative to the initial position in the captured nth image, which can be obtained by step S2; Δφ' n is the motion phase of the nth step of the phase shift method, which can be obtained through step S4, where n=1, 2, ..., N; S52: The phase shift method is used to extract the phase of the four-step sinusoidal motion fringe images with three different periods, and the wrapped phase is phase unfolded. Three groups of sinusoidal fringe images with different periods are projected, and pairwise heterodyne operations are performed to finally obtain the absolute phase distribution; the calculated absolute phase can be used for subsequent same-name point matching and three-dimensional reconstruction.
Citation Information
Patent Citations
Phase error compensation method in fringe projection three-dimensional measurement
CN114688995A
Reference frame reprojection for video coding
EP3439306A1
Systems, devices, and methods for tracking and compensating for patient motion during a medical imaging scan
WO2016014718A1
