A complex shell detection method and system based on structured light scanning

By calculating the discrete probability distribution of pixels and generating an initial confidence map using Shannon entropy, a new energy function is constructed. The smoothing weight is determined by combining the phase modulation amplitude and the local variance of the gradient. The system calibration parameters are iteratively optimized, which solves the problem of low accuracy in 3D reconstruction of complex shell surfaces and achieves high-precision 3D topography reconstruction.

CN121540086BActive Publication Date: 2026-03-20ZHONGKE LIXIANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610049211.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-15
Publication Date
2026-03-20
Estimated Expiration
2046-01-15

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy in 3D reconstruction when measuring complex curved surfaces and high curvature regions, with significant noise and error effects, making it difficult to effectively handle the surface characteristics of complex shells.

Method used

By calculating the discrete probability distribution of pixels and generating an initial confidence map using Shannon entropy, a new energy function is constructed. The smoothing weights are determined by combining the phase modulation amplitude and the local variance of the gradient. The system calibration parameters are iteratively optimized, the fringe level is corrected, and the three-dimensional morphology is reconstructed.

Benefits of technology

It improves the accuracy of 3D reconstruction of complex curved surfaces and high curvature areas, reduces the impact of noise, protects the geometric details of the object surface, and enhances the reliability and accuracy of measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121540086B_ABST
    Figure CN121540086B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of detection, and particularly relates to a complex shell detection method and system based on structured light scanning. The method comprises the following steps: calculating the wrapped phase value and phase modulation amplitude of each pixel point at each frequency, calculating the discrete probability distribution containing the candidate fringe order and the corresponding probability for each pixel point based on the multi-frequency wrapped phase difference, generating an initial pixel confidence map, constructing an energy function, determining the penalty weight of the smoothing term according to the phase modulation amplitude and the local variance of the wrapped phase gradient, obtaining a preliminary fringe order distribution map, updating the discrete probability distribution by using the initial pixel confidence map, re-minimizing the energy function to obtain a corrected fringe order distribution map, reconstructing the final three-dimensional topography, and iteratively optimizing the projector principal point and the radial distortion coefficient in the system calibration parameters. That is, the scheme of the present application can preserve the surface geometric details, improve the effect of processing the complex curved surface and the high-curvature area, and improve the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of detection. More particularly, the present application relates to a complex shell detection method and system based on structured light scanning. BACKGROUND

[0002] Structured light three-dimensional measurement technology, especially the method based on fringe projection profilometry, is widely used in industrial detection, reverse engineering and other fields. Structured light three-dimensional measurement technology projects a series of fringe patterns with sinusoidal light intensity distribution onto the surface of an object, collects the deformed fringe pattern modulated by the surface of the object by a camera, and recovers the three-dimensional topography of the object through phase unwrapping technology. Among them, the continuous absolute phase calculated from the principal value of the phase wrapped in the interval is a key step. This process usually uses multi-frequency time phase unwrapping. By projecting multiple groups of fringe patterns with different frequencies, the corresponding fringe order is determined pixel by pixel by using the mathematical relationship between the wrapped phases of different frequencies. However, when measuring shell parts with complex curved surfaces, sharp edges and uneven light reflection characteristics, the quality of the collected fringe images will decrease. Noise, shadows and inter-surface reflection will cause inaccurate wrapped phase calculation, and thus the fringe order calculated based on the multi-frequency phase difference will be wrong, resulting in a stepped error in the reconstructed three-dimensional model, thereby seriously affecting the measurement accuracy and reliability.

[0003] In order to solve the above problems, researchers usually model the fringe order solving process as a global energy function minimization problem. This method uses a spatial smoothing constraint term to penalize the discontinuous fringe order between adjacent pixels, and uses graph cut algorithm for optimization and solution, trying to correct the isolated order jump error caused by noise through the spatial continuity of neighborhood information.

[0004] However, the above method still has obvious shortcomings in practical application: first, the weight of the smoothing term in the global energy function cannot accurately represent the reliability difference of phase information in different regions, and it is not strong in adaptability when dealing with complex surfaces; second, for regions with sharp curvature changes, the local phase information itself has a large uncertainty, and simple smoothing constraints may incorrectly assimilate the fringe order of the region to the surrounding area, resulting in loss or distortion of high curvature details; in addition, the offline calibration method is difficult to completely eliminate all system errors, and residual errors will affect the measurement results, especially in high-precision detection applications. Therefore, there is an urgent need for a detection method that can reliably cope with complex shell surface characteristics and compensate for errors. SUMMARY

