Rapid measurement system for rectangular workpieces under three-dimensional structured light

Four-directional orthogonal structured light projection is achieved through dual projectors and a reflector group. Combined with Gray code and phase-shift fringe encoding and distortion compensation algorithms, the problems of insufficient surface coverage and projection distortion in the measurement of rectangular workpieces are solved, the efficiency of point cloud data processing is improved, and fast and accurate three-dimensional measurement is achieved.

CN120445091BActive Publication Date: 2025-09-23XIAN HIGH TECH AEH INDAL METROLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510926245.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-09-23
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

Existing structured light measurement systems have problems such as insufficient surface coverage, projection distortion, and low efficiency in point cloud data processing when measuring rectangular workpieces, and cannot meet the needs of fast and accurate measurement.

Method used

A dual projector is used in conjunction with a reflector group to achieve four-directional orthogonal structured light projection. Combined with the combined coding sequence of Gray code and phase-shifted stripes and the distortion compensation algorithm, point cloud data processing is optimized through semantic segmentation and geometric constraints to achieve complete coverage and efficient measurement of rectangular workpieces.

Benefits of technology

It achieves complete coverage of the six surfaces of the rectangular workpiece, eliminates the influence of projection distortion, improves the point cloud data processing efficiency and measurement accuracy, and meets the needs of fast and precise measurement in industrial manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120445091B_ABST
    Figure CN120445091B_ABST
Patent Text Reader

Abstract

The present invention discloses a rapid measurement system for a rectangular workpiece under three-coordinate structured light, which relates to the field of rapid measurement technology. The system comprises: an acquisition module, which is used to project four-directional orthogonal structured light through a dual projector, and cooperate with a high-speed industrial camera and a six-degree-of-freedom robotic arm to acquire a coarse positioning point cloud of the rectangular workpiece; an encoding module, which is used to generate a combined encoding sequence of Gray code and phase-shift stripes, obtain the wrapped phase through phase solution, calculate the heterodyne absolute phase using dual-frequency stripes, perform phase expansion in combination with a confidence weight map, and compensate for projection distortion through a radial basis function network; a point cloud processing module, which marks the point cloud as a plane, edge or corner area through semantic segmentation, imposes a normal vector verticality constraint on the plane area, imposes a straightness constraint on the edge area, and imposes a curvature constraint on the corner area, and determines whether the measurement is qualified by calculating a comprehensive error, thereby ensuring the accuracy and reliability of the measurement result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of rapid measurement technology, and in particular to a rapid measurement system for a cuboid workpiece under three-coordinate structured light. Background Art

[0002] In industrial manufacturing, the dimensional accuracy of rectangular workpieces is a crucial quality indicator. Traditional measurement methods, such as coordinate measuring machines (CMMs), while highly accurate, are slow and unable to meet the rapid inspection demands of modern production lines. Furthermore, CMM measurement of rectangular workpieces requires multiple positioning adjustments, increasing operational complexity and time costs. In recent years, structured light measurement technology has gained widespread application in 3D measurement. This technology uses a projector to project a specific light stripe pattern, and a camera to capture the stripe deformation, thereby calculating the workpiece's 3D profile.

[0003] However, existing structured light measurement systems still face the following challenges in measuring cuboid workpieces:

[0004] 1. Insufficient surface coverage: A rectangular parallelepiped has six mutually perpendicular surfaces. Structured light from a single projection direction cannot cover all surfaces simultaneously, resulting in missing measurements in some areas (especially the sides and bottom), affecting the integrity of the overall data.

[0005] 2. Projection distortion: The optical system of the projector may be distorted. Especially in high-speed measurement scenarios, insufficient distortion compensation will lead to deviations in 3D coordinate calculations and reduce measurement accuracy.

[0006] 3. Low efficiency in point cloud data processing: Existing systems are inefficient in processing large amounts of point cloud data and cannot meet the needs of rapid measurement. In particular, there are bottlenecks in semantic segmentation (such as identifying planes, edges, and corners) and geometric constraint optimization (such as normal vector verticality, straightness, and curvature constraints), making it difficult to achieve efficient data compression and error determination. Summary of the Invention

