A method for 3D reconstruction and automatic defect recognition of main bolt hole threads of pressure vessels
The three-dimensional point cloud data of threads is obtained and processed through the linear structure light scanner, and the rapid and accurate inspection of the threads of the main bolt holes of the pressure vessels of nuclear power plant equipment is solved, and the misjudgment and misjudgment problems in the existing technology are solved, and the inspection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202111340763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-11-12
AI Technical Summary
In the prior art, in the inspection of the main bolt hole thread of the pressure vessel of nuclear power plant equipment, relying on manual observation of video or images can easily lead to misjudgment or misjudgment, and operators need long-term training and experience.
Line structure light scanner is used to obtain the two-dimensional coordinates of the thread surface, calculate the three-dimensional coordinates through the system calibration parameters, filter the three-dimensional point cloud data and surface reconstruction to achieve automatic identification and measurement of defects.
It realizes fast and accurate three-dimensional inspection of threads, identify defects and calculate defect sizes, improves inspection efficiency and accuracy, and reduces the possibility of manual misjudgment.
Smart Images

Figure CN114202470B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to nuclear power plant equipment maintenance technology, and in particular relates to a method for identifying defects in main bolt holes of pressure vessels. Background Art
[0002] The nuclear reactor pressure vessel is one of the most important components of a nuclear power plant, and its quality is the key to ensuring the normal and safe operation of the nuclear power system. When the main bolt is screwed back into the screw hole, it must be ensured that the thread surface is very clean and free of burrs and foreign matter. Therefore, the thread surface in the main bolt hole must be inspected before installation to confirm whether it meets the installation standards.
[0003] At present, video inspection devices are usually used to image bolt holes, and then people manually observe the video or image of the thread surface to judge whether the thread is clean, whether there are defects, and the shape and size of the defects. In addition, operators need to undergo rigorous training and long-term on-site operation experience to make relatively accurate judgments. Operators who observe threads for a long time can easily cause visual fatigue, resulting in misjudgment or missed judgments. Summary of the invention
[0004] The purpose of the present invention is to provide a method for three-dimensional reconstruction and automatic defect identification of main bolt hole threads of pressure vessels, which can quickly and accurately inspect the threads from a three-dimensional scale, identify defects and calculate the defect size, and output the inspection results.
[0005] The technical solution of the present invention is as follows:
[0006] A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel comprises the following steps:
[0007] Step 1) scanning and obtaining the two-dimensional coordinates of the thread surface;
[0008] Step 2) The two-dimensional coordinate information of the thread surface, the angle data of the scanning device and the axial position data are synthesized into three-dimensional coordinate data, i.e., three-dimensional point cloud data;
[0009] Step 3) Preprocessing the 3D point cloud data, determining the normal vector of the 3D point cloud data, and dividing the 3D point cloud data into smooth areas and sharp areas, and performing filtering and denoising respectively;
[0010] Step 4) simplifying the three-dimensional point cloud data and retaining data greater than a threshold;
[0011] Step 5) reconstructing the three-dimensional surface of the measured object and generating a mesh model;
[0012] Step 6) Defect identification and measurement, characterize the defect characteristics with parameters and output the defect type.
[0013] The step 1) is specifically as follows:
[0014] First, two coordinate systems are established: one is the oxz coordinate system with the scanning device's own reference point as the origin, and the measured two-dimensional data of the thread surface are the point coordinates in the oxz coordinate system, represented by (x, z); the other is the screw hole O2XYZ coordinate system, where O2 represents the center of the plane at the bottom of the screw hole, Z is the upward direction of the screw hole axis, X is the clockwise tangent direction of the center of the screw hole where the pressure vessel is located, and Y is the direction pointing to the center of the pressure vessel. The coordinate axis direction is defined in accordance with the right-hand rule; H represents the height of the scanning device relative to the bottom of the screw hole, and θ represents the projection angle of the scanning device on the OXY plane in the current coordinate system;
[0015] After the screw holes to be tested are labeled and the scanning device is positioned and installed, the scanning head descends to the starting section of the thread, rotates one circle, and synchronously collects two-dimensional data. The scanning head rises to the top, and the mobile scanning device continues to scan all the screw holes to obtain the two-dimensional coordinate information of all the screw holes.
[0016] The scanning device is a line structured light scanner, which is installed on the vehicle body for positioning. The vehicle body is moved along the positions of different screw holes on the flange surface of the pressure vessel to scan each screw hole. When the position of a screw hole with a certain number is reached, the vehicle body is first positioned to ensure that the position of the vehicle body is fixed relative to the pressure vessel during scanning.
[0017] Before the scanning head rises to the top, it is necessary to determine whether the scanning head has reached the bottom of the screw hole. If it has not reached the top, the scanning head will be lowered and then rotated again to synchronously collect two-dimensional data until it reaches the bottom.
[0018] The step 2) is specifically as follows:
[0019] The two-dimensional data of the thread surface is represented by (x, z) in the oxz coordinate system. The distance between the reference point of the scanning device and the center of the screw hole is a constant, expressed as D. The three-dimensional point cloud data can be obtained, that is, the coordinates of (x, z) in the O2XYZ coordinate system, expressed as:
[0020] X=(z+D)*cosθ
[0021] Y=(z+D)*sinθ
[0022] Z=H+x
[0023] The step 3) is specifically as follows:
[0024] Step 3.1) Construct a k-neighborhood for the acquired point cloud data and calculate the point cloud normal vector
[0025] Use the PCA method to estimate the point cloud normal vector and obtain a set of k sampling points closest to the sampling point pi in the point cloud data;
[0026] Step 3.2) Calculate the normal distance from the sampling point to the local tangent plane in its k-neighborhood, classify the sampling points according to the distance threshold, and divide the 3D point cloud data into smooth areas and sharp areas. The normal distance from the sampling point to the local tangent plane in the area is less than or equal to the threshold and is defined as a smooth area, and the normal distance greater than the threshold is defined as a sharp area;
[0027] Step 3.3) Filter and denoise the smooth area and sharp area respectively.
[0028] Bilateral filtering algorithm is used to filter and denoise the sharp areas
[0029] The specific formula is as follows:
[0030]
[0031] Among them, p i is the point currently to be processed in the point cloud set, and pj is p i Points in the neighborhood, n i 、n j They are p i 、p j The normal vector of the , α is the bilateral filter factor; W c is the Gaussian kernel function in the spatial domain, W s is the Gaussian kernel function in the frequency domain;
[0032] The filtered point cloud data is expressed as:
[0033] p′ i =p i +α·n
[0034] n is the normal vector of the tangent plane at the sampling point, p′ i Represents the position of the point cloud after filtering.
[0035] For smooth areas, a weighted local optimal projection algorithm is used to filter and denoise.
[0036] Specifically:
[0037] The local information is used to locally enhance the point cloud data. A more evenly distributed point set is generated by introducing a density weight function to improve the uniformity of the point cloud distribution and the surface smoothness. The iterative formula is:
[0038]
[0039]
[0040]
[0041] Among them, u is a constant, p represents the original point cloud position, p′ represents the new position after iteration, k is the number of adjacent vertices, and p j Represents the current sampling point of the original point cloud, p′ j Represents the output value after iterative operation of the sampling point; a j and β i are the relevant weight coefficients, σ is the standard deviation of the current point in the neighborhood of the point cloud, and e represents a natural constant.
[0042] The step 4) is specifically as follows:
[0043] First, the curvature F(x0, y0, z0, C) of the point cloud data after filtering and denoising in step 3 is estimated by the following formula using the spherical linear equation method based on the least squares method:
[0044]
[0045] Among them, P i (x i ,y i ,z i )(i=1,2,...,N) is a point x on the sphere i ,y i 、z i In the O2XYZ coordinate system), O(x0, y0, z0) is the coordinate of the center of the ball, R is the radius of the ball, C is the constant to be solved, N is the number of points on the fitting sphere, and the adjacent point clouds are concentrated in P i (x i ,y i , z i ) is substituted into the above formula to obtain a series of equations, and C can be calculated by the least squares method;
[0046] Then, a local coordinate system is established, the origin is translated to obtain its spatial coordinates in the newly created local coordinate system, and finally the unknown parameters are solved to calculate the curvature;
[0047] Finally, the curvature value is compared with the set threshold value. If it is greater than the threshold, it will be retained, and if it is less than the threshold, it will be discarded.
[0048] The step 5) is specifically as follows:
[0049] Step 5.1) Estimation of normal vector and weighted correction
[0050]
[0051] Among them, n is the normal vector of the tangent plane of the sampling point, d represents the distance from the point to the fitting plane, k is the number of neighborhood points, and p is the distance from the point to the fitting plane. iis the current sampling point, w(p i ) is the weighted value, and the expression is:
[0052]
[0053] For p i The k-neighborhood centroid of ;
[0054] Step 5.2) Perform point cloud segmentation and return the block set
[0055] For the point cloud data set P that is expected to be divided into K regions, first randomly select K points from the point cloud data as the initial centers of the K segmentation regions, calculate the Euclidean distance from each point in the point cloud to the K initial segmentation centers, and divide it into the segmentation region represented by the nearest initial segmentation center, then adjust the center of each segmentation region, iterate the above calculation process until all region centers no longer change, then stop the iteration, the segmentation process ends, and output the region segmentation result;
[0056] Step 5.3) Block sparse and resampling
[0057] According to the block area after segmentation, the curvature of each point in the area is calculated respectively, and the average value of the curvature in the area is calculated. If the curvature of the sampling point is less than the average value, the point is discarded, otherwise the sampling of the original point is retained;
[0058] Step 5.4) Calculate the node function to achieve smooth optimization
[0059] The basis function of the node function F0 is expressed as:
[0060]
[0061] Where, σ is the Gaussian filter standard deviation;
[0062] Step 5.5) Calculate the maximum octree depth of the block
[0063] Given the maximum depth of the global octree is D max , the minimum depth is D min , then the maximum depth of the local octree of each point cloud block can be expressed as:
[0064]
[0065] The mean curvature is expressed as
[0066] Step 5.6) Extract isosurfaces to obtain triangular face representations of isosurfaces in any voxel
[0067] Determine whether its vertex is outside or inside the isosurface, and then determine the isosurface segmentation mode according to the state of the vertex;
[0068] If the data value of the voxel vertex is greater than or equal to the value of the isosurface, the vertex is defined as being outside the isosurface and recorded as a positive point, i.e. 1; if the data value of the voxel vertex is less than the value of the isosurface, the vertex is defined as being inside the isosurface and recorded as a negative point, i.e. 0;
[0069] Each voxel has 8 vertices, and each vertex has positive and negative states. The isosurface can intersect with a voxel in 256 ways, forming a triangular patch representation of the isosurface in any voxel.
[0070] Step 5.7) Generate mesh model
[0071] According to the positive and negative conditions of the signed distance fields of the eight vertices, a triangular patch is obtained. The coordinates of the vertices of the triangular patch, that is, the intersection of the voxel point edge and the surface to be reconstructed, are obtained by linear interpolation of the two vertices of the voxel point edge.
[0072] The step 6) is specifically as follows:
[0073] Step 6.1) Establish defect recognition objective function:
[0074]
[0075] in, is the point cloud under the standard model, is the point cloud to be registered, R is the rotation matrix, T is the translation matrix, N P is the number of point clouds under the standard model; the optimal R and T are calculated using the least squares method; and then iterate until the calculated value of f(R, T) is minimized;
[0076] Step 6.2) Cluster the defect area and extract features
[0077] Determine the location of surface defects based on distance values
[0078] The average value of the deviation distance is expressed as:
[0079]
[0080] where d i Indicates the distance from a point to the surface of the point cloud model;
[0081] Determine the deviation distance of all points from the average value and set d i >d mean Time i The corresponding point x iStore them in class X, traverse all points, and segment the areas with large deviation distance on the surface of the point cloud model;
[0082] Step 6.3) Characterize the defect features with parameters, solve the defect area, perimeter, aspect ratio, and finally output the defect type.
[0083] The area of a defect is a geometric feature that measures the size of the area and is calculated as:
[0084] A s =N d
[0085] A s represents the defect area, S represents the measured defect area, N d The number of point clouds representing the defect area;
[0086] The perimeter of a defect refers to the length of the boundary contour line surrounding a defect area, and is calculated as follows:
[0087] L s =N e
[0088] L s Indicates the perimeter of the defect area, N e Represents the number of boundary features of the defect area.
[0089] The aspect ratio of the defect is used as a measure of shape and is calculated as follows:
[0090]
[0091] The remarkable effects of the present invention are as follows: using a line structured light scanner to obtain the two-dimensional coordinates of the thread surface, according to the thread height information and angle information obtained by the encoder, and calculating the three-dimensional coordinates through system calibration parameters, the three-dimensional point cloud data is filtered, the thread surface is reconstructed and defects are automatically identified.
[0092] Scanning with a line structured light sensor can reconstruct the thread surface in three dimensions. Compared with the existing thread two-dimensional imaging method, it can present the three-dimensional details of the thread surface more clearly, providing more detailed data support for the judgment and identification of thread defects.
[0093] The layout and movement of the line structured light sensor, through motion synchronization technology and coordinate transformation, realizes the acquisition of three-dimensional point cloud data on the thread surface, with a resolution of 0.1mm. Test conditions: The method of this device is used to test the standard measured thread ring to obtain the three-dimensional model of the thread ring. The error between the main characteristic values of major diameter, middle diameter, minor diameter, pitch, tooth profile height, thread lead angle, etc. and the measured value is no more than 0.1mm;
[0094] The point cloud data processing flow, through point cloud denoising, data simplification and other operations, not only retains the detailed information of the thread data, but also simplifies the model. The model size of a single screw hole does not exceed 100M, which is conducive to file storage and transmission as well as subsequent 3D reconstruction processing;
[0095] At present, the identification of thread defects mainly relies on careful manual observation of video files, which is prone to visual fatigue, leading to misjudgment and misjudgment, and is highly subjective. This method is more efficient in performing three-dimensional reconstruction of the thread surface and automatic defect identification.
[0096] According to the method, data collection, analysis and processing of all screw holes can be completed fully automatically, and the operation time of a single hole does not exceed 5 minutes. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 Construct schematics for coordinate systems;
[0098] Figure 2 It is the flow chart of equipment data collection;
[0099] Figure 3 To collect, construct and identify flow charts for data;
[0100] Figure 4 This is the point cloud data preprocessing flow chart;
[0101] Figure 5 Flowchart for 3D surface reconstruction. DETAILED DESCRIPTION
[0102] The present invention will be further described below through the accompanying drawings and specific implementation methods.
[0103] Step 1: Data collection and coordinate transformation.
[0104] Through the rotation and axial movement of the line structured light scanner, the two-dimensional coordinate information of the scanner is recorded in real time, and the angle data and axial position data of the line structured light scanner are recorded at the same time. The scanning range covers the inner surface of the entire screw hole. Since the scanning range of the line structured light is limited, the scanning can be performed in sections.
[0105] like Figure 1 As shown, the screw hole is represented by a cylinder, and the small square inside represents the line structured light scanner; the dark triangular area on the side represents the line structured light generated by the line structured light scanner.
[0106] Two coordinate systems are established: one is the oxz coordinate system with the reference point of the line structured light scanner itself (the geometric center or the light-emitting point can be selected) as the origin, and the two-dimensional data measured by the line structured light scanner is the point coordinates in the oxz coordinate system, represented as (x, z);
[0107] The other is the screw hole O2XYZ coordinate system, where O1 represents the center of the top plane of the screw hole, O2 represents the center of the bottom plane of the screw hole, Z represents the upward direction of the screw hole axis, X represents the clockwise tangent direction of the center of the screw hole where the pressure vessel is located, and Y represents the direction pointing to the center of the pressure vessel. The coordinate axis direction is defined in accordance with the right-hand rule. H represents the height of the line structured light scanner relative to the bottom of the screw hole, and θ represents the projection angle of the line structured light scanner on the OXY plane in the current coordinate system.
[0108] The light emitted by the line structure scanner hits the surface of the thread, and the direction of the light is parallel to the axis of the screw hole. By installing a motion mechanism on the line structure scanner, it can make a linear motion along the axis of the screw hole in the screw hole. Usually, the range of high-precision sensors is limited to 20mm, while the depth of the screw hole is greater than 200mm. The full stroke coverage of the screw hole can be achieved through the movement of the sensor; at the same time, the motion mechanism can also make the line structure scanner rotate along the axis of the screw hole.
[0109] The line structured light scanner obtains two-dimensional data. The coordinate origin is the light-emitting point of the sensor. The x-axis where the light-emitting direction is located is parallel to the axis of the screw hole, and the z-axis is perpendicular to the inner surface of the screw hole.
[0110] The height between the line structured light scanner and the bottom of the screw hole is measured by an encoder for measuring height.
[0111] The angle θ between the light plane of the line structured light scanner and the X-axis is measured by the measuring angle encoder. The scanning process is as follows: the scanner scans one circle at the top of the screw hole, and records the coordinates of all points (x, z, h, θ) in real time through synchronization technology. After the scan is completed, it drops ΔH, rescans one circle, and collects coordinate data (x, z, h, θ) in real time. The operation is repeated several times until the scanner reaches the bottom of the screw hole. The selection of a single drop height ΔH must not be greater than the range of the scanner in the z-axis direction to ensure that the scanning process can cover all areas of the thread. After the entire screw hole is scanned, the coordinates of each point (x, z, h, θ) are mapped to O2XYZ to obtain the three-dimensional point cloud of the thread inside the screw hole.
[0112] The detailed data collection process is as follows: Figure 2 shown.
[0113] 1.1) Set the hole number to be inspected
[0114] Depending on the different reactor types, the pressure vessel usually has 48 to 58 screw holes, and all the screw holes of the pressure vessel to be inspected are numbered.
[0115] 1.2) Car body positioning
[0116] The line structured light scanner is installed on the car body, and each screw hole is scanned by moving the car body along the position of different screw holes on the flange surface of the pressure vessel. When reaching the screw hole position under a certain number, the car body is first positioned to ensure that the position of the car body is fixed relative to the pressure vessel during scanning.
[0117] 1.3) The scanning head descends to the starting section of the thread
[0118] Scanning head refers to the scanning head of the line structured light scanner
[0119] 1.4) Rotate one circle and collect data synchronously
[0120] After the scanning head of the line structured light scanner is driven by the motion mechanism to rotate one circle, the two-dimensional coordinate information of the scanner is measured.
[0121] 1.5) Determine whether the scanning head reaches the bottom of the screw hole
[0122] If yes, proceed to step 1.6);
[0123] If not, lower the scanning head by ΔH, and then return to step 1.4)
[0124] ΔH is generally 2-10mm;
[0125] The measurement range of the line structured light scanner in the depth direction of the screw hole is 40mm, and the depth of the screw hole is about 260mm, so it needs to be scanned in segments, descending after each scan, and then scanning. The line structured light scanner reaches the bottom of the screw hole, based on the validity of the axial lower limit switch (photoelectric) signal.
[0126] 1.6) The scanning head rises to the top
[0127] The measurement range of the line structured light scanner in the depth direction of the screw hole is 40mm, and the depth of the screw hole is about 260mm, so it needs to be scanned in sections. After the current hole is scanned, the line structured light scanner rises to the top of the screw hole, based on the fact that the axial upper limit switch (photoelectric) signal is valid;
[0128] 1.7) The vehicle body continues to move forward, and the above steps 1.2) to 1.6) are repeated until all holes are scanned, and the two-dimensional coordinate information of the scanner is obtained after all screw holes are scanned.
[0129] Step 2: Generate 3D point cloud data.
[0130] The two-dimensional coordinate information, angle data and axial position data of the thread surface obtained by the scanner are synthesized into three-dimensional coordinate data, i.e., three-dimensional point cloud data, according to the geometric relationship;
[0131] The line structured light scanner can obtain two-dimensional data with its own reference point as the origin. Its coordinates are represented as (x, z) in the oxz coordinate system. The current angle θ of the line structured light scanner is measured by the photoelectric encoder, and the current height H is measured by the encoder in the depth direction of the screw hole. The distance between the reference point of the line structured light scanner and the center of the screw hole is a constant, expressed as D, and the coordinates in the O2XYZ coordinate system can be obtained:
[0132] X=(z+D)*cosθ
[0133] Y=(z+D)*sinθ
[0134] Z=H+x
[0135] The coordinates (x, z) in the oxz coordinate system are two-dimensional data collected by the line structured light scanner.
[0136] The measurement range of the line structured light scanner in the depth direction of the screw hole is 40mm, and the depth of the screw hole is about 260mm, so it needs to be scanned in segments. The current height H of different scanning segments is different, which can be measured by the encoder in the depth direction of the screw hole. After the scanning is completed, the two-dimensional data (x, z) of different scanning segments are converted into three-dimensional data in the O2XYZ coordinate system through the above calculation.
[0137] After the entire screw hole is scanned, the coordinates of each point (x, z, h, θ) are mapped to O2XYZ to obtain the three-dimensional point cloud of the internal thread of the screw hole. The data collection, construction and recognition process is as follows: Figure 3 shown.
[0138] Step 3: Preprocessing of 3D point cloud data.
[0139] like Figure 4 As shown,
[0140] Step 3.1 constructs a k-neighborhood for the acquired point cloud data and calculates the point cloud normal vector.
[0141] Using PCA (Principal Components Analysis) to estimate point cloud normal vector
[0142] Given a point cloud data set P = {p1, p2, ..., p k ,......p m}CR 3 , the sampling point p in the point set i The k-neighborhood of i ). For the sampling point p i , the least squares plane in the k-neighborhood is defined as:
[0143]
[0144] Among them, n is the normal vector of the tangent plane of the sampling point, and d represents the distance from the point to the fitting plane. The solution can be transformed into the eigenvalue decomposition of the semi-positive covariance matrix C. The eigenvector corresponding to the minimum eigenvalue of C is the normal vector of the plane:
[0145]
[0146] The k-neighborhood refers to the set of k sampling points closest to the sampling point pi in the point cloud data. The mathematical form can be described as follows: Assume that the point cloud data set is P = {p1, p2, ..., p m}, m is the number of point clouds, and the distance sampling point p in P is defined i The set of the nearest k sampling points is N k (p i )={p1,p2,...,p k}, which is the k-neighborhood.
[0147] Step 3.2 calculates the normal distance from the sampling point to the local tangent plane in its k-neighborhood, classifies the sampling points according to the distance threshold, and divides the three-dimensional point cloud data into smooth areas and sharp areas.
[0148] The current point is p i , take any point p on the plane k , use the following formula to calculate the normal distance D of the local tangent plane in the k neighborhood
[0149]
[0150] The sampling points are classified according to the distance threshold, and the point cloud data is divided into smooth areas and sharp areas. Different algorithms are used for preprocessing, and the distance threshold is 0.1 mm.
[0151] Among them, the normal distance from the sampling point to the local tangent plane in the domain is less than or equal to the threshold, which is defined as a smooth area, and the normal distance greater than the threshold is defined as a sharp area. The preprocessing algorithm is described in step 3.
[0152] Step 3.3 uses the weighted local optimal projection algorithm and bilateral filtering algorithm to filter and denoise the smooth area and sharp area respectively.
[0153] For sharp areas, a bilateral filtering algorithm is used for filtering and denoising, and the specific formula is as follows:
[0154]
[0155] Among them, p i is the point currently to be processed in the point cloud set, p j Yes i Points in the neighborhood, n i、n j They are p i 、p j The normal vector of the , α is the bilateral filter factor; W c is the Gaussian kernel function in the spatial domain, W s is the Gaussian kernel function in the frequency domain;
[0156] The filtered point cloud data is expressed as:
[0157] p′ i =p i +α·n
[0158] n is the normal vector of the tangent plane at the sampling point, p′ i Represents the filtered point cloud.
[0159] As a nonlinear filter, bilateral filtering can achieve the effect of maintaining edges and reducing noise at the same time. Its basic principle is to use the weighted average method to calculate the coordinates of the point by the weighted average of the coordinates of the regional points. The weighted average is based on Gaussian distribution, which not only considers the Euclidean distance between the coordinate points, but also the radiation difference in the measured point area.
[0160] For smooth areas, a weighted local optimal projection algorithm is used for filtering and denoising, specifically:
[0161] The local information is used to locally enhance the point cloud data, and a more evenly distributed point set is generated by introducing a density weight function, thereby improving the uniformity of the point cloud distribution and the surface smoothness. The iterative formula is:
[0162]
[0163] Among them, u is a constant (taken as 0.45), p represents the original point cloud position, p′ represents the new position after iteration, k is the number of adjacent vertices (taken as 16), p j Represents the current sampling point of the original point cloud, p′ j Represents the output value after iterative operation of the sampling point;
[0164] a j and β i are the relevant weight coefficients respectively, and the calculation formula is as follows:
[0165]
[0166]
[0167] In the formula, σ is the standard deviation of the current point in the neighborhood of the point cloud, and e represents a natural constant.
[0168] Step 4: Simplify the 3D point cloud data through algorithms.
[0169] Data reduction is to remove redundant points while retaining the geometric features of the point cloud. The specific algorithm uses the curvature sampling method, which retains more points in areas with complex curvature changes to highlight the characteristics of the target object, and retains fewer points in areas with relatively gentle curvature.
[0170] First, the curvature F(x0, y0, z0, C) of the point cloud data after filtering and denoising in step 3 is estimated by the following formula based on the spherical linear equation method based on the least squares method:
[0171]
[0172] Among them, P i (x i ,y i ,z i )(i=1,2,...,N) is a point on the sphere (x i ,y i 、z i represents the coordinates of the point in the O2XYZ coordinate system), O(x0, y0, z0) are the coordinates of the center of the sphere, R is the radius of the sphere, and C is the constant to be solved.
[0173] N represents the number of fitting spherical points;
[0174] The adjacent point clouds are concentrated into P i (x i ,y i , z i ) as the center into the above formula, we can get a series of equations, and C can be calculated by the least squares method.
[0175] Then establish a local coordinate system, translate the origin, obtain its spatial coordinates in the new local coordinate system, and finally solve the unknown parameters and calculate the curvature.
[0176] Establish a local coordinate system with the target point as the origin. The direction of its coordinate axis is the same as that of the system coordinate system. Perform coordinate translation transformation to obtain the spatial coordinates in the new local coordinate system. Substitute the coordinates of the adjacent points into the above formula to calculate the parameters x0, y0, z0 and C, and calculate the curvature ρ of the target point.
[0177]
[0178] Finally, the curvature value is compared with the set threshold value. If it is greater than the threshold, it is retained, and if it is less than the threshold, it is discarded. The threshold can be set according to the curvature histogram of the statistical target point, generally taking 0.5 to 0.9 of the value on the left side of the histogram. The larger the value, the greater the amount of data simplification, while losing some low-frequency information.
[0179] The calculation of the above histogram first calculates the curvature of all points in the point cloud, and then statistics the probability distribution of different de-curvature values, which can be represented by a two-dimensional curve graph, with the horizontal axis representing the curvature value and the vertical axis representing the probability statistical value.
[0180] Step 5: 3D surface reconstruction: This step is to reconstruct a complete 3D model of the target from discrete point cloud data.
[0181] like Figure 5 The specific method shown is:
[0182] 5.1) First, use the weighted modified PCA algorithm to estimate the normal vector
[0183] Based on the PCA algorithm, weighted correction can reduce the sensitivity of outlier noise points. The plane fitting expression is:
[0184]
[0185] Among them, n is the normal vector of the tangent plane of the sampling point, d represents the distance from the point to the fitting plane, k is the number of neighborhood points, and p is the distance from the point to the fitting plane. i is the current sampling point, w(p i ) is the weighted value, and the expression is:
[0186]
[0187] For p i The k-neighborhood centroid of .
[0188] 5.2) Segment the point cloud based on the estimation results and return the block set
[0189] For the point cloud dataset P, assuming that it is expected to be divided into K regions, first randomly select K points from the point cloud data as the initial centers of the K segmentation regions, calculate the Euclidean distance from each point in the point cloud to the K initial segmentation centers, and divide it into the segmentation region represented by the nearest initial segmentation center, then adjust the center of each segmentation region, iterate the above calculation process until all region centers no longer change, then stop the iteration, the segmentation process ends, and output the region segmentation result.
[0190] The adjustment step is 0.2-2 mm;
[0191] 5.3) Then perform block sparseness and resampling
[0192] According to the block area after point cloud segmentation, the curvature of the points in each area is calculated respectively, and the average value of the curvature in the area is calculated. If the curvature of the sampling point is less than the average value, the point is discarded, otherwise the sampling of the original point is retained.
[0193] 5.4) Then the node function is calculated to achieve smooth optimization;
[0194] Smoothing optimization is achieved by using Gaussian filters to retain local feature details and smooth the noise data;
[0195] The basis function of the node function F0 is expressed as:
[0196]
[0197] Where σ is the standard deviation of Gaussian filtering, which can generally be taken as σ = 0.1;
[0198] 5.5) Calculate the maximum octree depth of the block,
[0199] Given the maximum depth of the global octree is D max , the minimum depth is D min , then the maximum depth of the local octree of each point cloud block can be expressed as:
[0200]
[0201] The mean curvature is expressed as
[0202] 5.6) Isosurface extraction, obtaining the triangular patch representation of the isosurface in any voxel
[0203] Among them, an isosurface is a surface in space whose surface function is equal to a given value
[0204] If a voxel intersects with the surface to be reconstructed, the 8 vertices of the voxel are classified to determine whether its vertex is outside or inside the isosurface. Then, the isosurface partitioning mode is determined based on the status of the 8 vertices. The vertex classification rule is: if the data value of the voxel vertex is greater than or equal to the value of the isosurface, the vertex is defined as being outside the isosurface and is recorded as a positive point, i.e., "1"; if the data value of the voxel vertex is less than the value of the isosurface, the vertex is defined as being inside the isosurface and is recorded as a negative point, i.e., "0". Since each voxel has a total of 8 vertices, and each vertex has both positive and negative states, the isosurface may intersect with a voxel in 256 ways. By listing these 256 situations, a table can be created, which can be used to find the triangular face representation of the isosurface in any voxel.
[0205] 5.7) Generate mesh model
[0206] By looking up the table according to the positive and negative conditions of the signed distance fields of the 8 vertices, we can get the triangular patch. The coordinates of the vertices of the triangular patch, that is, the intersection points of the voxel point edge and the surface to be reconstructed, are obtained by linear interpolation of the two vertices of the voxel point edge.
[0207] Step 6: Defect identification and measurement.
[0208] 6.1) Use ICP (Iterative Closest Point) algorithm for registration and establish defect recognition objective function:
[0209]
[0210] in, is the point cloud under the standard model, is the point cloud to be registered, R is the rotation matrix, and T is the translation matrix. i=1,2,…N P ; N P is the number of point clouds under the standard model;
[0211] According to the above equation, the optimal R and T are calculated using the least squares method; then iteration is performed, and then iteration is performed until the calculated value of f(R, T) is minimized.
[0212] 6.2) Clustering and segmenting defect areas and extracting features
[0213] By calculating the distance from the point to the surface, the deviation distance from the measured point to the point cloud model is obtained. The location of the surface defect is determined according to the distance value. The average value of the deviation distance is expressed as:
[0214]
[0215] where d i Indicates the distance from the point to the surface of the point cloud model.
[0216] Determine the deviation distance of all points from the average value and set d i >d mean Time i The corresponding point x i Store them in class X (X is defined as the initial cluster point set), traverse all points, and thus segment the areas with large deviation distances on the surface of the point cloud model.
[0217] 6.3) The defect characteristics are then characterized by parameters, and finally the defect type is output.
[0218] The characteristic parameters of the defect area are calculated to solve the geometric characteristics of the defect such as area, perimeter, and aspect ratio.
[0219] Area is a geometric feature that measures the size of a region. It is calculated as:
[0220] A s =N d
[0221] A srepresents the defect area, S represents the measured defect area, N d The number of point clouds representing defect areas.
[0222] The perimeter refers to the length of the boundary contour line surrounding a defect area, and is calculated as follows:
[0223] L s =N e
[0224] L s Indicates the perimeter of the defect area, N e Represents the number of boundary features of the defect area.
[0225] The aspect ratio is used to measure the shape and is calculated as follows:
[0226]
[0227] The surface defects of the thread are compared with the standard thread. The area with a large deviation distance (usually 0.1mm) is identified as a defect. By calculating the distance from the point to the surface, the deviation distance from the measured point to the standard point cloud model is obtained, and the location of the defect is determined according to the distance value. In order to classify the defect type, it is necessary to solve the characteristic parameters of the defect area, including the area, perimeter, aspect ratio, roundness, etc. of the defect area. According to the characteristics of the defect, the user can set conditions to screen and search for defects.
[0228] Parts of the present invention that are not disclosed in detail belong to the common knowledge in the art.
[0229] Although the above describes the illustrative specific embodiments of the present invention to facilitate the understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
Claims
1. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of pressure vessels, characterized in that: The steps include: Step 1) scanning and obtaining the two-dimensional coordinates of the thread surface; Step 2) The two-dimensional coordinate information of the thread surface, the angle data of the scanning device and the axial position data are synthesized into three-dimensional coordinate data, i.e., three-dimensional point cloud data; Step 3) Preprocessing the 3D point cloud data, determining the normal vector of the 3D point cloud data, and dividing the 3D point cloud data into smooth areas and sharp areas, and performing filtering and denoising respectively; Step 4) simplifying the three-dimensional point cloud data and retaining data greater than a threshold; Step 5) reconstructing the three-dimensional surface of the measured object and generating a mesh model; Step 6) Defect identification and measurement, characterizing the defect characteristics with parameters and outputting the defect type; The step 1) is specifically as follows: First, two coordinate systems are established: one is the oxz coordinate system with the scanning device's own reference point as the origin, and the measured two-dimensional data of the thread surface are the point coordinates in the oxz coordinate system, represented by (x, z); the other is the screw hole O2XYZ coordinate system, where O2 represents the center of the plane at the bottom of the screw hole, Z is the upward direction of the screw hole axis, X is the clockwise tangent direction of the center of the screw hole where the pressure vessel is located, and Y is the direction pointing to the center of the pressure vessel. The coordinate axis direction is defined in accordance with the right-hand rule; H represents the height of the scanning device relative to the bottom of the screw hole, and θ represents the projection angle of the scanning device on the OXY plane in the current coordinate system; After the screw holes to be tested are marked and the scanning device is positioned and installed, the scanning head descends to the starting section of the thread, rotates one circle, and synchronously collects two-dimensional data. The scanning head rises to the top, and the mobile scanning device continues to scan all the screw holes to obtain the two-dimensional coordinate information of all the screw holes; The step 2) is specifically as follows: The two-dimensional data of the thread surface is represented by (x, z) in the oxz coordinate system. The distance between the reference point of the scanning device and the center of the screw hole is a constant, expressed as D. The three-dimensional point cloud data can be obtained, that is, the coordinates of (x, z) in the O2XYZ coordinate system, expressed as: X=(z+D)*cosθ Y=(z+D)*sinθ Z=H+x Wherein, θ is the current angle of the line structured light scanner, and H is the current height of the line structured light scanner; The step 4) is specifically as follows: First, the curvature F(x0, y0, z0, C) of the point cloud data after filtering and denoising in step 3 is estimated by the following formula using the spherical linear equation method based on the least squares method: Among them, P i (x i ,y i , z i )(i=1,2,...,N) is a point x on the sphere i ,y i 、z i The coordinates in the O2XYZ coordinate system, O(x0, y0, z0) are the coordinates of the center of the sphere, R is the radius of the sphere, C is the constant to be solved, N is the number of points on the fitting sphere, and the adjacent point clouds are concentrated in P i (x j ,y j , z j ) is substituted into the above formula to obtain a series of equations, and C can be calculated by the least squares method; Then, a local coordinate system is established, the origin is translated to obtain its spatial coordinates in the newly created local coordinate system, and finally the unknown parameters are solved to calculate the curvature; Finally, the curvature value is compared with the set threshold value. If it is greater than the threshold, it will be retained, and if it is less than the threshold, it will be discarded.
2. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 1, characterized in that: The scanning device is a line structured light scanner, which is installed on the vehicle body for positioning. The vehicle body is moved along the positions of different screw holes on the flange surface of the pressure vessel to scan each screw hole. When the position of a screw hole with a certain number is reached, the vehicle body is first positioned to ensure that the position of the vehicle body is fixed relative to the pressure vessel during scanning.
3. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 2, characterized in that: Before the scanning head rises to the top, it is necessary to determine whether the scanning head has reached the bottom of the screw hole. If it has not reached the top, the scanning head will be lowered and then rotated again to synchronously collect two-dimensional data until it reaches the bottom.
4. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 1, characterized in that: The step 3) is specifically as follows: Step 3.1) Construct a k-neighborhood for the acquired point cloud data and calculate the point cloud normal vector The PCA method is used to estimate the point cloud normal vector and obtain the distance from the sampling point p in the point cloud data. i The set of the nearest k sampling points; Step 3.2) Calculate the normal distance from the sampling point to the local tangent plane in its k-neighborhood, classify the sampling points according to the distance threshold, and divide the 3D point cloud data into smooth areas and sharp areas. The normal distance from the sampling point to the local tangent plane in the area is less than or equal to the threshold and is defined as a smooth area, and the normal distance greater than the threshold is defined as a sharp area; Step 3.3) Filter and denoise the smooth area and sharp area respectively.
5. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 4, characterized in that: For the sharp area, the bilateral filtering algorithm is used for filtering and denoising, and the specific formula is as follows: Among them, p i is the point currently to be processed in the point cloud set, p j Yes i Points in the neighborhood, n i 、n j They are p i 、p j The normal vector of the , α is the bilateral filter factor; W c is the Gaussian kernel function in the spatial domain, W s is the Gaussian kernel function in the frequency domain; The filtered point cloud data is expressed as: p′ i =p i +a·n n is the normal vector of the tangent plane at the sampling point, p′ i Represents the position of the point cloud after filtering.
6. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 4, characterized in that: For smooth areas, a weighted local optimal projection algorithm is used to filter and denoise. Specifically: The local information is used to locally enhance the point cloud data. A more evenly distributed point set is generated by introducing a density weight function to improve the uniformity of the point cloud distribution and the surface smoothness. The iterative formula is: Among them, u is a constant, p represents the original point cloud position, p′ represents the new position after iteration, k is the number of adjacent vertices, and p j Represents the current sampling point of the original point cloud, p′ j Represents the output value after iterative operation of the sampling point; a j and β i are the relevant weight coefficients respectively, σ is the standard deviation of the current point in the neighborhood of the point cloud, and e represents a natural constant.
7. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 1, characterized in that: The step 5) is specifically as follows: Step 5.1) Estimation of normal vector and weighted correction Among them, n is the normal vector of the tangent plane of the sampling point, d represents the distance from the point to the fitting plane, k is the number of neighborhood points, and p is the distance from the point to the fitting plane. i is the current sampling point, w(p i ) is the weighted value, and the expression is: For p i The k-neighborhood centroid of ; Step 5.2) Perform point cloud segmentation and return the block set For the point cloud data set P that is expected to be divided into K regions, first randomly select K points from the point cloud data as the initial centers of the K segmentation regions, calculate the Euclidean distance from each point in the point cloud to the K initial segmentation centers, and divide it into the segmentation region represented by the nearest initial segmentation center, then adjust the center of each segmentation region, iterate the above calculation process until all region centers no longer change, then stop the iteration, the segmentation process ends, and output the region segmentation result; Step 5.3) Block sparse and resampling According to the block area after segmentation, the curvature of each point in the area is calculated respectively, and the average value of the curvature in the area is calculated. If the curvature of the sampling point is less than the average value, the point is discarded, otherwise the sampling of the original point is retained; Step 5.4) Calculate the node function to achieve smooth optimization The basis function of the node function F0 is expressed as: Where, σ is the Gaussian filter standard deviation; Step 5.5) Calculate the maximum octree depth of the block Given the maximum depth of the global octree is D max , the minimum depth is D min , then the maximum depth of the local octree of each point cloud block can be expressed as: The mean curvature is expressed as Step 5.6) Extract isosurfaces to obtain triangular facet representations of isosurfaces in any voxel Determine whether its vertex is outside or inside the isosurface, and then determine the isosurface segmentation mode according to the state of the vertex; If the data value of the voxel vertex is greater than or equal to the value of the isosurface, the vertex is defined as being outside the isosurface and recorded as a positive point, i.e. 1; if the data value of the voxel vertex is less than the value of the isosurface, the vertex is defined as being inside the isosurface and recorded as a negative point, i.e. 0; Each voxel has 8 vertices, and each vertex has positive and negative states. The isosurface can intersect with a voxel in 256 ways, forming a triangular patch representation of the isosurface in any voxel. Step 5.7) Generate mesh model According to the positive and negative conditions of the signed distance fields of the eight vertices, a triangular patch is obtained. The coordinates of the vertices of the triangular patch, that is, the intersection of the voxel point edge and the surface to be reconstructed, are obtained by linear interpolation of the two vertices of the voxel point edge.
8. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 1, characterized in that: The step 6) is specifically as follows: Step 6.1) Establish defect recognition objective function: in, is the point cloud under the standard model, is the point cloud to be registered, R is the rotation matrix, T is the translation matrix, N P is the number of point clouds under the standard model; the optimal R and T are calculated using the least squares method; and then iterate until the calculated value of f(R, T) is minimized; Step 6.2) Cluster the defect area and extract features Determine the location of surface defects based on distance values The average value of the deviation distance is expressed as: where d i Indicates the distance from a point to the surface of the point cloud model; Determine the deviation distance of all points from the average value and set d i >d mean Time i The corresponding point x i Store them in class X, traverse all points, and segment the areas with large deviation distance on the surface of the point cloud model; Step 6.3) Characterize the defect features with parameters, solve the defect area, perimeter, aspect ratio, and finally output the defect type.
9. A method for three-dimensional reconstruction and automatic defect recognition of main bolt hole threads of a pressure vessel as claimed in claim 8, characterized in that: The area of a defect is a geometric feature that measures the size of the area and is calculated as: A s =N d A s represents the defect area, S represents the measured defect area, N d The number of point clouds representing the defect area; The perimeter of a defect refers to the length of the boundary contour line surrounding a defect area, and is calculated as follows: L s =N e L s Indicates the perimeter of the defect area, N e The number of boundary features representing the defect area; The length of the defect area W A Width L A Ratio is used to measure the shape and is calculated as follows:
Citation Information
Patent Citations
Water front three-dimensional reconstruction apparatus and method based on multi-view point cloud registration
CN105787933A
Point cloud based quick reconstruction STL digital model generation method
CN107767457A