[0005] ​The application aims to provide a complex shell detection method and system based on structured light scanning, to solve the problem of poor processing effect on complex curved surface and high curvature area in the prior art, and the problem of reduced measurement accuracy caused by system residual error.

[0006] In the first aspect, the application provides a complex shell detection method based on structured light scanning, comprising:

[0007] Projecting multiple frequency sinusoidal fringes onto the surface of the complex shell and collecting deformed fringe patterns, calculating the wrapped phase value and phase modulation amplitude of each pixel point at each frequency; calculating the discrete probability distribution containing the candidate fringe order and the corresponding probability for each pixel point based on the multiple frequency wrapped phase difference; generating an initial pixel confidence map according to the Shannon entropy of the discrete probability distribution; constructing an energy function, the data item is defined by the discrete probability distribution, and the penalty weight of the smoothing item is determined according to the phase modulation amplitude and the local variance of the wrapped phase gradient; minimizing the energy function to obtain a preliminary fringe order distribution map; reconstructing a preliminary three-dimensional point cloud and calculating the principal curvature according to the preliminary fringe order distribution map; updating the discrete probability distribution of the neighborhood pixels using the initial pixel confidence map in the area where the absolute value of the principal curvature exceeds the preset threshold; re-minimizing the energy function to obtain a corrected fringe order distribution map; calculating the absolute phase based on the corrected fringe order distribution map and reconstructing the final three-dimensional topography; calculating the phase error of the final three-dimensional topography back-projected to the projector plane, and iteratively optimizing the projector principal point and the radial distortion coefficient in the system calibration parameters until convergence.

[0008] Preferably, the projecting multiple frequency sinusoidal fringes onto the surface of the complex shell and collecting deformed fringe patterns comprises: using a four-step phase shift method to sequentially project three groups of sinusoidal fringes with frequencies of 64, 63 and 56 periods respectively, each group of sinusoidal fringes containing four fringe patterns with phases sequentially differing by , and synchronously collecting 12 deformed fringe patterns by the camera.

[0009] Preferably, the calculating the discrete probability distribution containing the candidate fringe order and the corresponding probability for each pixel point based on the multiple frequency wrapped phase difference comprises: for the pixel point , calculating the difference between the wrapped phase values corresponding to the highest frequency and the second highest frequency to obtain the wrapped phase difference; calculating the distance between the wrapped phase difference and ; calculating the corresponding probability of the candidate fringe order according to the distance, satisfying the relationship: ; wherein, represents the probability of the candidate fringe order being at the pixel point , represents the distance, represents the preset standard deviation, This represents an exponential function with the natural constant e as its base.

[0010] Preferably, the calculation of the package phase difference and The distances between integer multiples of satisfy the following relation: In the formula, Indicates distance, Represents pixels The phase difference at the package location, It is the absolute value symbol; Indicates the candidate stripe level, that is The coefficient.

[0011] Preferably, the data item is defined by the discrete probability distribution, and the penalty weight of the smoothing term is determined based on the phase modulation amplitude and the local variance of the wrapping phase gradient, including: the data item is a pixel. Select candidate stripe levels The negative logarithmic probability; the smoothing term is the probability of adjacent pixels. and The absolute value of the difference between candidate stripe levels; the penalty weight of the smoothing term is proportional to the mean of the phase modulation amplitude of adjacent pixels and inversely proportional to the local variance of the wrapping phase gradient.

[0012] Preferably, the step of calculating the average of the maximum absolute value of the principal curvature of all pixels in the region where the maximum value of the principal curvature exceeds a preset threshold includes: calculating the average of the maximum values ​​of the principal curvature of all pixels. with standard deviation The preset threshold is Pixels whose maximum absolute value of principal curvature is greater than the preset threshold are marked as high curvature pixels; all high curvature pixels constitute a high curvature region.