[0007] (1) Technical problems solved

[0008] In response to the shortcomings of the existing technology, the present invention provides a rapid measurement system for rectangular workpieces under three-coordinate structured light. Four-directional orthogonal structured light projection is achieved through dual projectors in conjunction with a reflector group, ensuring that all six surfaces of the rectangular workpiece are covered, solving the problem of insufficient surface coverage; projection distortion is compensated by a combined coding sequence of Gray code and phase-shifted stripes combined with phase solution, distortion compensation algorithm and radial basis function network, effectively eliminating the influence of projection distortion on measurement accuracy; through semantic segmentation and geometric constraint optimization in the point cloud processing module, efficient processing and compression of point cloud data are achieved, solving the problem of low efficiency of point cloud data processing, thereby fully meeting the needs of fast and accurate measurement of rectangular workpieces in industrial manufacturing.

[0009] (2) Technical solution

[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions: A rapid measurement system for a rectangular workpiece under three-coordinate structured light comprises:

[0011] The acquisition module is used to project orthogonal structured light in four directions to collect the coarse positioning point cloud of the cuboid workpiece;

[0012] The encoding module is used to generate a combined coding sequence of Gray code and phase-shifted stripes, obtain the wrapped phase through phase solution, calculate the heterodyne absolute phase using dual-frequency stripes, perform phase unwrapping in combination with the confidence weight map, convert the absolute phase into three-dimensional coordinates based on geometric parameters, and compensate for projection distortion through a radial basis function network;

[0013] The point cloud processing module marks the point cloud into planes, edges or corner areas through semantic segmentation, imposes normal vector verticality constraints on plane areas, straightness constraints on edge areas, and curvature constraints on corner areas, and determines whether the measurement is qualified by calculating the comprehensive error.

[0014] Furthermore, the acquisition module includes: dual projectors for orthogonally projecting structured light in four directions to cover the six surfaces of the cuboid workpiece;

[0015] High-speed industrial camera, used to synchronously capture images after structured light projection;

[0016] A six-degree-of-freedom robotic arm is used to drive a high-speed industrial camera to scan the workpiece's initial posture and coordinate with a rotary table to achieve six-degree-of-freedom spatial adjustment of the workpiece.

[0017] The reflector group is used to reflect the light from the dual projectors to four orthogonal directions of 0°, 90°, 180°, and 270°, ensuring that the structured light stripes completely cover the six surfaces of the workpiece.

[0018] Furthermore, when the encoding module generates a combined encoding sequence of Gray code and phase shift stripes, it specifically includes: usingn Gray code generation The Gray code is optimized by De Bruijn sequence to minimize the adjacent jump; the wavelength is l Phase-shifted fringes are generated m The phase-shifted stripes with uniformly distributed amplitude and phase differences cover the entire phase period, and the Gray code is combined with the phase-shifted stripes to form a coding sequence.

[0019] Furthermore, the encoding module performs phase resolution in the following manner: converting the determined Gray code value into a binary index, combining the binary indices of all bits to obtain a coarse stripe index of each pixel in the image, converting the binary index into a decimal index to obtain an absolute period number of the pixel;

[0020] The wrapped phase is calculated using the inverse tangent formula in the range [-π, π];

[0021] The heterodyne absolute phase is calculated by combining dual-frequency stripes with a frequency ratio of 3:1. When the absolute value of the heterodyne absolute phase is greater than π, the phase jump point is marked and local re-solution is triggered.

[0022] Furthermore, the encoding module generates a confidence weight map, including: generating a confidence weight map based on the phase modulation degree and the phase derivative:

[0023] ,in, Confidence is the confidence weight, Modulation is the phase modulation index, is the gradient of the wrapped phase, and ω is the gradient weight.

[0024] Furthermore, when the encoding module performs phase unwrapping, the steps specifically include: combining the absolute period number and the wrapped phase to unwrap the wrapped phase into a continuous absolute phase;

[0025] The image is divided into several sub-image blocks, and the GPU is used for parallel processing. Each thread block independently processes the phase unwrapping within the sub-image block.

[0026] Prioritize high-confidence pixels, detect outliers where the difference between the absolute phase and the wrapped phase is greater than π, and initiate local re-solution.

[0027] Furthermore, the encoding module compensates for the projection distortion through a radial basis function network: using multiple quadratic functions as radial basis functions: , where g(r) is the radial basis function, r is the Euclidean distance, c is the shape parameter, and the cross-validation method is used to optimize c value;

[0028] Construct a linear equation system to solve the weight matrix, calculate the distortion compensation amount for each pixel and compensate.

[0029] Furthermore, when the point cloud processing module annotates the point cloud area through semantic segmentation, it specifically includes: inputting the coarse positioning point cloud into the pre-trained PointNet++ network, and outputting the semantic label of each point cloud and the corresponding confidence weight, where the semantic label includes plane, edge and corner;

[0030] The point cloud is compressed according to the octree structure, the center point of the leaf node is retained, and high-density grids are used for edges and corners, and low-density grids are used for plane areas.

[0031] Furthermore, when the point cloud processing module applies geometric constraints, it specifically includes: applying normal vector verticality constraints to the plane area, applying straightness constraints to the edge area, and applying curvature constraints to the corner area. After completing the constraints, the registration error is calculated: , among which, among which, is the registration error, Number the point cloud. is the number of point clouds, is the confidence weight corresponding to the point cloud semantic label, is the coordinate of the target point cloud (after correction), are the coordinates of the source point cloud.

[0032] Furthermore, when the point cloud processing module determines whether the measurement is qualified, it specifically includes:

[0033] Canny edge detection is used on the point cloud to obtain the edge point set, and Hough transform is performed to extract candidate straight line segments. Straight line segments with length greater than 10 mm and curvature less than 0.01 are selected as edges. For each detected edge, the angle between it and the normal vector of the two adjacent planes is calculated. and , through the angle and Calculate vertical error;

[0034] The RANSAC algorithm is used to segment the point cloud into six planes; the least squares fitting error of each plane is calculated; the comprehensive error is calculated by weighted average through the registration error, vertical error and least squares fitting error. If the comprehensive error is less than the error threshold, the measurement is judged to be qualified; otherwise, the measurement is judged to be unqualified.

[0035] (3) Beneficial effects

[0036] The present invention provides a rapid measurement system for rectangular workpieces under three-coordinate structured light, which has the following beneficial effects:

[0037] (1) By projecting four-directional orthogonal structured light with dual projectors, combined with a high-speed industrial camera and a six-degree-of-freedom robotic arm, the six surfaces of the rectangular workpiece are fully covered and efficiently collected, effectively solving the problem of insufficient surface coverage in traditional methods and providing reliable basic data for subsequent precise measurement.

[0038] (2) By generating a combined coding sequence of Gray code and phase-shifted stripes, combined with phase solution, distortion compensation algorithm and radial basis function network, the influence of projection distortion on measurement accuracy is effectively eliminated, the accuracy and efficiency of phase unwrapping are improved, and the accuracy of three-dimensional coordinate transformation is ensured.

[0039] (3) The point cloud is annotated into different areas through semantic segmentation, and geometric constraints are imposed for optimization, thus achieving efficient processing and compression of point cloud data. This module improves the efficiency and accuracy of data processing, and determines whether the measurement is qualified by calculating the comprehensive error, thus ensuring the accuracy and reliability of the measurement results. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 Schematic diagram of the structure of the rapid measurement system for rectangular workpieces under three-coordinate structured light of the present invention. DETAILED DESCRIPTION

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0042] See also Figure 1 The present invention provides a rapid measurement system for a rectangular workpiece under three-coordinate structured light, comprising: an acquisition module, an encoding module, and a point cloud processing module, wherein:

[0043] The acquisition module is used to project four-directional orthogonal structured light through dual projectors, and cooperate with high-speed industrial cameras and six-degree-of-freedom robotic arms to collect coarse positioning point clouds of rectangular workpieces;

[0044] Specifically, a six-degree-of-freedom robotic arm drives a high-speed industrial camera to scan the initial pose of a rectangular workpiece, and a dual projector projects structured light to obtain a coarse positioning point cloud of the rectangular workpiece.

[0045] Use dual projectors (such as Texas Instruments DLP4710) with reflectors for four-directional structured light projection. The reflector group realizes structured light projection in four orthogonal directions of 0°, 90°, 180°, and 270°. Each projector is responsible for projection coverage in two adjacent directions, ensuring that the structured light stripes fully cover the six surfaces of the rectangular workpiece: top, bottom, front, back, left, and right;

[0046] The system integrates a high-speed industrial camera (such as the Basler acA2040-90um) with a six-degree-of-freedom robotic arm (such as the UR5e) and a rotation stage. The rotation stage provides ±0.02mm repeatability and a single measurement range of up to 1m×1m×1m. It works with the robotic arm to achieve six-degree-of-freedom adjustment of the workpiece space. The robotic arm's end effector is equipped with a workpiece fixture, supporting automatic rotation and precise positioning.

