A method and apparatus for three-dimensional profile measurement based on multiple projection gratings
By calibrating the camera-projector system and using a probabilistic fusion model, dynamically verifying the unfolding path, and optimizing the phase quality, the problem of phase order jumps in complex morphologies and discontinuous surfaces in multi-projection grating 3D contour measurement was solved, achieving efficient and reliable 3D reconstruction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING BOVISION TECH CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-09
AI Technical Summary
Existing three-dimensional profile measurement methods based on multi-projection gratings are prone to phase order jumps and data distortion when measuring complex topography and discontinuous surfaces. Existing technologies usually come at the cost of sacrificing measurement efficiency or robustness.
The camera-projector system is calibrated to obtain intrinsic and extrinsic parameters, and speckle patterns are projected and the surface gradient of the object is analyzed to determine the non-uniform spatial frequency sequence. Combined with the probabilistic fusion model and region division, the unfolding path is dynamically verified, the phase quality is optimized, and noise interference is suppressed.
Without increasing the number of projections, it significantly improves the measurement reliability of complex topography and discontinuous surfaces, effectively isolates error propagation, avoids order jumps, and achieves high-precision 3D reconstruction.
Smart Images

Figure CN122170795A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional shape measurement technology, and in particular to a three-dimensional contour measurement method and apparatus based on a multi-projection grating. Background Technology
[0002] Structured light projection-based 3D contour measurement methods are widely used due to their advantages of being non-contact, highly accurate, and fast. Among these, the multi-projection grating method reconstructs the 3D shape of an object by projecting multiple fringe patterns of different frequencies and utilizing phase information. However, in practical applications, the phase unwrapping process is a key challenge. For complex shapes (such as steep edges), discontinuous surfaces (such as holes or steps), or noisy scenes, traditional phase unwrapping algorithms (such as temporal and spatial phase unwrapping) are prone to path errors, leading to phase order jumps and ultimately causing severe distortion of the 3D reconstruction data. Existing techniques typically alleviate this problem by increasing the number of projection patterns or using complex post-processing, but this often comes at the cost of measurement efficiency or robustness. Summary of the Invention
[0003] This invention provides a three-dimensional contour measurement method based on a multi-projection grating, comprising: By calibrating the camera-projector system, internal and external parameters are acquired, and a set of speckle patterns are projected to preliminarily analyze the surface topography gradient of the object and determine the non-uniform spatial frequency sequence for formal measurement. According to the non-uniform spatial frequency sequence, multiple sets of phase-shifting grating patterns are sequentially projected and acquired, and the wrapping phase map corresponding to each frequency is calculated. For the same pixel, based on its reliability assessment in phase maps at different frequencies, confidence weights are assigned to each frequency phase value, and an optimized phase map and the corresponding fused confidence map are calculated through a probabilistic fusion model. For the optimized phase map, gradient information is calculated and combined with the fused confidence map to divide the region. Then, a region-guided path consistency check unfolding algorithm is executed. Seed points are selected to perform consistency check when entering the risk zone boundary, and the unfolding path is dynamically decided to finally obtain the absolute phase. Using the principles of triangulation and system calibration parameters, the absolute phase is converted into three-dimensional point cloud coordinates on the object's surface.
[0004] The aforementioned three-dimensional contour measurement method based on multi-projection gratings acquires intrinsic and extrinsic parameters through camera-projector system calibration, projects a set of speckle patterns, preliminarily analyzes the surface topography gradient of the object, and determines the non-uniform spatial frequency sequence for formal measurement, including: Based on the binocular structure of a digital light processing projector and an industrial camera, the sub-pixel correspondence of feature points is established through image acquisition and stripe decoding of a multi-pose calibration board, and the camera's intrinsic and extrinsic parameters are solved. The speckle pattern is projected onto the object under test and the modulated image is acquired to calculate the disparity field. The surface region is divided based on the disparity field gradient distribution, and the adaptation frequency is dynamically allocated to generate a non-uniform spatial frequency sequence.
[0005] The aforementioned three-dimensional contour measurement method based on multi-projection gratings involves sequentially projecting and acquiring multiple sets of phase-shifting grating patterns according to the non-uniform spatial frequency sequence, and calculating the wrap-around phase map corresponding to each frequency, including: By projecting corresponding phase-shifting grating patterns onto each frequency in a non-uniform spatial frequency sequence, all deformed fringe images at each frequency are acquired to obtain a set of phase-shifting images. For each frequency-corresponding phase-shifted image group in the image dataset, the pixel grayscale values are substituted into a multi-step phase-shifting phase calculation algorithm to calculate the principal value of the wrapping phase of each pixel and generate the wrapping phase map of the corresponding frequency.
[0006] The aforementioned three-dimensional contour measurement method based on multi-projection gratings, for the same pixel, assigns confidence weights to each frequency phase value based on its reliability assessment in phase maps wrapped at different frequencies, and calculates an optimized phase map and the corresponding fused confidence map through a probabilistic fusion model, including: The overall reliability score of each pixel at all frequencies is calculated based on the package phase map, and the confidence weight of each pixel at each frequency is calculated accordingly. Based on the confidence weight of each pixel, the optimized phase map and the corresponding fused confidence map are calculated.
[0007] The aforementioned three-dimensional contour measurement method based on multi-projection gratings optimizes the phase map, calculates gradient information and combines it with a fused confidence map to perform region division, and executes a region-guided path consistency check unfolding algorithm. Seed points are selected for consistency check when entering the risk zone boundary, and the unfolding path is dynamically decided to finally obtain the absolute phase, including: Gradient calculation is performed on the optimized phase map to obtain the gradient magnitude map, and risk regions are delineated by combining the fused confidence map; The execution path consistency check unfolding algorithm selects uniform seed points in the high-confidence stable region and assigns them an initial absolute phase. Consistency checks are performed on different risk regions to obtain the absolute phase map.
[0008] A three-dimensional contour measurement device based on a multi-projection grating includes: The calibration and pre-analysis module is used to obtain intrinsic and extrinsic parameters through the calibration of the camera-projector system, project a set of speckle patterns, preliminarily analyze the surface topography gradient of the object, and determine the non-uniform spatial frequency sequence for formal measurement. The multi-frequency stripe projection module is used to sequentially project and collect multiple sets of phase-shifting grating patterns according to the non-uniform spatial frequency sequence, and calculate the wrap-around phase map corresponding to each frequency. The multi-frequency phase fusion module is used to evaluate the reliability of the same pixel in phase maps wrapped at different frequencies, assign confidence weights to phase values at each frequency, and calculate the optimized phase map and the corresponding fused confidence map through a probabilistic fusion model. The region-guided unfolding module is used to calculate gradient information for the optimized phase map and combine it with the fused confidence map to divide the region. It also executes the region-guided path consistency check unfolding algorithm, selects seed points to perform consistency check when entering the risk zone boundary, dynamically decides the unfolding path, and finally obtains the absolute phase. The 3D coordinate reconstruction module is used to convert the absolute phase into 3D point cloud coordinates of the object's surface using the principles of triangulation and system calibration parameters.
[0009] The beneficial effects achieved by this invention are as follows: By employing adaptive frequency selection and confidence fusion, phase quality is optimized from the source, significantly suppressing noise interference. An intelligent unfolding path with region partitioning and real-time verification effectively isolates error propagation and eliminates order jumps. Deep collaboration between the two algorithms overcomes the reliability challenges of measuring complex topography and discontinuous surfaces without significantly increasing the number of projections. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0011] Figure 1 This is a flowchart of a three-dimensional contour measurement method based on a multi-projection grating provided in Embodiment 1 of this application.
[0012] Figure 2 This is a schematic diagram of a three-dimensional contour measurement device based on a multi-projection grating provided in Embodiment 2 of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] Example 1 like Figure 1 As shown, Embodiment 1 of this application provides a three-dimensional contour measurement method and apparatus based on a multi-projection grating, comprising: S1: By calibrating the camera-projector system, acquire intrinsic and extrinsic parameters, project a set of speckle patterns, conduct preliminary analysis of the surface topography gradient of the object, and determine the non-uniform spatial frequency sequence for formal measurement; The process involves calibrating the camera-projector system to acquire intrinsic and extrinsic parameters, projecting a set of speckle patterns, conducting a preliminary analysis of the object's surface topography gradient, and determining the non-uniform spatial frequency sequence for formal measurements. This includes the following sub-steps: S11: Based on the binocular structure of a digital light processing projector and an industrial camera, the sub-pixel correspondence of feature points is established through image acquisition and stripe decoding of a multi-pose calibration board, and the camera's intrinsic and extrinsic parameters are solved. A typical binocular structure (camera-projector pair) consisting of a digital light processing projector and a high-resolution industrial camera is employed. The calibration board is placed in multiple (typically more than 10) different positions and orientations within the measurement space. Images of the calibration board are captured at each position, while the projector simultaneously projects grayscale-coded or phase-shifted fringe patterns onto the calibration board, which are also acquired synchronously by the camera. By decoding these fringes, a sub-pixel-level correspondence is established between the camera image and the projector "image" (i.e., the projector's digital micromirror array) for each feature point on the calibration board. Using the calibration board images acquired by the camera, intrinsic parameters (focal length, principal point, distortion coefficients) and extrinsic parameters (rotation and translation matrices at different positions) of the camera are solved using methods such as Zhang Zhengyou's method.
[0015] S12: Project a speckle pattern onto the object under test and acquire the modulated image to calculate the disparity field. Divide the surface region based on the disparity field gradient distribution and dynamically allocate the adaptation frequency to generate a non-uniform spatial frequency sequence.
[0016] One or more speckle patterns are projected onto the surface of the object being measured. Speckle patterns have the advantages of high randomness and distinct local features. The modulated speckle images are simultaneously acquired using a camera. Dense feature matching or local deformation analysis is performed on the acquired speckle images. The disparity field of each small region in the image relative to a reference plane (or initial state) is calculated using digital image correlation or block matching algorithms.
[0017] The parallax field has an approximately linear relationship with the depth gradient of the object's surface. By performing spatial gradient calculations on the parallax field (such as calculating the Sobel gradient magnitude), a surface topography gradient magnitude distribution map is generated. This map clearly identifies flat areas (small gradient values), sloping areas (uniform and moderate gradient values), and discontinuous or steep areas such as edges, steps, and holes on the object's surface (large and drastically changing gradient values).
[0018] Based on the gradient distribution map, the most suitable frequency is assigned to regions with different characteristics. Low-frequency fringes (such as those with a wide sine period) have good noise resistance and are reliable in flat regions, but are prone to phase ambiguity in steep regions; high-frequency fringes (with a narrow sine period) have high sensitivity, but are susceptible to noise interference in flat regions and are prone to incorrect unfolding.
[0019] On the gradient map, a threshold is set to mark regions where the gradient magnitude exceeds the safety threshold (discontinuous risk areas). For these risk areas, specific mid-to-high spatial frequencies are dynamically inserted so that the theoretical phase difference (based on the preliminary gradient estimate) between adjacent pixels within the risk area and its neighborhood is limited to the (-π, π) interval, thus ensuring uniqueness within its own wrapping period. Finally, a non-uniform spatial frequency sequence is determined for formal measurements.
[0020] S2: According to the non-uniform spatial frequency sequence, multiple sets of phase-shifting grating patterns are sequentially projected and acquired, and the wrapping phase map corresponding to each frequency is calculated. The process of sequentially projecting and acquiring multiple sets of phase-shifting grating patterns according to the non-uniform spatial frequency sequence, and calculating the encapsulated phase map corresponding to each frequency, includes the following sub-steps: S21: Project the corresponding phase-shifting grating pattern according to each frequency in the non-uniform spatial frequency sequence, and collect all deformed stripe images at each frequency to obtain a phase-shifting image group; For each specific frequency value in a non-uniform spatial frequency sequence, a set of corresponding sinusoidal grating digital images is generated. For each frequency, the set of images contains multiple patterns with identical stripes but sequentially offset positions.
[0021] Control the projector to project the generated grating patterns in sequence, strictly following the non-uniform spatial frequency sequence.
[0022] For each frequency in the sequence: the projector first projects the first phase-shift pattern at that frequency, and the camera simultaneously acquires the image of the deformed stripes modulated by the object surface; then, the projector quickly switches to the second phase-shift pattern at the same frequency and projects it, and the camera acquires it again simultaneously; this process is repeated until all phase-shift patterns at that frequency are acquired, and the corresponding phase-shift image group is obtained.
[0023] After all patterns for one frequency have been acquired, the system automatically switches to the next frequency in the frequency sequence and repeats the above projection and acquisition cycle until all pattern groups for all frequencies in the sequence have been projected and acquired.
[0024] Finally, based on the acquisition order and frequency identification, all deformed stripe images acquired by the cameras are completely stored to form a structured image dataset.
[0025] S22: For each frequency-corresponding phase-shifted image group in the image dataset, substitute the pixel grayscale values into the multi-step phase-shifting algorithm to calculate the principal value of the wrapping phase of each pixel and generate the wrapping phase map of the corresponding frequency.
[0026] For each independent frequency in the acquired image dataset, a set of corresponding phase-shifted images is used for calculation. The grayscale value of the set of phase-shifted images corresponding to each pixel position in the camera image at that frequency is substituted into the standard multi-step phase-shifting algorithm. By comparing the changes in grayscale values between the phase-shifted images, a phase shift value between [a certain value] and [a certain value] at that pixel is calculated. The principal phase value (wrapping phase) between them.
[0027] After performing the above calculations on each pixel in the image, a wrap-around phase map corresponding to that frequency is obtained. The grayscale or color value of each pixel represents the calculated wrap-around phase value. Simultaneously, a modulation intensity map reflecting stripe contrast and signal-to-noise ratio is calculated during the solution process.
[0028] S3: For the same pixel, based on its reliability assessment in the phase map at different frequencies, assign confidence weights to each frequency phase value, and calculate the optimized phase map and the corresponding fused confidence map through a probabilistic fusion model. Specifically, for the same pixel, based on its reliability assessment in wrap-around phase maps at different frequencies, confidence weights are assigned to each frequency phase value, and an optimized wrap-around phase map and a corresponding fused confidence map are calculated through a probabilistic fusion model, including the following sub-steps: The information in the multi-frequency wrapped phase map is intelligently fused to generate a single wrapped phase map with higher quality and fewer contradictions, and a fusion confidence map that identifies the fusion confidence of each pixel is generated simultaneously.
[0029] S31: Calculate the overall reliability score of each pixel at all frequencies based on the package phase map, and calculate the confidence weight of each pixel at each frequency accordingly. Specifically, the wrap-around phase diagram at all frequencies and its corresponding modulation intensity map As input; for each pixel A reliability feature vector, including local phase smoothness and multi-frequency phase compatibility, is constructed to characterize the quality of its k-th frequency phase value. Wherein, Calculation with Within the small window centered Standard deviation The value is mapped to a smoothness index. The closer the value is to 1, the smoother the smoothness, indicating that the phase continuity of the region is good, and it is less affected by noise or shadows, and the phase reliability of the point is high.
[0030] Next, for the frequency corresponding to each pixel Calculate its relationship with all other frequencies. Phase consistency. Specifically, calculate the phase difference residual at the theoretical frequency ratio, and the residual... The smaller the value, the more consistent the observations of the two frequencies at that point. The frequencies are then calculated. Bidirectional compatibility with l. Then take all. corresponding The median value is used as the overall compatibility characteristic value for that frequency.
[0031] Then, the pixel points are calculated using the formula. The overall reliability score across all frequencies is calculated using the following formula:
[0032] in, This represents the overall reliability score; It is the first The original value of the modulation intensity of the pixel at each frequency; It is the maximum value of the modulation intensity map at that frequency; It is an adjustable exponential parameter used to control the normalized modulation intensity. The degree of nonlinear influence; Based on pixels Within a local window centered on the first, its Local phase smoothness of the phase value wrapped by a frequency; It is a threshold parameter used to scale the standard deviation and control the rate of exponential decay. It is an adjustable exponential parameter used to control the local phase smoothness. The degree of impact; After phase wrapping, the pixel is at the [number]th [position]. The frequency and the l-th frequency The absolute value of the residual between the two packaged phase values is calculated based on the theoretical frequency ratio to measure the consistency of the two different frequency measurement results at that point. Used to normalize residuals; Indicates division in the complete calculation All other frequencies except those mentioned above; It is an adjustable exponential parameter used to regulate multi-frequency phase compatibility characteristics. The relative importance of the overall score.
[0033] Next, the competitive confidence weights are calculated using the following formula: , Represents pixels Place, No. The final confidence weight for each frequency phase value, for the same pixel, is the sum of the weights of all frequencies. ; The pixel is at the The overall reliability score at each frequency indicates that the observation at that frequency is more reliable. It is a key control parameter greater than 0; when When the value is small It will drastically amplify scores at different frequencies. The slight differences between them resulted in the highest score frequency being close to Monopolistic weight; when When the value is large The function softens the distribution of weights, so that even if there are differences in scores, each frequency can be assigned a relatively balanced weight, thereby promoting information fusion. It is the total number of frequencies contained in a non-uniform frequency sequence; It is the first Frequency index; The pixel is at the Overall reliability score at each frequency.
[0034] S32: Calculate the optimized phase map and the corresponding fused confidence map based on the confidence weight of each pixel.
[0035] After obtaining the confidence weights, the fused optimized phase map is obtained through the objective function, as shown in the following formula: ,in, This represents the value of the objective function and quantifies the current phase estimate. The overall quality is determined by finding the value that minimizes this value. ; It is the total number of frequencies in the adaptive frequency sequence. It is a frequency index; It is a pixel. The location corresponds to the first Confidence weights for each frequency; This represents the phase wrapping operator, used to map the input phase difference to the principal value range. This allows for the accurate calculation of differences between periodic signals, avoiding erroneous distance measurements due to the periodicity of phase values. It needs optimization, at the pixel level. The absolute phase estimate at the location; Is at the same pixel point the The difference between the two observed values of the package phase at each frequency is the phase deviation that needs to be evaluated. For data fidelity, the goal is to drive the optimized phase. Observations at all frequencies Consistency should be maximized, and the level of consistency required is determined by the confidence weights. modulation; It is a regularization coefficient used to balance the degree of data fit with the strength of prior constraints on the solution. It is a regularization function that, based on prior knowledge of the characteristics of an ideal phase map (such as overall smoothness and edge sharpness), applies to the entire phase map to be optimized. ; This is a regularization term used to constrain the shape of the solution, prevent overfitting noise, and improve the physical rationality of the solution.
[0036] Specifically, an iterative reweighting and variable splitting strategy is employed to address the nonlinearity caused by phase entanglement during the iterative solution process. Specifically, the wrapped phase diagram corresponding to the frequency with the highest average confidence weight is used as the initial solution. In the first In the next iteration, the current phase estimate is fixed. For each pixel and each frequency Calculate continuous phase difference ,in Represents the pixel at the k-th frequency. The continuous phase difference at that point; Indicates the first After the iteration, the currently obtained optimal fused phase map is located at pixel coordinates. Phase estimate at the location; Indicates the first The next iteration; Representing the At each frequency at the pixel The original packaged phase observation (i.e., the principal phase value) at the location; For integer period offsets estimated through frequency relationships, to ensure The absolute value of the phase difference should be minimized to form a physically continuous and differentiable phase difference.
[0037] After fixed integer offset estimation, the phase update is obtained by introducing auxiliary variables and solving the large sparse linear system using ADMM (Alternating Direction Multiplier Method) or CG (Conjugate Gradient Method). .
[0038] Next, update the phase solution. The new phase value of each pixel is constrained to the principal value range through a modulo operation. The iteration terminates when the root mean square (RMS) phase change between two consecutive iterations is less than a set threshold (e.g., 1e-3 radians), and the final optimized wrap phase map is output. .
[0039] After optimization convergence, the normalized weighted residual at each pixel is calculated and mapped to a confidence score, as shown in the following formula: ,in This is the scale parameter. The values range from (0,1). A value closer to 1 indicates a small fusion residual at that point, high consistency across frequencies, and high confidence; a lower value indicates significant inconsistencies or noise, and low confidence. The entire graph represents the fusion confidence map. .
[0040] This represents the confidence value of the final output fused confidence map at pixel coordinates (i,j). The closer the value is to 1, the more reliable the phase value of the fused pixel is. is the total number of adaptive frequency sequences; k is the index variable; It is a pixel. The location corresponds to the first Confidence weights for each frequency; It is the value of the optimal fused wrap phase obtained from the final optimization solution at that pixel point; It is the sum of the weighted phase residuals of all frequencies at that pixel. It is the first The original wrap-around phase observations at each frequency; Ensure that its internal phase difference is calculated correctly. Within the period; It is a normalization factor that controls the mapping scale from the sum of weighted residuals to the confidence value.
[0041] Final output optimized phase map Fusion Confidence Map The optimized phase map is smoother and less noisy in most regions than any single-frequency phase map. In error-prone regions, the model's regularization constraints and competitive weights prevent obviously unreasonable local jumps. (Confidence map representation is then used.) The reliability of fusion for each pixel value.
[0042] S4: For the optimized phase map, calculate the gradient information and combine it with the fused confidence map to divide the region, and execute the region-guided path consistency check unfolding algorithm. Select seed points to perform consistency check when entering the risk zone boundary, dynamically decide the unfolding path, and finally obtain the absolute phase. Specifically, for optimizing the phase map, gradient information is calculated and combined with the fused confidence map to perform region division. A region-guided path consistency check unfolding algorithm is then executed, selecting seed points for consistency check upon entering the risk zone boundary. The unfolding path is dynamically decided to ultimately obtain the absolute phase. This process includes the following sub-steps: S41: Calculate the gradient of the optimized phase map to obtain the gradient magnitude map, and divide the risk area by combining it with the fused confidence map; Using the optimized phase map and fused confidence map as input, the following is performed: Perform gradient calculations (e.g., using the Sobel operator) to obtain the gradient magnitude map. The figure indicates the degree of phase change, with high gradient regions typically corresponding to the edges or steep sections of the physical surface.
[0043] Based on the gradient magnitude map, combined with the optimized phase map and the fused confidence map, a region label is assigned to each pixel. Among these, the high-confidence stable region satisfies... and These regions have reliable phase values with gradual changes, making them the ideal safe starting point for phase unfolding. The low-confidence risk region meets the following requirements. or These regions may suffer from unreliable phase due to noise, shadows, motion blur, or surface discontinuities, and are prone to order jumps, requiring special handling. The intermediate confidence transition region does not belong to either of the above two categories. These regions have relatively good information quality and serve as a buffer between stable and risky areas.
[0044] S42: Execute the path consistency check expansion algorithm, select uniform seed points in the high-confidence stable region and assign them an initial absolute phase, perform consistency check on different risk regions, and obtain the absolute phase map.
[0045] Within all high-confidence stable regions, select multiple evenly distributed pixels as seed points. Assign an initial absolute phase value to each seed point (which can be set to 0 or determined through additional encoding). Create an "unfolded marker map" and an "absolute phase map" of the same size as the phase map, and mark all seed points as unfolded, with their absolute phase equal to their wrapping phase.
[0046] Next, all unexpanded pixels adjacent to the seed point (regardless of their region) are added to a priority queue. The queue priority is determined by the fusion confidence score. and gradient Together, we decide to prioritize processing pixels with high confidence and low gradients. When the priority queue is not empty, we retrieve the pixel with the highest priority. Process it. Check all its expanded neighboring pixels. If If the location is in a stable or transitional region, standard path-dependent unwrapping is used. That is, from all unwrapped neighboring pixels, the "most reliable" neighbor (e.g., the one with the highest confidence) is selected, and the wrapping phase difference between the two is compared to calculate and determine the location. The absolute phase order is used to complete the expansion of the point and add its adjacent unexpanded points to the queue.
[0047] When the pixel is retrieved from the queue When a pixel is located in a low-confidence risk zone and its referenced neighboring pixels (i.e., the source pixels to which it attempts to expand) come from a stable or transitional zone, a consistency check subroutine is triggered. Specifically, in Within the surrounding risk zone, select several predefined verification points (such as...). (It is itself and 1-2 adjacent risk area pixels).
[0048] For each verification point, the multi-frequency original package phase map obtained in S2 is used. and known frequency values Based on the currently deployed and reliable neighborhood absolute phase, independently predict the check point at each frequency. The set of possible absolute phase values (usually with multiple possible integer orders).
[0049] Check if there exists a uniform integer order such that the predicted absolute phase of all frequencies (at least two) is equal after passing through... After normalization, they all point to a compatible physical altitude. This can be determined by checking if the following formula holds true for the major frequencies: ,in It is the absolute phase predicted based on different frequencies and different possible orders; These represent the k-th and l-th frequencies in a non-uniform spatial frequency sequence, respectively.
[0050] If such a compatible level is found, then it is considered that from the current neighborhood to... The expansion path is reasonable. Accept this level and expand. And add its neighboring points within the risk zone to the queue.
[0051] If no compatible order is found, it means that expanding in the current direction may lead to an order error. Expanding from this neighborhood will be refused. The "neighborhood-risk point" pair will be recorded as an untrusted path. They are returned to the queue to await deployment attempts from other sides of the risk zone (i.e., from deployed points within the risk zone, or from stable zones in other directions).
[0052] For small regions completely surrounded by the risk zone, the risk zone boundary is gradually "eroded," and finally, reliable points or multi-frequency consistency within the region are used for forced verification and unfolding. The algorithm terminates when all pixels are marked as "unfolded," or when the priority queue is empty and there are no pixels left to process, outputting a complete absolute phase map. This is a continuous phase map with blurred edges removed, where the value of each pixel represents the complete phase delay from the projector to a point on the object's surface.
[0053] S5: Using the principles of triangulation and system calibration parameters, the absolute phase is converted into three-dimensional point cloud coordinates on the object's surface.
[0054] The system retrieves the intrinsic and extrinsic parameters (including intrinsic matrix, distortion coefficients, and relative pose) of the camera and projector obtained through calibration, and receives an absolute phase map with 2π blur removed. Based on the strict correspondence between the absolute phase value and the projected fringes, each camera pixel is mapped to a corresponding point on the projector image plane with sub-pixel precision, thus establishing a pair of binocular matching points for each object point. Subsequently, using this pair of corresponding points and known system geometric parameters, 3D coordinates are calculated using standard binocular triangulation principles. Specifically, after eliminating lens distortion, two spatial rays are constructed for each point based on the rotation and translation relationship between the camera and projector, and the optimal intersection point, i.e., the 3D coordinates of that point, is solved using the least squares method. By traversing all valid pixels in the absolute phase map, the system generates complete point cloud data with 3D spatial coordinates, and can perform post-processing such as filtering, ultimately outputting a common 3D model format.
[0055] Example 2 like Figure 2 As shown, Embodiment 2 of this application provides a three-dimensional contour measurement device based on a multi-projection grating, comprising: Calibration and Pre-analysis Module 21: Through the calibration of the camera-projector system, internal and external parameters are acquired, and a set of speckle patterns are projected to preliminarily analyze the surface topography gradient of the object and determine the non-uniform spatial frequency sequence for formal measurement. Multi-frequency stripe projection module 22: According to the non-uniform spatial frequency sequence, it sequentially projects and collects multiple sets of phase-shifting grating patterns, and calculates the wrap-around phase map corresponding to each frequency; Multi-frequency phase fusion module 23: For the same pixel, based on its reliability assessment in different frequency wrapping phase maps, assign confidence weights to each frequency phase value, and calculate an optimized wrapping phase map and the corresponding fusion confidence map through a probabilistic fusion model; Region-guided unfolding module 24: For the optimized phase map, gradient information is calculated and combined with the fused confidence map to divide the region, and the region-guided path consistency verification unfolding algorithm is executed. Seed points are selected to perform consistency verification when entering the risk zone boundary, and the unfolding path is dynamically decided to finally obtain the absolute phase. 3D Coordinate Reconstruction Module 25: Utilizes the principles of triangulation and system calibration parameters to convert the absolute phase into 3D point cloud coordinates on the object's surface.
[0056] Corresponding to the above embodiments, the present invention provides a computer storage medium, including: at least one memory and at least one processor; The memory is used to store one or more program instructions; A processor for running one or more program instructions to execute a three-dimensional contour measurement method based on a multi-projection grating.
[0057] Corresponding to the above embodiments, this embodiment of the invention provides a computer-readable storage medium containing one or more program instructions, which are executed by a processor to provide a three-dimensional contour measurement method based on a multi-projection grating.
[0058] The embodiments disclosed in this invention provide a computer-readable storage medium storing computer program instructions that, when executed on a computer, cause the computer to perform the aforementioned three-dimensional contour measurement method based on a multi-projection grating.
[0059] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0060] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.
[0061] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
[0062] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.
[0063] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).
[0064] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0065] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using a combination of hardware and software. When applied as software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0066] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A three-dimensional contour measurement method based on multi-projection gratings, characterized in that, include: By calibrating the camera-projector system, internal and external parameters are acquired, and a set of speckle patterns are projected to preliminarily analyze the surface topography gradient of the object and determine the non-uniform spatial frequency sequence for formal measurement. According to the non-uniform spatial frequency sequence, multiple sets of phase-shifting grating patterns are sequentially projected and acquired, and the wrapping phase map corresponding to each frequency is calculated. For the same pixel, based on its reliability assessment in phase maps at different frequencies, confidence weights are assigned to each frequency phase value, and an optimized phase map and the corresponding fused confidence map are calculated through a probabilistic fusion model. For the optimized phase map, gradient information is calculated and combined with the fused confidence map to divide the region. Then, a region-guided path consistency check unfolding algorithm is executed. Seed points are selected to perform consistency check when entering the risk zone boundary, and the unfolding path is dynamically decided to finally obtain the absolute phase. Using the principles of triangulation and system calibration parameters, the absolute phase is converted into three-dimensional point cloud coordinates on the object's surface.
2. The three-dimensional contour measurement method based on a multi-projection grating according to claim 1, characterized in that, By calibrating the camera-projector system, intrinsic and extrinsic parameters are acquired, and a set of speckle patterns is projected. A preliminary analysis of the object's surface topography gradient is then performed to determine the non-uniform spatial frequency sequence used for formal measurements, including: Based on the binocular structure of a digital light processing projector and an industrial camera, the sub-pixel correspondence of feature points is established through image acquisition and stripe decoding of a multi-pose calibration board, and the camera's intrinsic and extrinsic parameters are solved. The speckle pattern is projected onto the object under test and the modulated image is acquired to calculate the disparity field. The surface region is divided based on the disparity field gradient distribution, and the adaptation frequency is dynamically allocated to generate a non-uniform spatial frequency sequence.
3. The three-dimensional contour measurement method based on a multi-projection grating according to claim 1, characterized in that, According to the non-uniform spatial frequency sequence, multiple sets of phase-shifting grating patterns are sequentially projected and acquired, and the enclosed phase map corresponding to each frequency is calculated, including: By projecting corresponding phase-shifting grating patterns onto each frequency in a non-uniform spatial frequency sequence, all deformed fringe images at each frequency are acquired to obtain a set of phase-shifting images. For each frequency-corresponding phase-shifted image group in the image dataset, the pixel grayscale values are substituted into a multi-step phase-shifting phase calculation algorithm to calculate the principal value of the wrapping phase of each pixel and generate the wrapping phase map of the corresponding frequency.
4. The three-dimensional contour measurement method based on a multi-projection grating according to claim 1, characterized in that, For the same pixel, based on its reliability assessment in phase maps at different frequencies, confidence weights are assigned to phase values at each frequency. An optimized phase map and the corresponding fused confidence map are then calculated using a probabilistic fusion model, including: The overall reliability score of each pixel at all frequencies is calculated based on the package phase map, and the confidence weight of each pixel at each frequency is calculated accordingly. Based on the confidence weight of each pixel, the optimized phase map and the corresponding fused confidence map are calculated.
5. The three-dimensional contour measurement method based on a multi-projection grating according to claim 1, characterized in that, For the optimized phase map, gradient information is calculated and combined with the fused confidence map to perform region division. A region-guided path consistency check unfolding algorithm is then executed. Seed points are selected for consistency checks upon entering the risk zone boundary, and the unfolding path is dynamically decided to ultimately obtain the absolute phase, including: Gradient calculation is performed on the optimized phase map to obtain the gradient magnitude map, and risk regions are delineated by combining the fused confidence map; The execution path consistency check unfolding algorithm selects uniform seed points in the high-confidence stable region and assigns them an initial absolute phase. Consistency checks are performed on different risk regions to obtain the absolute phase map.
6. A three-dimensional contour measurement device based on a multi-projection grating, characterized in that, include: The calibration and pre-analysis module is used to obtain intrinsic and extrinsic parameters through the calibration of the camera-projector system, project a set of speckle patterns, preliminarily analyze the surface topography gradient of the object, and determine the non-uniform spatial frequency sequence for formal measurement. The multi-frequency stripe projection module is used to sequentially project and collect multiple sets of phase-shifting grating patterns according to the non-uniform spatial frequency sequence, and calculate the wrap-around phase map corresponding to each frequency. The multi-frequency phase fusion module is used to evaluate the reliability of the same pixel in phase maps wrapped at different frequencies, assign confidence weights to phase values at each frequency, and calculate the optimized phase map and the corresponding fused confidence map through a probabilistic fusion model. The region-guided unfolding module is used to calculate gradient information for the optimized phase map and combine it with the fused confidence map to divide the region. It also executes the region-guided path consistency check unfolding algorithm, selects seed points to perform consistency check when entering the risk zone boundary, dynamically decides the unfolding path, and finally obtains the absolute phase. The 3D coordinate reconstruction module is used to convert the absolute phase into 3D point cloud coordinates of the object's surface using the principles of triangulation and system calibration parameters.
7. A computer-readable storage medium, characterized in that, It includes one or more program instructions, which are executed by a processor as described in any one of claims 1-5, a three-dimensional contour measurement method based on a multi-projection grating.