[0013] Preferably, updating the discrete probability distribution of neighboring pixels using the initial pixel confidence map includes: taking each high-curvature pixel in the high-curvature region as a target pixel; for any target pixel, comparing the structural similarity between a 5×5 pixel neighboring block and other pixel neighboring blocks within a 15×15 pixel search window; calculating filtering weights based on structural similarity and the initial pixel confidence; and using the filtering weights to perform a weighted average of the discrete probability distributions of all pixels within the search window to obtain a new discrete probability distribution of the target pixel.

[0014] Preferably, the projector principal point and radial distortion coefficients in the calibration parameters of the iterative optimization system include: constructing an objective function, defined as the sum of the squares of the phase errors of all pixels; and employing the Levenberg-Marquardt algorithm, using the coordinates of the projector principal point... and the first two order radial distortion coefficients is to be optimized; the to-be-optimized variable is adjusted through iteration so that a relative change amount of a target function value is less than a preset threshold value when stopping.

[0015] Preferably, the minimizing the energy function comprises: minimizing the energy function by an optimization method of a graph cut algorithm.

[0016] In a second aspect, a complex shell detection system based on structured light scanning comprises:

[0017] A processor and a memory, the memory storing computer program instructions for complex shell detection based on structured light scanning, which, when executed by the processor, implement the above-described complex shell detection method based on structured light scanning.

[0018] The present application has the following beneficial effects: the present application represents the reliability of initial phase unwrapping by establishing a discrete probability distribution of candidate fringe orders for a pixel point and calculating Shannon entropy; and a new energy function is constructed, the weight of the smooth term of which comprehensively considers the local changes of phase modulation amplitude and wrapped phase gradient, which can smooth noise while better preserving the geometric details of the object surface, thereby improving the three-dimensional reconstruction accuracy under adverse conditions such as complex surfaces and noise. The present application realizes accurate correction of the error fringe order in complex regions by updating the discrete probability distribution using the initial pixel confidence, avoiding the blurring or deformation problem of details in high-curvature regions caused by traditional smoothing methods. The present application further adjusts the key calibration parameters of the projector through iterative optimization based on the re-projection phase error, further improving the measurement accuracy of the three-dimensional topography. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A step flowchart of a complex shell detection method based on structured light scanning in the embodiment is schematically shown;

[0020] Figure 2 A structural block diagram of a complex shell detection system based on structured light scanning in the embodiment is schematically shown. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0022] As shown in the drawings, Figure 1 A complex shell detection method based on structured light scanning in the embodiment comprises steps S1 to S4:

[0023] Step S1, projecting multi-frequency sinusoidal fringes to the complex shell surface and collecting deformed fringe patterns, calculating the wrapped phase value and phase modulation amplitude of each pixel point at each frequency; based on the multi-frequency wrapped phase difference, calculating the discrete probability distribution containing the candidate fringe order and the corresponding probability for each pixel point, and generating the initial pixel confidence map according to the Shannon entropy of the discrete probability distribution.

[0024] In one embodiment, the projecting multi-frequency sinusoidal fringes to the complex shell surface and collecting deformed fringe patterns comprises:

[0025] Using the four-step phase shift method, three groups of sinusoidal fringes with frequencies of 64, 63 and 56 periods are projected in turn, each group of sinusoidal fringes containing four fringe patterns with phases that differ by The 12 deformed fringe patterns are synchronously collected by the camera.

[0026] Specifically, using the three-frequency four-step phase shift method, three groups of sinusoidal fringes with different spatial frequencies are set; for example, the highest frequency is 64 periods, the second highest frequency is 63 periods, and the lowest frequency is 56 periods. The selection of the three groups of frequencies aims to determine the fringe order of each pixel through subsequent phase difference calculation. For each group of frequencies, such as sinusoidal fringes with 64 periods, four independent fringe patterns are generated, and the phases of the four patterns are 0, 、 and respectively.

[0027] The projector projects the 12 fringe patterns one by one to the complex shell surface to be measured, i.e., first projects four phase-shifted fringe patterns with 64 periods, then projects four fringe patterns with 63 periods, and finally projects four fringe patterns with 56 periods. At the same time, an industrial camera strictly synchronized with the projector exposes and collects deformed fringe patterns formed by the reflection of the complex shell surface at each time of projection, obtaining 12 deformed fringe patterns corresponding to the 12 projected fringe patterns. The image data will be used for subsequent calculation of wrapped phase values. Figure 1