[0047] A laser tracker is used for geometric calibration to ensure that the intersection of the four-directional projection optical axes overlaps less than 0.1mm. The structured light coverage is verified by projecting a checkerboard calibration plate. Each surface is covered by at least two projection directions, and the overlap of adjacent projection areas is greater than 30%. This achieves 100% structured light coverage on the six surfaces of the cuboid workpiece, and a single-sided measurement point cloud density of >50 points / mm. 2 ;

[0048] It adopts a dark box structure, built-in LED surface light source (color temperature 5500K), and cooperates with polarizer to eliminate reflection interference. It uses green light structured light with a wavelength of 532nm and cooperates with narrow band filter (bandwidth ±5nm) to reduce ambient light interference to less than 0.1%.

[0049] The hardware trigger synchronization of the dual projectors, high-speed industrial camera and six-degree-of-freedom robotic arm is achieved through FPGA, and the synchronization signal is transmitted through the LVDS interface to ensure that the four-directional structured light projection and the camera exposure timing are accurately matched within each projection cycle. The camera is set to a short exposure time (<1ms).

[0050] By projecting four-directional orthogonal structured light through dual projectors, combined with a high-speed industrial camera and a six-degree-of-freedom robotic arm, complete coverage and efficient acquisition of the six surfaces of the rectangular workpiece are achieved, effectively solving the problem of insufficient surface coverage in traditional methods and providing reliable basic data for subsequent precise measurement.

[0051] The encoding module is used to generate a combined coding sequence of Gray code and phase-shifted stripes, obtain the wrapped phase through phase solution, calculate the heterodyne absolute phase using dual-frequency stripes, perform phase unwrapping in combination with the confidence weight map, convert the absolute phase into three-dimensional coordinates based on geometric parameters, and compensate for projection distortion through a radial basis function network;

[0052] Specifically, use n Gray code (e.g. n=8) Generate stripe cycles, generating all possible n A binary number ranging from 0 to , using the formula Convert each binary number into its corresponding Gray code, ensuring that adjacent Gray codes differ by only one bit, where Gray represents the generated Gray code value, Binary Represents the index of a binary number, ⊕ represents the bitwise exclusive OR operator, and ≫ represents the right shift operator;

[0053] The de Bruijn sequence is introduced to optimize Gray code encoding. The Gray code is adjusted to minimize adjacent jumps. An independent stripe pattern is created for each Gray code bit. The pattern width matches the projector resolution. In the image, the coordinates of each pixel correspond to a Gray code value. Through threshold processing, the Gray code value is converted to the brightness of the stripe pattern (0 or 1 corresponds to dark or light), forming clear light and dark stripes.

[0054] It should be noted that Gray code is a special binary encoding method. Its core feature is adjacency. That is, between any two adjacent Gray codes, only one binary digit is different. This feature enables Gray code to minimize ambiguity during state transitions when representing numerical changes and improve anti-interference capabilities.

[0055] De Bruijn sequence, also known as complete cyclic sequence, is a special cyclic sequence. s De Bruijn sequence consisting of elements B(s,n) , its core feature is that it contains all possible lengths n Each subsequence appears only once in the sequence. For example, the binary sequence 00010111 is a typical De Bruijn sequence. B (2, 3), which contains all subsequences of length 3 consisting of 0s and 1s: 000, 001, 010, 011, 100, 101, 110, 111, and each subsequence appears uniquely;

