Three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry, storage medium and equipment
By separating the background component and modulation component of the phase-shifted stripe image, modulation normalization and low-pass filtering are performed, the problem of noise influence in phase-shifted contour is solved, and high-precision three-dimensional contour reconstruction is achieved.
Patent Information
- Application Number
- CN202510542850.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-08
AI Technical Summary
In the existing phase shift contour technique, due to the influence of noise signals, the surface phase of the demodulated object has noise, which affects the accuracy and quality of the three-dimensional contour. Direct filtering operation will lose high-frequency features and lead to reconstruction distortion.
By establishing a mathematical model between the phase shifted fringe image and phase, separating the background component and modulation component, performing modulation normalization and low-pass filtering, a new phase shifted fringe image is synthesized and preprocessed to smooth the phase.
On the basis of retaining the high-frequency characteristics of phase, the phase is effectively smoothed, the reconstruction accuracy of the three-dimensional contour is improved, noise interference is avoided, and contour distortion is prevented.
Smart Images

Figure CN120451398A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical three-dimensional measurement, and relates to a three-dimensional profile reconstruction method, a storage medium and a device based on phase smoothing preprocessing in phase shift profilometry. Background Art
[0002] Phase-shift profilometry is an active optical three-dimensional measurement technology. This technology uses a phase-shift fringe generator to project a set of sinusoidal fringe gratings with a constant phase difference onto the surface of the object to be measured. A two-dimensional camera synchronously captures the phase-shifted fringe image modulated by the three-dimensional shape of the object surface, demodulates the phase of the object surface from it, and combines the geometric relationship between the camera and the phase-shifted fringe generator to reconstruct the three-dimensional profile of the object surface.
[0003] Because images captured by 2D cameras contain noise signals such as random noise and quantization noise, the demodulated surface phase of the object contains a large amount of noise, affecting the accuracy and quality of the reconstructed 3D contour. Therefore, the surface phase must be smoothed before reconstruction. Existing techniques often directly filter the phase image, which results in a loss of high-frequency features and distortion of the reconstructed 3D contour. Therefore, a reasonable preprocessing method is needed to smooth the phase while preserving the high-frequency features. Summary of the Invention
[0004] To address the problems existing in the above-mentioned prior art, the present invention provides a three-dimensional contour reconstruction method, storage medium, and device based on phase smoothing preprocessing in phase-shift profilometry. A mathematical model is established between the phase-shifted fringe image and phase in phase-shift profilometry to obtain analytical expressions for calculating the phase, fringe background component, and fringe modulation amplitude. The modulation component is separated from the phase-shifted fringe image, the modulation index of the phase-shifted fringe image is calculated, and the modulation component is normalized based on the modulation index. The normalized modulation component is then low-pass filtered. Finally, the background component and the low-pass filtered modulation component are combined to form a new phase-shifted fringe image, completing the preprocessing. The phase is then calculated using the preprocessed image.
[0005] The technical solution of the present invention:
[0006] A three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry, characterized by comprising the following parts:
[0007] 1) Establish a mathematical model between the phase-shifted fringe image and the phase in phase-shift profilometry, and calculate the phase, background component, and modulation amplitude respectively; the details are as follows:
[0008] The phase-shifted fringe image collected by the two-dimensional camera is expressed as:
[0009]
[0010] Where, N is the number of phase-shift fringe images collected, I i (x,y) represents the pixel value at the coordinate (x,y) of the i-th phase-shifted fringe image, δ i represents the phase difference of the i-th phase-shifted fringe, δ i =2π(i-1) / N, B(x,y) represents the background component at the coordinate (x,y) of the phase-shifted fringe image, M(x,y) represents the modulation amplitude at the coordinate (x,y) of the phase-shifted fringe image, Represents the phase of the phase-shifted fringe image at coordinate (x, y);
[0011] The mathematical model between the phase-shift fringe image and the phase in phase-shift profilometry is established as follows:
[0012]
[0013] Decompose the mathematical model represented by formula (2) to obtain the phase The calculation is:
[0014]
[0015] The calculation of the background component B(x,y) is:
[0016]
[0017] The calculation of the modulation amplitude M(x,y) is:
[0018]
[0019] 2) Separate the modulation component from the phase-shifted fringe image and calculate the modulation degree, normalize the modulation component according to the modulation degree, and perform low-pass filtering on the normalized modulation component; the details are as follows:
[0020] Use the pixel value I at the coordinate (x, y) of the i-th phase-shifted fringe image i (x, y) minus the background component B(x, y) to get the modulation component U i (x,y), which is calculated as:
[0021] U i (x,y)=I i (x,y)-B(x,y)(i=1,2,…N)(6)
[0022] Calculate the modulation degree γ(x,y) at the coordinate (x,y) of the phase-shifted fringe image as:
[0023]
[0024] According to the modulation index γ(x,y), the modulation component Ui (x, y) is normalized to obtain the normalized modulation component U i ′(x,y), which is calculated as:
[0025]
[0026] The normalized modulation component is low-pass filtered to obtain the low-pass filtered modulation component U i "(x,y), which is calculated as:
[0027]
[0028] Where n represents the window size of the low-pass filter, ω(k,j) represents the normalized modulation component U with coordinates (k,j) i The calculation weight of ′(k,j) is calculated as:
[0029]
[0030] Among them, σ represents the standard deviation of the kernel function of low-pass filtering;
[0031] 3) The original background component and the low-pass filtered modulated component are synthesized to obtain a pre-processed phase-shifted fringe image, completing the pre-processing; the details are as follows:
[0032] I i ′(x,y) represents the pixel value of the preprocessed i-th phase-shifted fringe image at coordinate (x,y), which is calculated as:
[0033] I i ′(x,y)=B(x,y)+γ(x,y)U i ″(x,y)(i=1,2,…,N) (11)
[0034] Use the pixel value I obtained after preprocessing i ′(x,y) calculates the phase at coordinate (x,y) It is calculated as:
[0035]
[0036] Phase It is a smooth phase without losing the original high-frequency characteristics.
[0037] 4) Reconstruct the three-dimensional contour using the preprocessed phase-shifted fringe image.
[0038] A computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the above-mentioned three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry.
[0039] A server comprises a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the above-mentioned three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift contour analysis.
[0040] The beneficial effects of the present invention are as follows: the present invention decomposes the phase-shifted fringe image into two parts: a background component and a modulation component, thereby avoiding the influence of factors such as intensity and noise in the background component that are irrelevant to the calculated phase on the preprocessing effect; the modulation component is normalized according to the modulation index, thereby eliminating the interference of factors such as the texture and reflectivity of the surface of the object to be measured, and the normalized modulation component is low-pass filtered to achieve the purpose of eliminating noise and smoothing the phase; compared with the method of directly filtering the phase image, the preprocessing method of the present invention actually performs a low-pass filtering operation on the sinusoidal function part of the phase-shifted fringe, which will not directly affect the high-frequency features in the phase. Therefore, by preprocessing the phase-shifted fringe image through the preprocessing method of the present invention, the high-frequency features in the phase can be retained and a good phase smoothing effect can be achieved, thereby improving the accuracy of the reconstructed three-dimensional contour. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of the phase smoothing preprocessing method in phase shift profilometry.
[0042] Figure 2 It is a schematic diagram of decomposing the phase-shifted fringe image.
[0043] Figure 3 This is a schematic diagram comparing the phase accuracy before and after preprocessing.
[0044] Figure 4 It is the rendering of 3D contour reconstruction before and after preprocessing. DETAILED DESCRIPTION
[0045] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0046] Refer to the attached Figure 1 , a 3D contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry, which includes three steps:
[0047] Step 1: First, the mathematical relationship between the phase and the phase-shifted fringe image in the phase-shifted profilometry is modeled. The phase-shifted fringe image is composed of N sinusoidal grating images with a constant phase difference. The pixel value of a single pixel coordinate can be expressed by formula (1). Analyzing formula (1), it can be seen that the pixel value I i (x,y) is composed of the background component B(x,y) and the modulation component Add together, where the background component B(x,y) is when the cosine function The intensity of the image is related to the properties of the object to be measured within the camera's field of view and not to the phase value. The modulation amplitude M(x,y) is related to the surface texture, reflectivity and distance of the object to be measured from the stripe light source, and is also related to the phase value. There is no direct correlation; therefore, it is necessary to exclude the interference of background components and modulation amplitude on subsequent preprocessing. In this step, the calculation formula of background component B(x, y) is obtained by decomposing formula (2) as formula (4), and the calculation formula of modulation amplitude M(x, y) is obtained as formula (5); the background components of all pixels are calculated by formula (4) for subsequent separation of modulation components, and the modulation amplitudes of all pixels are calculated by formula (5) for subsequent normalization of modulation components. Figure 2 A schematic diagram showing the decomposition of a phase-shifted fringe image into background and modulation components is shown;
[0048] Step 2: From the analysis in step 1, we know that the phase value Only with the cosine function It is related to the background component B(x, y) and the modulation amplitude M(x, y), so through formula (6), the pixel value I of the fringe image is i (x, y) minus the background component B(x, y) to get the modulation component U i (x,y), combining formula (1) and formula (6), we can see that
[0049]
[0050] That is, the background component itself is affected by the modulation amplitude, and the modulation amplitude is related to the texture and reflectivity of the object surface. In order to eliminate the influence of this part on the preprocessing, the modulation index γ(x, y) is calculated by formula (7). The modulation index is the comprehensive response function of the surface of the object to be measured to the brightness of the stripe grating. According to the modulation index γ(x, y), the modulation component U i (x, y) normalization can eliminate the interference of the above factors and make the normalized modulation component U i ′(x,y) is determined only by the phase value and the phase difference δ of the phase-shifted image i Decision, attached Figure 2The effect of normalized modulation component is also shown in the figure; the normalized modulation component U is calculated by the method of formula (9). i ′(x,y) is low-pass filtered, which can effectively eliminate the phase Directly related noise, to achieve the effect of smooth phase; Figure 3 The error between the phase on the sampled smooth plane and the ideal value before and after the preprocessing method of the present invention is shown. The average phase error before the preprocessing method of the present invention is 0.0138 rad, and the average phase error after the preprocessing method of the present invention is 0.0055 rad, which is a 60% reduction in the average phase error after preprocessing.
[0051] Step 3: Use equation (11) to convert the normalized modulation component U after low-pass filtering into i "(x,y), combined with the background component B(x,y) and the modulation amplitude M(x,y) to synthesize the pre-processed phase-shifted fringe image. The image pixel value at this time is I i ′(x,y); Since the object of low-pass filtering, that is, the normalized modulation component, can be regarded as a continuous function that changes according to the sine law, low-pass filtering it will not lose the high-frequency characteristics of the phase itself. The smooth phase without high-frequency feature loss can be calculated by formula (12):
[0052] Step 4: Use Contour reconstruction can obtain high-precision and low-distortion three-dimensional contours; Figure 4 The figure shows the surface contour of the object after preprocessing by the method of the present invention. It can be seen that after implementing the preprocessing method of the present invention, the reconstructed three-dimensional contour is smoother and noise-free than the three-dimensional contour without preprocessing, and no contour distortion occurs compared with the direct phase image filtering method.
Claims
1. A three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry, characterized in that: Includes the following sections: 1) Establish a mathematical model between the phase-shift fringe image and the phase in phase-shift profilometry, and calculate the phase, background component, and modulation amplitude respectively; 2) Separate the modulation component from the phase-shifted fringe image and calculate the modulation degree, normalize the modulation component according to the modulation degree, and perform low-pass filtering on the normalized modulation component; 3) synthesizing the original background component and the low-pass filtered modulated component to obtain a preprocessed phase-shifted fringe image, thus completing the preprocessing; 4) Reconstruct the three-dimensional contour using the preprocessed phase-shifted fringe image.
2. The three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry according to claim 1, characterized in that: The step 1) is specifically as follows: The phase-shifted fringe image collected by the two-dimensional camera is expressed as: Where, N is the number of phase-shift fringe images collected, I i (x,y) represents the pixel value at the coordinate (x,y) of the i-th phase-shifted fringe image, δ i represents the phase difference of the i-th phase-shifted fringe, δ i =2π(i-1) / N, B(x,y) represents the background component at the coordinate (x,y) of the phase-shifted fringe image, M(x,y) represents the modulation amplitude at the coordinate (x,y) of the phase-shifted fringe image, Represents the phase of the phase-shifted fringe image at coordinate (x, y); The mathematical model between the phase-shift fringe image and the phase in phase-shift profilometry is established as follows: Decompose the mathematical model represented by formula (2) to obtain the phase The calculation is: The calculation of the background component B(x,y) is: The calculation of the modulation amplitude M(x,y) is:
3. The three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry according to claim 1, characterized in that: The step 2) is specifically as follows: Use the pixel value I at the coordinate (x, y) of the i-th phase-shifted fringe image i (x, y) minus the background component B(x, y) to get the modulation component U i (x,y), which is calculated as: U i (x,y)=I i (x,y)-B(x,y), i=1,2,…N(6) The modulation degree γ(x,y) at the coordinate (x,y) of the phase-shifted fringe image is calculated as: According to the modulation index γ(x,y), the modulation component U i (x, y) is normalized to obtain the normalized modulation component U i ′(x,y), which is calculated as: Perform low-pass filtering on the normalized modulation component to obtain the low-pass filtered modulation component U i ″(x,y), which is calculated as: Where n represents the window size of the low-pass filter, ω(k,j) represents the normalized modulation component U with coordinates (k,j) i The calculation weight of ′(k,j) is calculated as: Where σ represents the standard deviation of the kernel function of the low-pass filter.
4. The three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift profilometry according to claim 1, characterized in that: The step 3) is specifically as follows: I i ′(x,y) represents the pixel value of the preprocessed i-th phase-shifted fringe image at coordinate (x,y), which is calculated as: I i ′(x,y)=B(x,y)+γ(x,y)U i ″(x,y),i=1,2,…,N (11) Use the pixel value I obtained after preprocessing i ′(x,y) calculates the phase at coordinate (x,y) It is calculated as: Phase It is a phase that is smooth without losing the original high-frequency characteristics.
5. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift contour analysis as described in any one of claims 1-4.
6. A server, characterized in that: The server includes a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the three-dimensional contour reconstruction method based on phase smoothing preprocessing in phase shift contour analysis according to any one of claims 1-4.
Citation Information
Cited By
Multi-scale scene reconstruction method based on multi-source data fusion
CN121544812A
Multi-scale scene reconstruction method based on multi-source data fusion
CN121544812B