[0028] In one embodiment, the calculating the discrete probability distribution containing the candidate fringe order and the corresponding probability for each pixel point based on the multi-frequency wrapped phase difference comprises:

[0029] For a pixel point , the difference between the wrapped phase values corresponding to the highest frequency and the second highest frequency is calculated to obtain the wrapped phase difference; the distance between the wrapped phase difference and the integer multiple of is calculated.

[0030] The corresponding probability of the candidate fringe order is calculated according to the distance, satisfying the relationship: ; in the formula, represents the candidate fringe order at the pixel point ​​the probability of the distance between the wrapped phase difference and denotes the distance, denotes the preset standard deviation, denotes an exponential function with a natural constant e as a base.

[0031] the wrapped phase difference of the calculation package is satisfies the relationship:

[0032] ;

[0033] In the formula, denotes the distance, denotes the wrapped phase difference at the pixel point , is an absolute value symbol; denotes the candidate fringe order, that is, the coefficient of .

[0034] Specifically, using the 12 collected deformed fringe patterns, the highest frequency 64 period and the second highest frequency 63 period corresponding wrapped phase values of each pixel point are calculated by a standard four-step phase shift algorithm, which are and respectively. The difference between the two wrapped phase values, that is, , is calculated. The difference itself is also a value wrapped in the interval .

[0035] According to experience, a set of possible candidate fringe orders is set, for example, all integers from 0 to 63. For each candidate fringe order , the distance between the theoretical unwrapped phase difference and the actually calculated wrapped phase difference is calculated. The distance reflects the degree of coincidence between the candidate fringe order and the measurement data. Then, the calculated distance is converted into a probability using a Gaussian function, where the preset standard deviation is set in advance according to an empirical value, which is 0.8 in this embodiment. By traversing all candidate fringe orders, the probabilities corresponding to all candidate fringe orders are obtained and normalized respectively, which can generate a discrete probability distribution containing all candidate fringe orders and corresponding probabilities for the pixel point , and an uncertainty model about the true fringe order is established for each pixel point.

[0036] In an optional embodiment, the wrapped phase value and the phase modulation amplitude of each pixel point at each frequency are calculated as follows:

[0037] For any group of frequencies , , the light intensity values corresponding to the four collected deformation fringe patterns are respectively , , and ;

[0038] The wrapped phase value of the pixel point is calculated by an arctangent function, satisfying the relationship: , and the value range is wrapped between and ;

[0039] The phase modulation amplitude satisfies the relationship: ;

[0040] In the formula, , are the wrapped phase value and the phase modulation amplitude of the pixel at the frequency , is an arctangent function.

[0041] The greater the phase modulation amplitude, the higher the signal-to-noise ratio of the pixel point, and the more reliable the calculated wrapped phase value. The phase modulation amplitude is also used for the construction of the subsequent energy function.

[0042] In an optional embodiment, the Shannon entropy satisfies the relationship: ; in the formula, represents the Shannon entropy value, represents the probability that the candidate fringe order at the pixel point is , represents a logarithm function with base 2.

[0043] The smaller the Shannon entropy, the lower the uncertainty and the higher the initial pixel confidence. The Shannon entropy values of all pixel points constitute the initial pixel confidence map.

[0044] Step S2, an energy function is constructed, a data item is defined by the discrete probability distribution, and a penalty weight of a smoothing term is determined according to the phase modulation amplitude and the local variance of the wrapped phase gradient; the energy function is minimized to obtain a preliminary fringe order distribution map.

[0045] In an embodiment, the data item is defined by the discrete probability distribution, and the penalty weight of the smoothing term is determined according to the phase modulation amplitude and the local variance of the wrapped phase gradient, including:

[0046] The data item is the negative logarithmic probability of the candidate fringe order selected by the pixel point ;

[0047] The smooth term is the absolute value of the difference between the candidate fringe order of the adjacent pixel point and .

[0048] The penalty weight of the smooth term is proportional to the average of the phase modulation amplitudes of the adjacent pixel points and inversely proportional to the local variance of the wrapped phase gradient in the neighborhood of the pixel point.