[0056] Adjacent transition refers to the number of binary bits that change between two adjacent codes in Gray code. The size of the adjacent transition directly reflects the robustness of Gray code. The smaller the adjacent transition, the smaller the difference between adjacent codes. The more robust the code is, and the less susceptible it is to interference and bit errors. Conversely, if the adjacent transition is large, the difference between adjacent codes is large, then the code is more susceptible to interference and the possibility of bit errors increases.

[0057] The wavelength used is l Phase-shifted fringes are generated m width (e.g. m=4) Sinusoidal fringe images with different phases, with phase differences evenly distributed (e.g., 0, π / 2, π, 3π / 2) to cover the complete phase cycle, use the formula Calculate the brightness value of each pixel, where I Indicates the brightness value, A represents the background brightness, B represents the modulation amplitude, f represents the wrapping phase, represents the phase shift, ,in, L represents the number of phase shift steps, l An index representing the number of phase shift steps; combining the Gray code fringe image and the phase shift fringe image into a complete coding sequence in a preset order (e.g., Gray code first, phase shift fringe second);

[0058] It should be noted that the appropriate phase shift fringe wavelength is selected according to the Gray code fringe width and measurement accuracy requirements. l, Theoretically, the wavelength l It should be smaller than the Gray code stripe width to ensure that the phase shift method can provide sufficient phase information within each Gray code stripe, thereby improving the measurement accuracy. For example, if the Gray code stripe width is 1 / 8 of the image width, the phase shift stripe wavelength l It can be set to 1 / 2 to 1 / 4 of the Gray code stripe width to ensure that multiple phase-shifted stripe cycles are included in each Gray code stripe;

[0059] Use a high-speed industrial camera to capture the projected Gray code stripe pattern. For each pixel in the Gray code stripe pattern, determine the corresponding Gray code value according to its coordinates. Use the formula Convert the determined Gray code value into a binary index, combine the binary indices of all bits, and get the coarse stripe index of each pixel in the image. The coarse stripe index represents the Gray code stripe period to which each pixel belongs. Convert the binary index into a decimal index to get the absolute period number of the pixel. k ;

[0060] Decode the captured phase shift pattern using the inverse tangent formula Compute the wrapping phase, where represents the wrapping phase, 、 、 、 is the grayscale value of the phase shift pattern, and the wrapped phase range is [- π , π ], combine the absolute period number obtained by decoding the de Bruijn sequence with the wrapped phase, and expand the wrapped phase into a continuous absolute phase: , that is, phase unwrapping;

[0061] Select a dual-frequency fringe combination with a frequency ratio of 3:1 (e.g., 72 cycles for high frequency and 24 cycles for low frequency), calculate the wrapped phase for high-frequency and low-frequency fringes separately, and calculate the heterodyne absolute phase from the phase difference: ,in, represents the heterodyne absolute phase, represents the high-frequency wrapping phase, Represents the low-frequency wrapped phase. When the absolute value of the heterodyne absolute phase is greater than π, it is marked as a phase jump point, triggering local re-solution, that is, recalculating the part;

[0062] Generate a confidence weight map based on the phase modulation and phase derivative:

[0063] , where Confidence represents the confidence weight, Modulation represents the phase modulation degree, Represents the gradient of the wrapped phase, ω represents the gradient weight (default 0.5), where the phase modulation calculation formula is: ,in, Indicates the l Grayscale value of the phase-shifted image, Indicates the phase shift amount;

[0064] The image is divided into several sub-image blocks, and the GPU's CUDA core is used for parallel processing. Each thread block independently processes the phase unwrapping within the sub-image block, giving priority to high-confidence pixels; the difference between the absolute phase and the wrapped phase is calculated: , Residual Represents the difference between the absolute phase and the wrapped phase. If the difference between the absolute phase and the wrapped phase is greater than π, it is determined to be an abnormal point and local re-solution is started;

