Decoding three-dimensional reconstruction method based on DCT

By introducing a method that combines nonlinear divergence calculation with DCT frequency domain solution, the problem of insufficient robustness and accuracy of traditional DCT methods in complex industrial scenarios is solved, and efficient and stable three-dimensional reconstruction results are achieved.

CN121616787APending Publication Date: 2026-03-06XIAMEN WEIZHU INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511885343.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Traditional DCT-based 3D reconstruction methods are highly sensitive to noise and local anomalies in complex industrial scenarios, exhibiting poor robustness. Furthermore, the gradient model is overly simplified, limiting the improvement of unwrapping accuracy.

Method used

By combining nonlinear divergence calculation with DCT frequency domain solution, the erroneous gradient value caused by noise is compressed by using a cosine function to improve the divergence calculation method, and DCT transformation is performed in the frequency domain to solve the absolute phase field.

Benefits of technology

It significantly improves the robustness and accuracy of 3D reconstruction, effectively suppresses error propagation, adapts to high reflectivity and optical interference in complex industrial environments, and achieves higher measurement accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616787A_ABST
    Figure CN121616787A_ABST
Patent Text Reader

Abstract

The invention relates to a three-dimensional reconstruction method based on DCT (Discrete Cosine Transform) decoding. The method comprises the following steps: projecting a four-step phase shift stripe of a specific code to an object and collecting a deformed stripe; calculating a wrapped phase; the key improvement lies in that after a least square unwrapping model is constructed, improved divergence calculation based on a cosine function is adopted, nonlinear transformation is carried out on a multi-direction wrapped phase gradient so as to suppress noise errors, and an improved divergence field is generated; secondly, performing two-dimensional DCT (Discrete Cosine Transform) forward transformation on the divergence field, and solving an absolute phase field through inverse transformation after operation with a transfer function in a frequency domain; and finally completing three-dimensional reconstruction. The system comprises a projection module, an acquisition module and a processing module. According to the method, non-linear divergence calculation is introduced to be combined with DCT frequency domain solving, the defect that a traditional method is sensitive to noise is effectively overcome, and the reconstruction speed and robustness are improved while precision is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of optical 3D measurement and machine vision technology, specifically a DCT-based decoding 3D reconstruction method. Background Technology

[0002] Structured light 3D measurement technology, especially phase profilometry, has been widely used in industrial inspection, reverse engineering, and biomedicine due to its advantages such as high precision, high speed, and non-contact operation. This technology projects a series of coded structured light patterns (such as sinusoidal phase-shifted fringes) onto the object being measured. A camera captures images of the fringe patterns, which are then deformed by modulation of the object's surface shape. The wrapped phase is calculated from the captured fringe images, and the absolute phase of the object is recovered from the wrapped phase using a phase unwrapping algorithm, ultimately reconstructing the 3D shape.

[0003] Among numerous phase unwrapping algorithms, transform-domain-based methods, especially Discrete Cosine Transform (DCT) methods, have attracted attention due to their high computational efficiency. The core principle of traditional two-dimensional DCT decoding methods is to estimate the phase gradient by calculating the difference between the wrapped phase in the x and y directions, then calculate the divergence, and finally use forward and inverse DCT transforms to transform the two-dimensional phase unwrapping problem into a minimum norm problem. This method is based on a fundamental assumption: the true phase difference between unwrapped adjacent pixels is equal to the wrapped phase difference calculated from the wrapped phase map. By solving a Poisson equation, the absolute phase field closest to this assumption can be calculated globally. Compared to some iterative algorithms, traditional DCT methods have a significant advantage in computational speed.

[0004] However, although the traditional DCT method performs well under ideal conditions, it has inherent and insurmountable drawbacks in practical applications, especially in complex industrial scenarios: Highly sensitive to noise and local anomalies, and with poor robustness: Traditional methods heavily rely on the assumption of "equal phase difference." When the surface of the object being measured has highly reflective areas, complex shadows, or environmental interference (such as dust or oil contamination) causing errors in the phase calculation, anomalous phase gradients (i.e., "residual points") that deviate significantly from the true value will occur. At these residual points, the aforementioned basic assumption no longer holds. Traditional DCT methods lack mechanisms for identifying and suppressing these anomalies, and their least squares criterion smoothly propagates these local errors throughout the entire phase field, leading to widespread distortion or even complete failure of the reconstructed 3D topography. This results in insufficient stability and reliability in industrial settings.

[0005] The gradient model is overly simplified, limiting accuracy: Traditional DCT methods typically only consider gradient constraints in the two orthogonal directions of x and y. This simplified model may not be sufficient for describing the surfaces of objects with complex morphology or anisotropic features, thus limiting further improvements in its unwrapping accuracy.