[0049] Specifically, the fringe order decoding problem is converted into a global energy minimization problem, the energy function is composed of a data term and a smooth term, the data term represents the cost of assigning a certain fringe order to a single pixel, and the smooth term is used to ensure spatial continuity, i.e. the candidate fringe orders of adjacent pixels should be as identical or similar as possible, and the energy function value is the sum of the data terms of all pixel points and the smooth terms of all pairs of adjacent pixels.

[0050] For a pixel point , the candidate fringe order is selected, and the data term cost is defined as the negative logarithm of the probability that the candidate fringe order is at the pixel point , the higher the probability of the candidate fringe order , the smaller the corresponding data term value. For a pair of adjacent pixels and , the smooth term cost is defined as the absolute value of the difference between the candidate fringe orders of the adjacent pixel points and , i.e. .

[0051] The penalty weight of the smooth term is proportional to the average of the phase modulation amplitudes of the two adjacent pixel points, and the phase modulation amplitude reflects the quality of the fringe signal, the higher the quality of the signal in the region, the greater the phase modulation amplitude, the greater the penalty weight, and the stronger the smooth constraint; at the same time, the penalty weight of the smooth term is inversely proportional to the local variance of the wrapped phase gradient in the neighborhood of the pixel point , at the edge of the object or high-frequency details, the local variance of the wrapped phase gradient in the neighborhood is large, the penalty weight will be correspondingly reduced, thereby allowing the fringe order to jump, and the sharp features of the object are protected.

[0052] In an optional embodiment, the penalty weight satisfies the relationship:

[0053] ; wherein, is the penalty weight, is the average of the phase modulation amplitudes of the two adjacent pixel points, is the local variance of the wrapped phase gradient in the neighborhood of the pixel point , and is an exponential function with the natural constant e as the base. an attenuation factor of the phase modulation amplitude, an attenuation factor of the overall influence of the detail condition on the penalty weight, The value of the attenuation factor of the phase modulation amplitude can be set according to experience. an attenuation factor of the phase modulation amplitude, an attenuation factor of the local variance of the wrapped phase gradient in the neighborhood, and The value of the attenuation factor of the phase modulation amplitude can also be set according to experience. The pixel point The calculation method of the local variance of the wrapped phase gradient in the neighborhood The calculation method of the local variance of the wrapped phase gradient in the neighborhood is a known technology in the art, and will not be described in detail in the present embodiment.

[0054] By combining the penalty weight of the smoothing term calculated by and When the phase modulation amplitude is high or the phase is flat, a strong smoothing constraint is applied, and when the phase modulation amplitude is low or the details are more abundant, the order of the fringe is allowed to change.

[0055] In one embodiment, the energy function is minimized by using an optimization method of a graph cut algorithm.

[0056] Specifically, by minimizing the constructed energy function using an optimization method of a graph cut algorithm, the optimal fringe order of each pixel is obtained to form a preliminary fringe order distribution map.

[0057] Step S3, reconstructing a preliminary three-dimensional point cloud according to the preliminary fringe order distribution map and calculating principal curvatures; in a region where the absolute value of the principal curvature is greater than a preset threshold, updating the discrete probability distribution of the neighborhood pixels using the initial pixel confidence map; re-minimizing the energy function to obtain a corrected fringe order distribution map.

[0058] The preliminary three-dimensional point cloud is reconstructed according to the preliminary fringe order distribution map and the principal curvatures are calculated, including: calculating a preliminary absolute phase for each pixel point according to the preliminary fringe order distribution map and the wrapped phase value corresponding to the highest frequency to obtain a preliminary absolute phase map; the preliminary absolute phase satisfies the relationship: wherein is the preliminary absolute phase, is the wrapped phase value corresponding to the highest frequency, is the preliminary fringe order; using the camera and projector parameters calibrated in advance, the preliminary absolute phase map is converted into a preliminary three-dimensional point cloud through a phase-to-height mapping relationship or a triangulation principle; for each pixel point, the spatial distribution of the three-dimensional neighborhood points is analyzed to calculate the geodesic curvature and solve two principal curvatures, and the principal curvature with the largest absolute value is taken as the curvature measure of the pixel point.

[0059] By using the initial fringe order distribution diagram, the three-dimensional space coordinates corresponding to each pixel are obtained by the basic multi-frequency heterodyne method, etc., and the principal curvatures of each pixel point can be calculated.