[0065] Using the geometric parameters of the camera and projector, the absolute phase is converted into 3D coordinates on the object surface , where the horizontal axis x : ,in, is the absolute phase value in the horizontal direction, is the initial phase offset. Similarly, the vertical coordinate and depth z are calculated: , where B is the baseline distance between the projector and the camera, is the camera focal length, is the horizontal coordinate in the projector coordinate system, is the horizontal coordinate in the camera coordinate system, i is the angle between the projector and the camera;

[0066] In a darkroom environment, a high-precision checkerboard calibration plate (e.g., 10×10 squares, single grid size 10mm×10mm) is fixed on a rotating stage. The angle between the calibration plate plane and the projector optical axis is adjusted to 0°, ±15°, and ±30°, a total of five angles. A six-degree-of-freedom robotic arm controls the dual projectors to project sinusoidal fringe patterns. A high-speed industrial camera is used to synchronously capture the calibration plate image. At each angle, no less than 100 frames of fringe images with different phase offsets are collected. Phase calculation is performed on the collected images to obtain a data set of deviations between the theoretical phase coordinates of each calibration point and the actual image coordinates. ,in, i is the number of the calibration point, , N is the number of calibration points, is the theoretical phase coordinate of each calibration point, 、 are the distortion offsets of the image coordinates in the horizontal and vertical directions respectively;

[0067] Choose a polyquadratic function as the radial basis function: , where g(r) is the radial basis function, r is the Euclidean distance, c is the shape parameter, and the cross-validation method is used to optimize c Value: The bias dataset is randomly divided into a training set (80%) and a validation set (20%). c Iterate in the range of ∈[0.1, 10] with a step size of 0.1 and calculate the root mean square error RMSE of the validation set;

[0068] Select the one that minimizes RMSE c The value is taken as the optimal parameter, and the typical value range is [1.5, 3.0] (adjusted according to the projector resolution). A grid point set covering the full resolution of the projector (such as 1920×1080) is established. , , M is the number of grid points, for each grid point , calculate its distance to all calibration points , construct the linear equation system: ,in, W represents the weight matrix to be determined (M×N), is an N×M basis function matrix, are the elements in the basis function matrix, , Δ represents the distortion offset matrix, or , the weight matrix is ​​solved using the regularized least squares method;

[0069] For each pixel of the input image , calculate its distance to all calibration points , construct the real-time basis function vector , calculate the distortion compensation amount: , ,in, 、 are the weight matrices in the horizontal and vertical directions, for each pixel Make compensation ;

[0070] By generating a combined coding sequence of Gray code and phase-shifted stripes, combined with phase solution, distortion compensation algorithm and radial basis function network, the influence of projection distortion on measurement accuracy is effectively eliminated, the accuracy and efficiency of phase unwrapping are improved, thereby ensuring the accuracy of three-dimensional coordinate transformation and providing key technical support for fast and precise measurement.

[0071] The point cloud processing module marks the point cloud into planes, edges or corner areas through semantic segmentation, imposes normal vector verticality constraints on plane areas, straightness constraints on edge areas, and curvature constraints on corner areas, and determines whether the measurement is qualified by calculating the comprehensive error.

[0072] Specifically, the obtained coarse positioning point cloud (including the structured light point cloud of six surfaces) is input into the pre-trained PointNet++ network. The PointNet++ network outputs the semantic label of each point cloud (plane, edge, corner) and the corresponding confidence weight (such as 0.7 for plane, 0.2 for edge, and 0.1 for corner).

[0073] For point cloud areas that are semantically labeled as planes, a normal vector perpendicularity constraint is imposed (i.e., the angle between the normal vector and the normal vector of the cuboid surface is less than 5°). For "edge" areas, a straightness constraint is introduced, and the least squares straight line fitting error between adjacent points is calculated. If the error exceeds the straightness threshold (e.g., 0.05mm), a local correction is performed (i.e., the error does not exceed the straightness threshold). For "corner" areas, a curvature constraint is used to calculate the Gaussian curvature of the point cloud. If the Gaussian curvature exceeds the curvature threshold, a local correction is performed. After the correction is completed, the registration error is calculated: ,in, is the registration error, Number the point cloud. is the number of point clouds, is the confidence weight corresponding to the point cloud semantic label, is the coordinate of the target point cloud (after correction), is the coordinate of the source point cloud;