[0006] Therefore, there is an urgent need in this field for an improved solution to the traditional DCT method that can fundamentally enhance its ability to resist noise and local anomalies while retaining its computational efficiency, and avoid error propagation, thereby achieving stable, reliable, and high-precision three-dimensional measurement in harsh real-world application environments. Summary of the Invention

[0007] The purpose of this invention is to provide a DCT-based decoding 3D reconstruction method. By introducing nonlinear divergence calculation and DCT frequency domain solution, this invention effectively overcomes the defect of traditional methods being sensitive to noise, and significantly improves the robustness and accuracy of 3D reconstruction while ensuring high efficiency.

[0008] The technical solution adopted in this invention is as follows: The DCT-based decoding 3D reconstruction method includes the following steps: S1. The projected light intensity distribution is transmitted to the object under test through a newly coded four-step phase-shift fringe pattern, and the fringe image after being modulated and deformed by the object surface is acquired by the image acquisition device. S2. Calculate the wrapping phase of the surface of the object being measured based on the acquired stripe image; S3. Construct a least-squares phase unwrapping model and transform it into a discrete Poisson equation solution problem; S4. An improved divergence calculation method based on cosine function is adopted to perform nonlinear transformation on the phase gradient values ​​in multiple directions and calculate the improved divergence field. S5. Perform a two-dimensional discrete cosine transform (DCT) on the improved divergence field, perform operations with the transfer function in the frequency domain, and then perform a two-dimensional inverse discrete cosine transform (IDCT) to obtain the absolute phase field. S6. Based on the absolute phase field and system calibration parameters, reconstruct the three-dimensional shape of the object under test.

[0009] Preferably, in step S1, the light intensity distribution of the newly encoded four-step phase-shifting fringe pattern is defined by the following set of formulas: ; ; ; ; in, These represent the pixel points of the four phase-shifted images. The light intensity value at that location; Indicates background light intensity; Indicates modulation intensity; This indicates the desired package phase.

[0010] Preferably, in step S2, the above-mentioned wrapping phase Calculated using the following arctangent formula: ; in, Indicates at pixel point The calculated package phase value.

[0011] Preferably, in step S3, the objective function of the least squares model is: ; in, Describe the objective function, which is minimized. To solve for the absolute phase; Indicates at pixel grid points The absolute phase value to be solved; Representing at pixel points The wrapping phase gradient values ​​in the horizontal direction (x), vertical direction (y), main diagonal (m), and sub-diagonal (n) at the location; These represent the number of rows and columns of the image pixel grid, respectively.

[0012] Preferably, the divergence term of the discrete Poisson equation It is calculated using the following formula, which extends to four directions: ; in, Indicates at pixel point The divergence value calculated at the location; Indicates at pixel point Location, secondary diagonal direction The wrapping phase gradient value.

[0013] Preferably, in step S4, the improved divergence calculation method is based on the following principle: compressing the erroneous phase gradient values ​​caused by noise into an interval. The basis for this is: ; in, This represents the phase gradient value affected by noise. Represents the package operator; This represents the cosine function.

[0014] Preferably, in step S4, the improved divergence field ρ(x,y) is calculated using the following set of formulas: ; The cosine phase gradient in each direction is defined as follows: ; ; ; ; Where ρ(x,y) represents the improved divergence value calculated at pixel coordinates (x,y); , , , φ(x,y) represents the cosine of the phase difference in the horizontal (x), vertical (y), main diagonal (m), and secondary diagonal (n) directions at pixel (x,y), respectively; φ(x,y) represents the phase value at pixel (x,y); for gradient values ​​that exceed the effective pixel range of the image, their corresponding cosine values ​​are set to zero.

[0015] Preferably, in step S5, the absolute phase field φ(x,y) is solved using the following formula: ; The transfer function K(i,j) is: ; Where φ(x,y) represents the absolute phase value at pixel (x,y) obtained by solving; DCT{·} represents the two-dimensional discrete cosine transform; {·} represents the two-dimensional discrete cosine inverse transform; i,j represent the corresponding frequency indices in the frequency domain.

[0016] A three-dimensional measurement system for implementing the method includes: A projection module is used to project the newly coded four-step phase-shift stripe pattern; The image acquisition module is equipped with a Sham lens for each side-view camera to increase the clear image area for acquiring the correct distorted fringe pattern; The processing module is configured to perform the aforementioned package phase calculation, improved divergence calculation, DCT transform and inverse transform, and 3D reconstruction algorithm. The system calibration uses the inverse camera method to calibrate the projector.