[0060] In one embodiment, the region where the maximum value of the absolute value of the principal curvature exceeds the preset threshold value includes:

[0061] Calculate the average value of the maximum value of the absolute value of the principal curvature of all pixel points and the standard deviation , and the preset threshold value is ;

[0062] Mark the pixel points with the maximum value of the absolute value of the principal curvature greater than the preset threshold value as high-curvature pixels; all high-curvature pixels form a high-curvature region.

[0063] Specifically, after obtaining the curvature metric of all pixel points, i.e., the maximum value of the absolute value of the principal curvature, the average value and the standard deviation of the entire curvature map are calculated; according to the statistical results, a dynamic threshold value, i.e., the preset threshold value, is set, and the size is . For example, the average value calculated is 0.03, the standard deviation is 0.01, and the preset threshold value is 0.05. All pixel points with the maximum value of the absolute value of the principal curvature greater than 0.05 are identified and marked as high-curvature pixels, and all high-curvature pixels form a high-curvature region. The most complex region on the surface of the object is identified, and a binary mask map is generated to guide subsequent processing.

[0064] In one embodiment, the initial pixel confidence map is used to update the discrete probability distribution of the neighborhood pixels, including:

[0065] Each high-curvature pixel in the high-curvature region is taken as a target pixel;

[0066] For any target pixel, in a search window of 15x15 pixels, the structural similarity of a 5x5 pixel neighborhood block and other pixel neighborhood blocks in the search window is compared;

[0067] Based on the structural similarity and the initial pixel confidence, a filtering weight is calculated; the filtering weight is used to weight average the discrete probability distribution of all pixel points in the search window to obtain the discrete probability distribution of the new target pixel.

[0068] Specifically, by updating the discrete probability distribution of the neighborhood pixels with the initial pixel confidence map, the idea of non-local means filtering is used to optimize the discrete probability distribution at high curvature pixels, and the information of similar structures far away is borrowed to correct errors. Understandably, for each high curvature pixel marked as a target pixel, a search window of 15x15 size is drawn around the target pixel; a 5x5 neighborhood block centered on the target pixel is extracted, and the neighborhood block is compared with all 5x5 neighborhood blocks centered on other pixels in the search window, where the comparison is the structural similarity. In this embodiment, the mean square error of the wrapped phase values or gray values of all pixels in the two neighborhood blocks is used as the structural similarity, and the smaller the mean square error, the more similar the local surface structures of the two neighborhood blocks. The filtering weight is determined by the structural similarity and the initial pixel confidence, and the product of the structural similarity and the initial pixel confidence is used as the filtering weight. If a pixel is structurally similar to the target pixel and has a high initial pixel confidence, the pixel will have a higher filtering weight. The probability distribution of the new target pixel is obtained by weighted averaging the discrete probability distributions of all pixels in the search window according to the corresponding filtering weights, and then the discrete probability distribution of a high curvature pixel is uncertain due to noise, but a pixel far away with a similar structure and good signal has a clear discrete probability distribution. Therefore, the information of the latter is given a high weight to correct the uncertainty of the former.

[0069] After updating the discrete probability distribution, the data items of the energy function are reconstructed, and the energy function is minimized again to obtain the corrected fringe order distribution map.

[0070] Step S4, calculate the absolute phase based on the corrected fringe order distribution map and reconstruct the final three-dimensional topography; calculate the phase error of the final three-dimensional topography back-projected to the projector plane, and iteratively optimize the projector principal point and radial distortion coefficient in the system calibration parameters until convergence.

[0071] After obtaining the corrected fringe order distribution map, the absolute phase is calculated again for each pixel point using the corrected fringe order distribution map and the wrapped phase value corresponding to the highest frequency to obtain an absolute phase map. The absolute phase map has suppressed noise and accurately recovered the details of the high curvature area. Again, using the pre-calibrated system parameters, i.e., the camera and projector parameters, the absolute phase map is converted into a high-precision final three-dimensional Cartesian coordinate point cloud, i.e., the final three-dimensional topography of the object, through the phase-to-height mapping relationship or the triangulation principle.

[0072] In one embodiment, the iterative optimization of the projector principal point and the radial distortion coefficient in the system calibration parameters includes:

[0073] Construct a target function defined as the sum of the squares of the phase errors of all pixel points;

[0074] The Levenberg-Marquardt algorithm is used, with the principal point coordinates of the projector as the basis. and the first two order radial distortion coefficients Let these be the variables to be optimized; adjust these variables iteratively to make the relative change in the objective function value less than [the value of the variable to be optimized]. Stop when the time comes.

[0075] Specifically, based on the high-precision absolute phase map obtained above, an objective function is constructed, which is defined as the sum of the squares of the phase errors of all pixels, i.e. ;in, The objective function value, This is the actual absolute phase value obtained from decoding; The theoretical absolute phase value is calculated by back-projecting each point in the 3D point cloud onto the pixel plane of the projector based on the current system calibration parameters and using the principal point coordinates of the projector and the lens distortion model.

[0076] The iterative optimization process will use the principal point coordinates of the projector. and the first two coefficients representing the radial distortion of the lens. The Levenberg-Marquardt algorithm, an iterative nonlinear least squares optimization algorithm, is used as the variable to be optimized. In each iteration, the algorithm calculates the objective function value. The gradient of the variable to be optimized, and towards making The value of the variable to be optimized is updated in the direction of decrease. The iterative process continues until the preset convergence condition is met, that is, the relative change in the objective function value is less than 1%. Then it stops; for example, in the first... The calculation obtained after the iteration is In the After the next iteration, If the relative change Less than the preset threshold If the parameters have converged to their optimal values, the optimization process is considered to have terminated, and the obtained result is... This refers to the corrected parameters for the high-precision projector.

[0077] This invention also provides a complex shell inspection system based on structured light scanning. For example... Figure 2 As shown, the system includes a processor and a memory. The memory stores computer program instructions for complex shell detection based on structured light scanning. When the computer program instructions are executed by the processor, they implement the complex shell detection method based on structured light scanning according to the present invention.

[0078] The system also includes other components known to those skilled in the art such as a communication bus and a communication interface, the arrangement and function of which are known in the art and thus will not be described here in detail.

[0079] In this disclosure, a "storage" can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic storage medium or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random-Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), and the like, or any other medium that can be used to store the desired information and that can be accessed by a computer. Any such computer storage media can be part of the device or accessible or connectable thereto. Any application or module described in this disclosure can be implemented by computer-readable / executable instructions stored or otherwise held by such computer-readable media.

[0080] In the description of the present disclosure, the meaning of "a plurality of" is at least two, for example, two, three or more, and the like, unless otherwise explicitly specified.

[0081] Although the present disclosure has shown and described several embodiments of the present application, it is to be understood that the same are presented by way of example only and not limitation. As such, many changes, modifications, and substitutions must become apparent to those skilled in the art without departing from the spirit and scope of the present application.

Claims

1. A method for detecting complex shells based on structured light scanning, characterized in that, include: Multi-frequency sinusoidal fringes are projected onto the surface of a complex shell and deformed fringe patterns are acquired. The wrapping phase value and phase modulation amplitude of each pixel at each frequency are calculated. Based on the multi-frequency wrapping phase difference, a discrete probability distribution containing candidate fringe levels and corresponding probabilities is calculated for each pixel. An initial pixel confidence map is generated based on the Shannon entropy of the discrete probability distribution. Construct an energy function, where the data terms are defined by the discrete probability distribution, and the penalty weight for the smoothing term is determined based on the phase modulation amplitude and the local variance of the wrapping phase gradient; minimize the energy function to obtain a preliminary fringe series distribution map; The preliminary 3D point cloud is reconstructed based on the preliminary stripe series distribution map, and the principal curvature is calculated. In the region where the maximum value of the absolute value of the principal curvature exceeds the preset threshold, the discrete probability distribution of the neighboring pixels is updated using the initial pixel confidence map. By minimizing the energy function again, the corrected stripe series distribution map is obtained. The absolute phase was calculated and the final three-dimensional morphology was reconstructed based on the corrected stripe series distribution map. Calculate the phase error of the final 3D topography back-projected onto the projector plane, and iteratively optimize the projector principal point and radial distortion coefficient in the system calibration parameters until convergence.