[0074] The original point cloud (about 10 6 Points) are divided into octree structures, the center point of each leaf node is retained, and the initial compression is to 10 5For areas with semantic labels of edges and corners, a high-density grid is used (retaining 100% of the original point cloud density); for areas with semantic labels of "planes", a low-density grid is used (retaining 50% of the original point cloud density).

[0075] Canny edge detection (threshold [0.1, 0.5]) is used to obtain the edge point set on the compressed point cloud. Hough transform is performed to extract candidate straight line segments. Straight line segments with length > 10 mm and curvature < 0.01 are selected as edges. For each detected edge, the angle between it and the normal vector of the two adjacent planes is calculated. and , through the angle and Calculate the vertical error: ; is the vertical error;

[0076] Use RANSAC algorithm to segment point cloud:

[0077] Randomly sample 3 points to fit the initial plane equation ,in, 、 、 is the plane normal vector, is the offset;

[0078] Calculate the distance from all points to the plane, mark the points whose distance is less than the distance threshold as inliers, and the rest as outliers. Count the current number of inliers. If the current number of inliers is greater than the previous number, retain the current plane; otherwise, do not retain it.

[0079] Repeat the above process until the plane with the largest number of inliers is found, and remove all inliers in the current plane;

[0080] The remaining point clouds are used as output and the above process is repeated until six planes (upper, lower, front, back, left, and right) are extracted.

[0081] For all planes, calculate the least squares plane fitting error of their point clouds: , is the least squares plane fitting error;

[0082] The weighted average is used to calculate the comprehensive error: ,in, is the least squares plane fitting error, α, β, γ are weight coefficients, , , , if the comprehensive error is less than the error threshold, the measurement is judged to be qualified, otherwise, the measurement is judged to be unqualified;

[0083] By using semantic segmentation to mark point clouds into different areas and applying geometric constraints for optimization, efficient processing and compression of point cloud data are achieved. This module improves the efficiency and accuracy of data processing, determines whether the measurement is qualified by calculating the comprehensive error, and ensures the accuracy and reliability of the measurement results.

[0084] In the application, the several formulas involved are all calculated by taking their numerical values ​​after removing the dimensions, and the formula is a formula obtained by collecting a large amount of data and performing software simulation to obtain the latest real situation. The coefficients in the formula are set by technical personnel in this field according to actual conditions.

[0085] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art will appreciate that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution.

[0086] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, and may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment as needed.

[0087] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.

Claims

1. Rapid measurement system for rectangular workpieces under three-dimensional structured light, characterized by: include: The acquisition module is used to project orthogonal structured light in four directions to collect the coarse positioning point cloud of the cuboid workpiece; The encoding module is used to generate a combined coding sequence of Gray code and phase-shifted stripes, obtain the wrapped phase through phase solution, calculate the heterodyne absolute phase using dual-frequency stripes, perform phase unwrapping in combination with the confidence weight map, convert the absolute phase into three-dimensional coordinates based on geometric parameters, and compensate for projection distortion through a radial basis function network; When the encoding module generates a combined encoding sequence of Gray code and phase-shifted stripes, it specifically includes: use n Gray code generation The Gray code is optimized by De Bruijn sequence to minimize the adjacent jump; the wavelength is λ Phase-shifted fringes are generated m Phase-shifted fringes with uniformly distributed amplitude and phase differences cover the entire phase period, and the Gray code is combined with the phase-shifted fringes to form a coding sequence; The encoding module performs phase resolution in the following manner: Convert the determined Gray code value into a binary index, combine the binary indices of all bits to obtain the coarse stripe index of each pixel in the image, convert the binary index into a decimal index to obtain the absolute period number of the pixel; The wrapped phase is calculated using the inverse tangent formula in the range [-π, π]; The heterodyne absolute phase is calculated by combining dual-frequency stripes with a frequency ratio of 3:

1. When the absolute value of the heterodyne absolute phase is greater than π, the phase jump point is marked and a local re-calculation is triggered. The encoding module generates a confidence weight map, including: Generate a confidence weight map based on the phase modulation and phase derivative: ,in, Confidence is the confidence weight, Modulation is the phase modulation index, is the gradient of the wrapped phase, ω is the gradient weight; The point cloud processing module marks the point cloud into planes, edges or corner areas through semantic segmentation, imposes normal vector verticality constraints on plane areas, straightness constraints on edge areas, and curvature constraints on corner areas, and determines whether the measurement is qualified by calculating the comprehensive error.

2. The rapid measurement system for rectangular workpieces under three-coordinate structured light according to claim 1, characterized in that: The acquisition module includes: Dual projectors are used to orthogonally project structured light in four directions, covering the six surfaces of the cuboid workpiece; High-speed industrial camera, used to synchronously capture images after structured light projection; A six-degree-of-freedom robotic arm is used to drive a high-speed industrial camera to scan the workpiece's initial posture and coordinate with a rotary table to achieve six-degree-of-freedom spatial adjustment of the workpiece. The reflector group is used to reflect the light from the dual projectors to four orthogonal directions of 0°, 90°, 180°, and 270°, ensuring that the structured light stripes completely cover the six surfaces of the workpiece.

3. The rapid measurement system for rectangular workpieces under three-coordinate structured light according to claim 1, characterized in that: When the encoding module performs phase unwrapping, it specifically includes: Combining the absolute period number with the wrapped phase, the wrapped phase is expanded into a continuous absolute phase; The image is divided into several sub-image blocks, and the GPU is used for parallel processing. Each thread block independently processes the phase unwrapping within the sub-image block. Prioritize high-confidence pixels, detect outliers where the difference between the absolute phase and the wrapped phase is greater than π, and initiate local re-solution.

4. The rapid measurement system for rectangular workpieces under three-coordinate structured light according to claim 3, characterized in that: The encoding module compensates for projection distortion through a radial basis function network: Use polyquadratic functions as radial basis functions: , where g(r) is the radial basis function, r is the Euclidean distance, c is the shape parameter, and the cross-validation method is used to optimize c value; Construct a linear equation system to solve the weight matrix, calculate the distortion compensation amount for each pixel and compensate.

5. The rapid measurement system for rectangular workpieces under three-coordinate structured light according to claim 1, characterized in that: When the point cloud processing module labels the point cloud area through semantic segmentation, it specifically includes: Input the coarse positioning point cloud to the pre-trained PointNet++ network, and output the semantic label and corresponding confidence weight of each point cloud. The semantic labels include planes, edges and corners. The point cloud is compressed according to the octree structure, the center point of the leaf node is retained, and high-density grids are used for edges and corners, and low-density grids are used for plane areas.

6. The rapid measurement system for rectangular workpieces under three-coordinate structured light according to claim 5, characterized in that: When the point cloud processing module applies geometric constraints, it specifically includes: Apply normal vector perpendicularity constraints to the plane area, straightness constraints to the edge area, and curvature constraints to the corner area. After completing the constraints, calculate the registration error: ,in, is the registration error, is the point cloud number, is the number of point clouds, is the confidence weight corresponding to the point cloud semantic label, is the coordinate of the target point cloud, are the coordinates of the source point cloud.

7. The rapid measurement system for rectangular workpieces under three-coordinate structured light according to claim 1, characterized in that: When the point cloud processing module determines whether the measurement is qualified, it specifically includes: Canny edge detection is used on the point cloud to obtain the edge point set, and Hough transform is performed to extract candidate straight line segments. Straight line segments with length greater than 10 mm and curvature less than 0.01 are selected as edges. For each detected edge, the angle between it and the normal vector of the two adjacent planes is calculated. and , through the angle and Calculate vertical error; The RANSAC algorithm is used to segment the point cloud into six planes; the least squares fitting error of each plane is calculated; the comprehensive error is calculated by weighted average through the registration error, vertical error and least squares fitting error. If the comprehensive error is less than the error threshold, the measurement is judged to be qualified; otherwise, the measurement is judged to be unqualified.

Citation Information

Patent Citations

  • Double-frequency heterodyne and phase shift coding combined 3D measurement method

    CN108955571A

  • Color structured light three-dimensional measuring method, apparatus and device, and storage medium

    CN109186476A