[0017] A solder paste inspection device, integrating the aforementioned three-dimensional measurement system, is applied to the SPI solder paste inspection of the Ican510 device.

[0018] The beneficial effects of this invention are: The 3D measurement method and system based on improved DCT provided by this invention do not offer a simple linear improvement over existing technologies. Instead, they achieve a qualitative leap in measurement performance in complex real-world scenarios through a unique technical approach. These effects are mainly reflected in three aspects: a robust improvement in conventional performance, a fundamental breakthrough in core bottlenecks, and the resulting superior industrial applicability.

[0019] First, this invention demonstrates considerable progress in conventional performance metrics. By employing an improved divergence calculation model, it effectively suppresses error accumulation during phase unwrapping, thereby significantly reducing the absolute error in static measurements to approximately 40% of that of traditional methods, while also exhibiting superior measurement repeatability. Furthermore, leveraging the inherent efficiency advantage of Discrete Cosine Transform (DCT) in the real-domain computation, this invention achieves a computational speed improvement of over 25% compared to traditional methods based on Fast Fourier Transform (FFT), providing a solid performance foundation for high-speed online detection.

[0020] However, the extreme robustness of this invention against interference marks a fundamental difference between it and traditional techniques. The fundamental bottleneck of traditional phase unwrapping techniques lies in their high sensitivity to "residual points" (i.e., anomalous phase gradients caused by noise, occlusion, or object boundaries). Traditional least squares, as a linear or quasi-linear optimization process, aims for global smoothing, but lacks an effective constraint mechanism for anomalous gradients with large local values. This causes errors from a single residual point to spread uncontrollably throughout the solution domain like a "plague," ultimately leading to 3D reconstruction failure. This invention unexpectedly solves this long-standing problem by introducing a seemingly simple nonlinear "compressor"—the cosine function. Its effect is far more significant than the initial goal of "smoothing gradients." The underlying mechanism lies in the fact that the range of the cosine function cos(x) is naturally limited to the finite interval [-1, 1]. This mathematical characteristic generates a dynamic error limiting mechanism: no matter how large the original phase gradient error caused by noise (even tens of π), after this transformation, its destructive effect is forcibly constrained within a finite amplitude. This is equivalent to setting an absolute upper limit on the error contribution of each pixel, thus revolutionarily transforming the global "error propagation" problem in traditional methods into a local "error suppression" problem.

[0021] Even more surprisingly, this nonlinear processing does not come at the expense of signal integrity. This invention reveals a key insight: This indicates that, while suppressing large-amplitude noise, the transformation behaves approximately like an ideal wrapper operator for valid phase gradient information, thus achieving a remarkable balance between strong noise suppression and accurate preservation of valid signals—a balance that conventional design approaches struggle to achieve. It is this unique mechanism that enables the reconstructed point cloud to exhibit only one-third the distortion of traditional methods when facing severe optical interference in testing, demonstrating a near-immune ability to local anomalies.

[0022] Ultimately, this unexpected robustness translates directly into outstanding industrial practical value. It enables this invention to readily address long-standing industrial pain points that have plagued traditional methods, such as stable measurements of highly reflective surfaces like solder paste and metals, reliability in complex industrial environments with dust and oil contamination, and clear reconstruction of steep object edges. Therefore, this invention not only provides improved performance indicators but also introduces a new paradigm for stable and reliable 3D measurement under real, non-ideal conditions, constituting its outstanding substantive features and significant technological advancements. Attached Figure Description

[0023] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a diagram illustrating the expansion of the least squares solution into the discrete Poisson equation using the DCT method in this invention, in four directions. Figure 3 To optimize the absolute phase of the pre-DCT; Figure 4 This represents the absolute phase of the optimized DCT. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0025] See Figures 1 to 4 This invention relates to The DCT-based decoding 3D reconstruction method includes the following steps: S1. The projected light intensity distribution is transmitted to the object under test through a newly coded four-step phase-shifting fringe pattern, and the fringe image, which is modulated and deformed by the object surface, is acquired by an image acquisition device; the light intensity distribution of the newly coded four-step phase-shifting fringe pattern is defined by the following set of formulas: ; ; ; ; in, These represent the pixel points of the four phase-shifted images. The light intensity value at that location; Indicates background light intensity; Indicates modulation intensity; This indicates the desired package phase.