2. The method for detecting complex shells based on structured light scanning according to claim 1, characterized in that, The process of projecting multi-frequency sinusoidal fringes onto the surface of a complex shell and acquiring deformed fringe patterns includes: Using a four-step phase-shifting method, three sets of sinusoidal fringes with frequencies of 64, 63, and 56 cycles are projected sequentially. Each set of sinusoidal fringes contains four fringes with phase differences of 64, 63, and 56 cycles. The stripe pattern was generated, and 12 deformed stripe patterns were simultaneously captured by the camera.

3. The method for detecting complex shells based on structured light scanning according to claim 1, characterized in that, The step of calculating a discrete probability distribution for each pixel based on multi-frequency wrapping phase difference, including candidate stripe levels and corresponding probabilities, includes: For pixels Calculate the difference between the package phase values ​​corresponding to the highest and second highest frequencies to obtain the package phase difference; calculate the package phase difference and... The distance between integer multiples of; The probability corresponding to the candidate stripe level is calculated based on the distance, satisfying the following relationship: In the formula, Indicates at pixel point The candidate stripe level is The probability, Indicates distance, Indicates the preset standard deviation. This represents an exponential function with the natural constant e as its base.

4. The method for detecting complex shells based on structured light scanning according to claim 3, characterized in that, The calculation of the package phase difference and The distances between integer multiples of satisfy the following relation: ; In the formula, Indicates distance, Represents pixels The phase difference at the package location, It is the absolute value symbol; Indicates the candidate stripe level, that is The coefficient.

5. The method for detecting complex shells based on structured light scanning according to claim 1, characterized in that, The data term is defined by the discrete probability distribution, and the penalty weight of the smoothing term is determined based on the phase modulation amplitude and the local variance of the wrapped phase gradient, including: The data item is a pixel. Select candidate stripe levels The negative logarithmic probability; The smoothing term refers to adjacent pixels. and The absolute value of the difference between candidate stripe levels; The penalty weight of the smoothing term is proportional to the mean of the phase modulation amplitude of adjacent pixels and inversely proportional to the local variance of the wrapping phase gradient.

6. The method for detecting complex shells based on structured light scanning according to claim 1, characterized in that, The region where the maximum absolute value of the principal curvature exceeds a preset threshold includes: Calculate the average of the maximum absolute values ​​of the principal curvatures of all pixels. with standard deviation The preset threshold is ; Pixels whose maximum absolute value of principal curvature is greater than the preset threshold are marked as high curvature pixels; all high curvature pixels constitute a high curvature region.

7. The method for detecting complex shells based on structured light scanning according to claim 6, characterized in that, The step of updating the discrete probability distribution of neighboring pixels using the initial pixel confidence map includes: Each high-curvature pixel within the high-curvature region is taken as the target pixel; For any target pixel, within a 15×15 pixel search window, compare the structural similarity between the 5×5 pixel neighborhood block and other pixel neighborhood blocks within the search window. The filter weights are calculated based on structural similarity and initial pixel confidence. The discrete probability distributions of all pixels in the search window are then weighted and averaged using the filter weights to obtain the discrete probability distribution of the new target pixel.

8. The method for detecting complex shells based on structured light scanning according to claim 1, characterized in that, The projector principal point and radial distortion coefficients in the calibration parameters of the iterative optimization system include: Construct an objective function, defined as the sum of squares of the phase errors of all pixels; The Levenberg-Marquardt algorithm is used, with the principal point coordinates of the projector as the basis. and the first two order radial distortion coefficients Let these be the variables to be optimized; adjust these variables iteratively to make the relative change in the objective function value less than [the value of the variable to be optimized]. Stop when the time comes.

9. The method for detecting complex shells based on structured light scanning according to claim 1, characterized in that, The minimization of the energy function includes minimizing the energy function using a graph cut algorithm optimization method.

10. A complex shell inspection system based on structured light scanning, characterized in that, include: A processor and a memory, the memory storing computer program instructions for complex shell detection based on structured light scanning, which, when executed by the processor, implement a complex shell detection method based on structured light scanning according to any one of claims 1-9.

Citation Information

Patent Citations

  • Dynamic three-dimensional surface shape measuring method and system

    CN110411374A

  • Rapid phase unwrapping method and device based on edge detection, equipment and medium

    CN113393481A