[0026] This step encodes the projected phase-shifted fringes by constructing a centrally symmetric mathematical model of light intensity. This model converts the traditional four-step phase shift (0°, 90°, 180°, 270°) into a specific combination of signs, ensuring that adjacent patterns (e.g., I1 and I4, I2 and I3) form a precise antisymmetric relationship in the sine and cosine components. This design is not a simple phase shift, but rather an algebraic reconstruction of the light intensity function itself. This encoding method establishes an ideal mathematical foundation for subsequent calculations. Its direct effect is that when performing difference operations (e.g., I1-I4, I2-I3, adjacent patterns...) and , and The light intensity function does indeed exhibit a precise antisymmetric relationship. After performing the difference operation:

[0027] The background light intensity a(x,y) is completely eliminated, while the modulation intensity b(x,y) is canceled out as a common factor. This makes the system inherently immune to interference factors such as uneven surface reflectivity, ambient light fluctuations, and changes in imaging system gain, thus obtaining a more reliable phase-carrying signal from the source.

[0028] S2. Calculate the wrapping phase of the surface of the object being measured based on the acquired fringe image; wrapping phase Calculated using the following arctangent formula: ; in, Indicates at pixel point The calculated package phase value.

[0029] This step, based on the difference results (i.e., pure sine and cosine signals) provided in step S1 after eliminating the influence of components a and b, applies the arctangent function to solve for the principal phase value. Mathematically, it solves for the direction angle of a vector (cosφ, sinφ), thereby converting the light intensity information into a bounding phase value located within the interval (-π, π). This is the crucial transition from the intensity domain to the phase domain. Since the signal-to-noise ratio of the input signal (differential result) has been enhanced by S1, the initial accuracy and reliability of the wrapped phase map calculated in this step are significantly improved. It reduces phase calculation errors caused by intensity-related errors (such as variations in the b-value), providing a high-quality starting point for high-precision phase unfolding.

[0030] S3. Construct a least-squares phase unwrapping model and transform it into a discrete Poisson equation problem; the objective function of the least-squares model is: ; in, Describe the objective function, which is minimized. To solve for the absolute phase; Indicates at pixel grid points The absolute phase value to be solved; Representing at pixel points The wrapping phase gradient values ​​at the horizontal (x), vertical (y) and upper left (m) and upper right (n) directions of the main diagonal; These represent the number of rows and columns of the image pixel grid, respectively.

[0031] divergence term of the discrete Poisson equation It is calculated using the following formula, which extends to four directions: ; in, Indicates at pixel point The divergence value calculated at the location; Indicates at pixel point Location, secondary diagonal direction The wrapping phase gradient value.

[0032] This step defines the phase unwrapping problem as a minimum norm problem. The core idea is to find an absolute phase field such that the sum of the squares of the differences between the gradient of this phase field and the measured wrapped phase gradient between any two adjacent pixels is minimized. By solving the Euler-Lagrange equation for this least-squares problem, it can be equivalently transformed into a classical discrete Poisson equation. 2 φ = ρ, where the divergence ρ is calculated from the gradient difference (second-order difference) of the wrapped phase. This transforms the complex global phase matching problem into solving a linear partial differential equation (Poisson equation). This lays the foundation for using efficient numerical computation tools (especially frequency domain methods) to achieve the global optimal integration of local gradient information into a continuous absolute phase field.

[0033] S4. An improved divergence calculation method based on the cosine function is adopted to perform nonlinear transformation on the phase gradient values ​​in multiple directions and calculate the improved divergence field. The improved divergence calculation method is based on the following principle: compressing the erroneous phase gradient values ​​caused by noise into the interval. The basis for this is: ; in, This represents the phase gradient value affected by noise. Represents the package operator; This represents the cosine function.

[0034] The improved divergence field ρ(x,y) is calculated using the following set of formulas: ; The cosine phase gradient in each direction is defined as follows: ; ; ; ; Where ρ(x,y) represents the improved divergence value calculated at pixel coordinates (x,y); cosΔx,y,cosΔy,x,cosΔm,x,y,cosΔn,x,y represent the cosines of the phase difference values ​​in the horizontal (x), vertical (y), main diagonal (m), and secondary diagonal (n) directions at pixel point (x,y), respectively; φ(x,y) represents the phase value at pixel point (x,y); for gradient values ​​that exceed the effective pixel range of the image, their corresponding cosine values ​​are set to zero.

[0035] Traditional methods directly use the wrapped phase gradient Δ, which is sensitive to noise. This step introduces a nonlinear preprocessor—the cosine function. First, the gradient value is cosineed, compressing the gradient range to a finite interval of (-1, 1), thus limiting the error magnitude of individual gross errors. Second, the approximate equivalence between the cosine function and the wrapped operator W(·) is utilized when the error is small (…). This improvement makes the divergence mathematically closer to the divergence under ideal noise-free conditions. This greatly enhances the robustness of the phase unwrapping algorithm. It can effectively suppress "residual points" caused by noise, shadows, isolated invalid points, etc., and smooth out severe gradient jump errors (such as those much greater than 2π), thereby avoiding the propagation and diffusion of errors in the least squares solution process, and significantly improving the unwrapping success rate in complex real-world scenarios.

[0036] S5. Perform a two-dimensional discrete cosine transform (DCT) on the improved divergence field, and then perform operations with the transfer function in the frequency domain. Finally, perform a two-dimensional inverse discrete cosine transform (IDCT) to obtain the absolute phase field. The absolute phase field φ(x,y) is solved using the following formula: ; The transfer function K(i,j) is: ; Where φ(x,y) represents the absolute phase value at pixel (x,y) obtained by solving; DCT{·} represents the two-dimensional discrete cosine transform; DCT-1{·} represents the two-dimensional discrete cosine inverse transform; i,j represent the corresponding frequency indices in the frequency domain.

[0037] The mechanism of this step is to utilize the frequency domain filtering characteristics of the Discrete Cosine Transform (DCT) to efficiently solve the Poisson equation. The principle is that, in the frequency domain, the Laplace operator in the Poisson equation ( 2 The improved divergence field ρ has a simple characteristic function form, meaning its transfer function K(i,j) is known. Therefore, after performing a DCT transform to the frequency domain, a simple point division operation (DCT{ρ} / K(i,j)) followed by an inverse DCT transform is sufficient to directly obtain the absolute phase φ. This method transforms the complex iterative solution process into two transformations and one division, resulting in extremely high computational efficiency. Combined with the high-quality divergence field provided by S4, this frequency domain method can quickly and stably reconstruct a globally smooth and accurate absolute phase, meeting the real-time requirements of 3D measurement.

[0038] S6. Based on the absolute phase field and system calibration parameters, reconstruct the three-dimensional shape of the object under test.

[0039] The mechanism of this step is phase-height mapping. After the system has pre-established the relationship between camera-projector pixel coordinates and world coordinates through calibration, the absolute phase φ obtained in S5 is used as the basic data. Combined with the principle of triangulation, the phase value is converted into three-dimensional point cloud coordinates (x, y, z) of the surface of the object being measured. As the final output step of the entire method, it transforms the precise, unfolded absolute phase information obtained in the preceding steps into three-dimensional topographic data with practical physical meaning. The accuracy of this data directly depends on the processing effect of the preceding steps, thus achieving high-precision and robust three-dimensional digitization of the object.

[0040] A three-dimensional measurement system for implementing the method includes a projection module, an image acquisition module, and a processing module. The three-dimensional measurement system provides a complete and high-precision hardware implementation platform and parameter calibration scheme for the aforementioned phase unwrapping and three-dimensional reconstruction method based on improved discrete cosine transform (DCT). Through modular design and innovative calibration methods, the system ensures that the algorithm can achieve its expected robustness and accuracy in practical applications.

[0041] The projection module generates a corresponding fringe pattern on the surface of the object under test based on the newly coded four-step phase-shifting light intensity distribution model. Its technical advantage lies in providing an initial structured light field with optimized anti-interference capabilities for the entire measurement process, laying the foundation for high-precision phase calculation from the outset.

[0042] The image acquisition module includes at least one image sensor, its core feature being that the image sensor is equipped with an optical lens conforming to Scherm's law. Its functional mechanism lies in adjusting the relative orientation between the lens plane, the sensor plane, and the object plane, ensuring their principal planes intersect in a straight line. This achieves consistent image clarity across the entire field of view within a high-precision triangulation layout where the projector and camera optical axes form an acute angle. The technical advantage is that it effectively overcomes the problem of local image defocusing caused by depth-of-field limitations, ensuring clear and reliable details in the acquired modulation fringe image, and providing high-quality raw data for subsequent phase extraction.

[0043] The processing module is communicatively connected to the projection module and the image acquisition module. Its functional mechanism involves being configured to execute computer instructions stored thereon, thereby sequentially implementing a series of algorithmic steps, including wrap phase calculation, improved divergence calculation, DCT forward and inverse transformation solution, and 3D coordinate mapping. Its technical effect lies in transforming innovative algorithmic processes into actual 3D topographic data, serving as the computational hub connecting hardware input and 3D information output.

[0044] To achieve accurate conversion from phase to 3D coordinates, the system calibration method requires precise calibration to obtain the projector's and camera's internal parameters (intrinsic parameters) and relative position and attitude (extrinsic parameters). This invention employs a projector calibration method based on an inverse camera model, which treats the projector as a virtual camera capable of reversibly capturing images. In practice, firstly, a traditional method (such as the Zhang Zhengyou calibration method) is used to perform high-precision calibration of the image acquisition module (i.e., the physical camera) to determine its intrinsic parameters and extrinsic parameters relative to the world coordinate system. Then, a calibration board with known 3D coordinates is placed within the measurement field of view, and the projector module projects a series of coded patterns (such as Gray codes or phase-shifted fringes) onto the calibration board. The image acquisition module simultaneously acquires the patterned images modulated by the calibration board.

[0045] By decoding the images acquired by the acquisition module, a mapping relationship is established between each pixel in the camera image and its corresponding projector pixel. Given that the 3D coordinates of the feature points on the calibration board are known and the parameters of the physical camera have been calibrated, the pixels on the projector display screen can be considered as the "imaging points" of the virtual camera. Through a large number of such correspondences between 3D spatial points and projector pixels, the complete camera model parameters of the projector, including its intrinsic parameters and extrinsic parameters relative to the world coordinate system, can be solved using a least-squares optimization algorithm. The technical advantage of this calibration method lies in its ingenious solution to the technical challenge of directly calibrating a projector as an active transmitting device, transforming its parameter solving into a mature camera calibration problem. This method can obtain projector parameters that match the calibration accuracy of the physical camera, thereby constructing a unified and accurate system mathematical model. This provides a crucial and precise metric basis for the subsequent phase-height mapping process of converting absolute phase values ​​into 3D coordinates, and is a core prerequisite for ensuring the measurement accuracy of the entire 3D reconstruction result. In summary, the system and calibration method described in this invention, through optimized selection and configuration of hardware modules and combined with innovative calibration strategies, constitute a high-performance 3D measurement platform that can fully leverage the advantages of the DCT decoding algorithm.

[0046] The present invention also provides a solder paste inspection device, which integrates the aforementioned three-dimensional measurement system based on improved DCT decoding as the core measurement unit. It is mainly used in the field of solder paste printing inspection, specifically implemented in the SPI device of Ican510.

[0047] This solder paste inspection equipment deeply embeds the three-dimensional measurement system into its automated inspection platform. Specifically, the projection module, the image acquisition module equipped with a SAM lens, and the processing module are structurally integrated into a unified measurement unit, fixedly installed above the equipment's inspection station. When the printed circuit board (PCB) carrying the printed solder paste is precisely positioned into the measurement field of view by the conveyor mechanism, the system is triggered and operates according to a preset process: the projection module sequentially projects newly coded four-step phase-shifting fringes onto the PCB surface, the image acquisition module simultaneously acquires the deformed fringe map modulated by the three-dimensional shape of the solder paste, and the processing module then executes the entire algorithm process from wrapping phase calculation to three-dimensional reconstruction.

[0048] This integrated design produces synergistic technical effects, which are particularly suitable for the demanding requirements of SPI detection, such as high reflectivity, micron-level accuracy, and high production cycle time. First, to address the complex optical interference caused by strong specular reflection on the solder paste surface and the multiple materials of the PCB substrate, the improved divergence calculation mechanism (i.e., nonlinear transformation based on the cosine function) employed by the system endows the algorithm with extremely strong resistance to error propagation. Its technical effect lies in the fact that even if local areas experience phase calculation anomalies due to light intensity saturation or uneven reflection, this mechanism can effectively suppress the error within a limited range. This allows for the stable reconstruction of the complete three-dimensional morphology of the solder paste from noisy initial data, significantly improving the reliability and repeatability of the detection.

[0049] Secondly, to achieve precise quantification of the volume, height, and shape of solder paste printing, the system leverages the clear imaging characteristics of its SAM lens across the entire field of view, combined with a high-precision system model established based on the inverse camera calibration method, to ensure that the 3D reconstruction results possess metrological-level accuracy. Its technical effect is the ability to accurately identify microscopic defects in the solder paste, such as insufficient thickness, shape collapse, bridging, and misalignment.

[0050] Furthermore, to meet the cycle time requirements of high-speed online inspection on the production line, the DCT frequency domain solution algorithm executed by the processing module transforms the complex phase unwrapping problem into a computationally efficient forward and inverse transformation operation. This mechanism ensures that complete 3D point cloud data can be output within milliseconds. The technical effect is that this solder paste inspection equipment can seamlessly match the high-speed surface mount production line, achieving 100% online full inspection of each PCB board.

[0051] To objectively evaluate the performance of this invention in practical industrial applications, particularly its advantages in handling highly reflective surfaces and complex noise environments, we designed this comparative test. The test compares this system (hereinafter referred to as the improved DCT system) with a commercial 3D measurement system employing the traditional least-squares phase unwrapping method. The core objective of the test is to quantitatively verify the performance of this invention in three key indicators: measurement accuracy, noise robustness, and measurement efficiency.

[0052] 1. Testing environment: A metrology laboratory with temperature controlled at 23±2℃ and humidity at 40%-60%.

[0053] 2. The object being tested: Standard gauge block: Ceramic step height gauge block, nominal height 2.000mm, calibrated by a third-party metrology institution, with a calibration uncertainty of ±0.5μm.

[0054] SPI test board: A printed circuit board with various solder paste sizes (including 0402, QFN, and BGA pads).

[0055] 3. Compare system configurations: The system of this invention (improved DCT group) uses a DLP4500 projection module, two cameras (equipped with Sham lenses), and a processing unit of Intel i7-11800H@2.30GHz CPU and 16GB RAM. The algorithm is implemented strictly according to the instruction manual.

[0056] Traditional system (comparison group): The hardware configuration is exactly the same as the system of the present invention, except that the processing algorithm is replaced with the traditional least squares phase unwrapping algorithm based on Fast Fourier Transform (FFT).

[0057] Software: All algorithms were coded and implemented in the same environment of MATLAB R2023a to ensure the fairness of the comparison.

[0058] 4. Test Plan and Detailed Process 4.1 Test 1: Static accuracy test: Under ideal conditions, evaluate the system's absolute measurement accuracy for known height differences.

[0059] step: ① Place the standard step height gauge block at the center of the measurement field of view.

[0060] ② Repeated measurements were performed on the same piece using both the improved DCT system and the traditional system, with 10 independent measurements performed in each group.

[0061] ③ After multiple measurements, select a stable region (approximately 10x10 pixels) on the upper and lower surfaces of the step in the reconstructed 3D point cloud, calculate its average height difference, and use it as the height value of this measurement.

[0062] ④ Record the 10 height values ​​measured by the two systems, and calculate the mean absolute error and standard deviation of each value compared with the nominal value (2.000 mm).

[0063] 4.2 Test 2: Interference robustness test: Simulate common interferences in real industrial environments to evaluate the stability of the system under non-ideal conditions.

[0064] step: ① Fix the SPI test board onto the stage.

[0065] ② Ideal condition benchmark measurement: Under interference-free conditions, two sets of systems are used to measure the same BGA solder paste area on the board, and the obtained three-dimensional point cloud is used as the "benchmark point cloud".

[0066] ③Introduce interference: In the projection light path, use a thin metal wire to create a slight local obstruction; at the same time, turn on a side point light source to form a small area of ​​light spot within the field of view.

[0067] ④ Measurement under interference conditions: Under the above interference conditions, the same BGA solder paste area was measured again using two sets of systems.

[0068] ⑤ Data Analysis: Calculate the root mean square error (RMSE) between the reconstructed point cloud under interference conditions and the "reference point cloud". The higher the RMSE value, the greater the impact of noise interference on the reconstruction results and the worse the robustness.

[0069] 4.3 Test 3: Computational efficiency test: Quantitative comparison of the computation time of the two algorithms in the core step of phase unwrapping.

[0070] step: ① Acquire a high-resolution (1280x1024 pixels) package phase image.

[0071] ② The phase map of the package was unwrapped using the improved DCT algorithm and the traditional FFT least squares algorithm, respectively.

[0072] ③Use MATLAB's tic / toc function to accurately record the CPU time consumed from the start of the algorithm to the output of the complete absolute phase map.

[0073] ④ Repeat the above process 100 times and take the average time as the final result to eliminate random fluctuations.

[0074] 5. The statistics from the above testing process are shown in the table below:

[0075] Based on a comprehensive analysis of the results of the three tests mentioned above, the following conclusions can be drawn: High precision: In static precision tests, the system of this invention exhibits lower system error and higher repeatability accuracy, verifying the effectiveness of its improved phase unwrapping model in improving the absolute accuracy of measurement.

[0076] Strong robustness: In anti-interference tests, the reconstruction distortion of the system of this invention is much smaller than that of traditional systems when facing optical interference. This fully demonstrates that its core innovation—improved divergence calculation based on cosine function—can effectively constrain and isolate local phase errors, preventing them from spreading during global unwrapping, thereby greatly improving reliability in complex industrial scenarios.

[0077] High Efficiency: In computational efficiency tests, the algorithm of this invention exhibits a faster processing speed, meeting the high real-time requirements of modern automated detection. In summary, this test report, with detailed and repeatable data, confirms that this invention comprehensively outperforms traditional technologies in key performance indicators. Its innovations bring about practical technological advancements, possessing significant practical value and promising industrial application prospects.

[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method of decoding a three-dimensional reconstruction based on DCT, characterized in that, The method comprises the following steps: S1, projecting a light intensity distribution of a newly coded four-step phase shift fringe pattern to a measured object, and collecting a deformed fringe image modulated by the surface of the object by an image acquisition device; S2, calculating a wrapped phase of the surface of the measured object according to the collected fringe image; S3, constructing a least square phase unwrapping model and converting it into a discrete Poisson equation solving problem; S4, using an improved divergence calculation method based on a cosine function to perform nonlinear transformation on phase gradient values in multiple directions and calculate an improved divergence field; S5, performing two-dimensional discrete cosine transform (DCT) on the improved divergence field, performing two-dimensional inverse discrete cosine transform (IDCT) after operation in the frequency domain with a transfer function, and solving to obtain an absolute phase field; S6, reconstructing a three-dimensional topography of the measured object according to the absolute phase field and system calibration parameters.

2. The DCT-based decoding three-dimensional reconstruction method of claim 1, wherein, In step S1, the light intensity distribution of the newly coded four-step phase shift fringe pattern is defined by the following formula group: ; ; ; ; wherein, respectively represent the light intensity values of the four phase-shifted images at pixel point ; represents the background light intensity; represents the modulation intensity; represents the wrapped phase to be solved.

3. The DCT-based decoding three-dimensional reconstruction method of claim 2, wherein, In step S2, the above wrapped phase is calculated by the following arctangent formula: ; wherein, represents the wrapped phase value calculated at the pixel point .

4. The DCT-based decoding three-dimensional reconstruction method of claim 1, wherein, In step S3, the objective function of the least square model is: ; wherein, represents an objective function, which is solved by minimizing to solve the absolute phase; represents the absolute phase value to be solved at the pixel grid point ; respectively represent the wrapped phase gradient values in the horizontal direction (x), the vertical direction (y), and the main diagonal left upper corner (m) direction and the main diagonal right upper corner (n) direction at the pixel points ; respectively represent the number of rows and columns of the image pixel grid.

5. The DCT-based decoding three-dimensional reconstruction method of claim 4, wherein, the divergence term of the discrete Poisson equation calculated by the following equation, which is extended to four directions: ; wherein, represents the divergence value calculated at the pixel point .

6. The DCT-based decoding three-dimensional reconstruction method of claim 1, wherein, In step S4, the improved divergence calculation method is based on the following principles: compressing noise-induced erroneous phase gradient values within an interval based on ; wherein denotes a phase gradient value affected by noise; denotes a wrapping operator; denotes a cosine function.

7. The DCT-based decoding three-dimensional reconstruction method of claim 6, wherein, In step S4, the improved divergence field ρ(x, y) is calculated by the following formula group: ; Wherein, the cosine phase gradient in each direction is defined as follows: ; ; ; ; wherein p(x, y) represents the improved divergence value calculated at the pixel coordinate (x, y); , , , respectively represent the cosine of the phase difference value in the horizontal (x), vertical (y), main diagonal (m), and minor diagonal (n) directions at the pixel point (x, y); and φ(x, y) represents the phase value at the pixel point (x, y). The cosine value corresponding to the gradient value outside the effective pixel range of the image is set to zero.

8. The DCT-based decoding three-dimensional reconstruction method of claim 1, wherein, In step S5, the absolute phase field φ(x, y) is solved by the following formula: ; Wherein, the transfer function K(i, j) is: ; wherein φ(x, y) represents the solved absolute phase value at the pixel point (x, y); DCT{·} represents a two-dimensional discrete cosine transform; {·} represents a two-dimensional discrete cosine inverse transform; i, j represent corresponding frequency indexes in the frequency domain.

9. A three-dimensional measuring system for carrying out the method according to any one of claims 1 to 8, characterized in that It comprises: A projection module for projecting the newly coded four-step phase shift fringe pattern; An image acquisition module, which is configured with a Scheimpflug lens for each side-view camera to increase the clear frame and is used for collecting correct deformed fringe images; A processing module configured to perform the above-mentioned wrapped phase calculation, improved divergence calculation, DCT transformation and inverse transformation, and three-dimensional reconstruction algorithm; Wherein, the system calibration adopts an inverse camera method to calibrate the projector.

10. A solder paste inspection apparatus, characterized by, The three-dimensional measurement system integrated with the three-dimensional measurement system of claim 9 is applied to SPI solder paste detection of equipment Ican510.