CN116336953A - System and method for measuring radius and depth of perforation model - Google Patents
System and method for measuring radius and depth of perforation model Download PDFInfo
- Publication number
- CN116336953A CN116336953A CN202310624915.9A CN202310624915A CN116336953A CN 116336953 A CN116336953 A CN 116336953A CN 202310624915 A CN202310624915 A CN 202310624915A CN 116336953 A CN116336953 A CN 116336953A
- Authority
- CN
- China
- Prior art keywords
- model
- point cloud
- perforation
- equation
- points
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000001914 filtration Methods 0.000 claims abstract description 22
- 230000011218 segmentation Effects 0.000 claims abstract description 18
- 238000012545 processing Methods 0.000 claims abstract description 7
- 238000001228 spectrum Methods 0.000 claims abstract description 4
- 239000000523 sample Substances 0.000 claims description 54
- 238000012417 linear regression Methods 0.000 claims description 28
- 230000003595 spectral effect Effects 0.000 claims description 18
- 238000005259 measurement Methods 0.000 claims description 17
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 239000011159 matrix material Substances 0.000 claims description 11
- 230000002776 aggregation Effects 0.000 claims description 8
- 238000004220 aggregation Methods 0.000 claims description 8
- 239000003086 colorant Substances 0.000 claims description 7
- 230000001419 dependent effect Effects 0.000 claims description 6
- 238000012935 Averaging Methods 0.000 claims description 4
- 238000013461 design Methods 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 claims description 3
- 230000004044 response Effects 0.000 claims description 3
- 238000010845 search algorithm Methods 0.000 claims description 3
- 238000000691 measurement method Methods 0.000 claims 2
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 239000000463 material Substances 0.000 description 3
- 238000010226 confocal imaging Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 102000003780 Clusterin Human genes 0.000 description 1
- 108090000197 Clusterin Proteins 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/08—Measuring arrangements characterised by the use of optical techniques for measuring diameters
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/22—Measuring arrangements characterised by the use of optical techniques for measuring depth
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/18—Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
-
- G06T5/70—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
Abstract
The invention discloses a perforation model radius and depth measuring system, which comprises a three-dimensional moving device, a spectrum confocal sensor and a computer, wherein the three-dimensional moving device is used for measuring the radius and depth of a perforation model; the three-dimensional moving device comprises a transverse moving plate, a longitudinal moving plate and a vertical moving frame. A method for measuring radius and depth of a perforation model, comprising: obtaining three-dimensional point cloud data of a perforation model; performing operation processing of invalid point removal, point cloud filtering denoising and point cloud segmentation on the three-dimensional point cloud data; and calculating a space plane equation in which the measured data are positioned and a space circle fit of a space circle center, solving a linear model by using a least square method, substituting the linear model into the space circle equation, obtaining radius value data of the perforation model at the position, and calculating depth value data. The beneficial effects of the invention are as follows: the system and the method have high measuring efficiency, strong anti-interference capability and high measuring precision.
Description
Technical Field
The invention relates to the technical field of measurement, in particular to a method for measuring radius and depth of a perforation model.
Background
In recent years, with miniaturization of machine elements, precision requirements for manufacturing processes are increasing. Therefore, post-production detection of the precision device is very important, and if the size and the demand error of actual production are too large, the quality and the working efficiency of the product are affected, so that more serious consequences are generated.
Currently, measurements on components mainly include contact measurements and non-contact measurements. The caliper, micrometer and three-coordinate measuring machine in the contact measurement have the defects of poor measuring effect, low efficiency and limited application range; in the non-contact measurement, the structured light measurement and the laser scanning technology are easily affected by factors such as illumination, and the measurement accuracy is poor.
Disclosure of Invention
The invention aims to provide a radius and depth measuring method of a perforation model with high measuring efficiency and high precision, aiming at the defects of the prior art.
The invention adopts the technical scheme that: a perforation model radius and depth measuring system comprises a three-dimensional moving device, a spectral confocal sensor and a computer;
the three-dimensional moving device comprises a transverse moving plate, a longitudinal moving plate and a vertical moving frame;
the perforation model to be measured is fixed on a transverse moving plate, the transverse moving plate is arranged on a longitudinal moving plate, and the longitudinal moving plate is arranged on a measuring platform;
the vertical moving frame is L-shaped, a spectral confocal sensor is fixed at the horizontal end of the vertical moving frame, and a probe of the spectral confocal sensor is vertically downward; the spectral confocal sensor and the three-dimensional moving device are respectively connected with a computer, and the computer can control the transverse moving plate, the longitudinal moving plate and the vertical moving frame of the three-dimensional moving device to move.
The invention also provides a method for measuring the radius and depth of the perforation model, which comprises the following steps:
s1: constructing the perforation model radius and depth measuring system, constructing a three-dimensional rectangular coordinate system, and scanning the perforation model by using a probe of the perforation model radius and depth measuring system to obtain three-dimensional point cloud data of the perforation model;
s2: performing operation processing of invalid point removal, point cloud filtering denoising and point cloud segmentation on the three-dimensional point cloud data, and updating the three-dimensional point cloud data;
s3: fitting the space plane equation where the three-dimensional point cloud data obtained in the step S2 are located with a space circle of the space circle center, solving a linear model by using a least square method to substitute the linear model into the space circle equation, obtaining radius value data of the perforation model at the position, and calculating depth value data.
According to the scheme, the specific calculation method of the radius value data in the step S3 comprises the following steps:
fitting a space plane equation where the top data of the perforation model are located with a space circle of a space circle center, solving a linear regression model by using a least square method, substituting the linear regression model into the space circle equation, and obtaining the radius of the perforation model; the spatial circle fitting method based on the linear regression model is as follows:
(1) General formula defining space plane equation, wherein />、/>、/>Three components of the plane normal vector;
(3) Formula of normal vector, wherein />Representing the cross product of the vector, substituting the three random points to +.>, wherein Namely normal vector->Is included in the three components of (a);
(4) Optionally select one pointCalculating a spatial plane equation by using a point French formula:
it is further possible to obtain:
thus, the coefficients of the spatial plane equation are:
thus, the spatial plane equation is:
wherein R is the radius of the space circle;
(6) Three points selected from the second step N timesSubstituting into the space round equation to obtain the following equation:
and (3) finishing to obtain:
(7) Establishing a coefficient equation:
(9) And taking the distance from each point on the point cloud set to the circle center as a dependent variable, taking the coordinates of the sample points as independent variables, and establishing a linear regression model: for each pointDistance to center of circled i Can be expressed as:
(10) Squaring the distance from each point to the center of the circleAs dependent variables, the coordinates of the individual points are independent variables, a design matrix is constructed>And response vector->:
wherein Representing the number of sample points, +.>>4;/>The first column is 1, and corresponds to the intercept in the linear regression model;
(11) Solving a linear regression model by using a least square method:
wherein ,representing model parameters->Representing the error, and obtaining the parameter vector by the least square method;/>By->The composition is the coefficient of the linear regression model;
obtaining a linear equation set according to the sample points, and finally solving the equation set to obtain radius R data;
(13) And obtaining depth data of the perforation model by using a method of averaging the distances from the points to the space planes.
According to the scheme, the specific method of the S3 (13) is as follows:
the first fitting plane is the fitting plane of the perforation model top data, the second fitting plane is the fitting plane of the perforation model bottom data, the space plane equation of step S3 (1)Equation for the first fitting plane, wherein +.>、/>、/>The spatial plane equation of the second fitting plane is obtained by the same method for the three components of the normal vector of the plane>, wherein />、/>、/>Three components of the plane normal vector; randomly selecting M points in the first fitting plane +.>Calculating the average distance from any point to the second fitting planeH b :
Randomly selecting N points in a second fitting planeCalculating the average distance between any point and the first fitting planeH i :
Depth is determined according to the followingH d :
According to the scheme, the specific method of S2 is as follows:
s21: removing invalid points with Z-axis coordinates of 0 from initial three-dimensional point cloud data, and filtering noise points in a Z-axis interval and an X-axis interval by setting parameter values of a filtering direction and upper and lower filtering limits by using a distance filtering algorithm to obtain smooth three-dimensional point cloud data;
s22: obtaining a plurality of different point cloud cluster groups from the smoothed three-dimensional point cloud data by utilizing a point cloud segmentation algorithm, and differentiating the point cloud cluster groups by adopting different colors;
s23: and updating the segmented point cloud data.
According to the above scheme, in S22, a different distance segmentation algorithm is adopted, and the specific steps are as follows:
(1) Defining a set of point clouds, wherein />Indicate->Coordinates of the individual points in three-dimensional space +.>I takes on the values 1,2, …, n, n representing the number of sample points in the point cloud;
(2) Randomly selecting N starting pointsAs a center point; at->Constructing KD-Tree nearby, and finding each point by KD-Tree neighbor search algorithm>Nearby k points> The method comprises the steps of carrying out a first treatment on the surface of the Will->Corresponding k neighbor points join the clusterIn (a) and (b); assume that a certain neighbor is +>The coordinates are +.>,/>And->Distance betweend ij The method comprises the following steps:
flattening all center pointsAverage distance averaging as thresholdD ave :
recalculating sample pointsAnd get Convergence->Average value of the distances between the sample pointsD:
(4) Will beAnd->Threshold value is compared, if-></>Sample Point +.>Adding original aggregation cluster->And otherwise, the cluster is classified into a new cluster;
(5) Repeating the steps (3) - (4) until no more distance existsLess than->Representing that the cluster is complete;
(6) Selecting a new clustering center again, and repeating the steps (2) - (5) until no new clustering points are generated;
(7) And distinguishing the cloud clusters of each point by adopting different colors.
According to the scheme, S1 comprises the following steps:
s11: building a perforation model radius and depth measuring system;
s12: the experimenter controls the three-dimensional moving device to drive the probe to scan the perforation model to be tested, when white light emitted by the probe is divided into continuous wavelength spectrums, each wavelength is focused on the upper outer surface of the perforation model to form rectangular light spots perpendicular to a focal plane, and the scanning and acquisition of the model are started to form three-dimensional point cloud data;
s13: the probe scans and collects outline data of the perforation model, and a system interface of the computer displays three-dimensional point cloud data of the perforation model.
The beneficial effects of the invention are as follows:
1. according to the system and the method, the spectral confocal imaging is combined with the three-dimensional mobile device, the workpiece data are collected to form orderly and accurate three-dimensional point cloud data, the point cloud data are subjected to filtering, denoising, segmentation, fitting, reconstruction and the like, the depth and the radius of a perforation model are calculated, the function of intuitively collecting the three-dimensional point cloud data of the workpiece to be measured is achieved, and further target data are obtained.
2. The invention is based on space plane equation and space circle center solving space circle fitting operation, and adds a least square method on the basis, so that the result is more accurate and stable.
3. The system and the method provided by the invention scan the perforation model to collect data, the computer program runs smoothly and stably, the adaptability is good, and the requirement on the computer is not high; the robustness is good, the manpower and material resources are optimized, and the resource waste is avoided.
4. The invention has less manual intervention, reduces the consumption of manpower and material resources and greatly saves the cost.
Drawings
FIG. 1 is a flow chart of an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of the present embodiment.
Fig. 3 is an origin selection chart of the present embodiment.
Fig. 4 is a scanning schematic diagram of the present embodiment.
Fig. 5 is a three-dimensional point cloud data diagram of the present embodiment.
Fig. 6 is a three-dimensional point cloud data diagram after filtering and denoising according to the present embodiment.
Fig. 7 is a three-dimensional point cloud data diagram of a fitting plane in this embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clear, the present invention will be described in further detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In fig. 2 and 3, the reference numerals are as follows: 1. a vertical moving frame; 2. a measurement platform; 3. a computer; 4. longitudinally moving the plate; 5. a probe; 6. a spectral confocal sensor; 7. a transversely moving plate; 8. perforating the model; 9. an origin.
A perforation model radius, depth measurement system as shown in fig. 2 and 3, comprising a three-dimensional movement device and a spectral confocal sensor 6 and a computer 3;
the three-dimensional moving device comprises a transverse moving plate 7, a longitudinal moving plate 4 and a vertical moving frame 1;
the perforation model 8 to be measured is fixed on a transverse moving plate 7, the transverse moving plate 7 is arranged on a longitudinal moving plate 4, and the longitudinal moving plate 4 is arranged on the measuring platform 2;
the vertical moving frame 1 is L-shaped, a spectral confocal sensor 6 is fixed at the horizontal end of the vertical moving frame 1, and a probe 5 of the spectral confocal sensor 6 is vertically downward; the spectral confocal sensor 6 and the three-dimensional moving device are respectively connected with the computer 3, and the computer 3 controls the transverse moving plate 7, the longitudinal moving plate 4 and the vertical moving frame 1 through built-in programs.
In the invention, the computer 3 controls the transverse moving plate 7 to transversely move relative to the measuring platform 2 (namely, the X direction in the drawing) through a built-in program, and controls the longitudinal moving plate 4 to longitudinally move relative to the measuring platform 2 (namely, the Y direction in the drawing), so that the transverse and longitudinal movement of the perforation model 8 is realized; the computer 3 can control the vertical moving frame 1 to drive the probe 5 of the spectral confocal sensor 6 to move vertically. The three-dimensional mobile device is existing mature equipment, in the embodiment, the three-dimensional mobile device is directly purchased by a company, the model is SMC6490, and the computer 3 controls the movement.
A method for measuring the radius and depth of a perforation model as shown in fig. 1, comprising the steps of:
s1: the perforation model radius and depth measuring system of claim 1 is built, a three-dimensional rectangular coordinate system is built, the perforation model is scanned by using a probe of the perforation model radius and depth measuring system, three-dimensional point cloud data of the perforation model are obtained, and the three-dimensional point cloud data are X-axis coordinates and Y-axis coordinates of the perforation model on a longitudinally moving plate and Z-axis coordinates of the probe.
In the invention, the projection position of the probe on the transversely moving plate is taken as an origin (shown as a reference numeral 9 in fig. 3) when the machine is started, the transverse direction is the X-axis direction, the longitudinal direction is the Y-axis direction, the vertical direction is the Z-axis direction, a three-dimensional rectangular coordinate system is established, the three-dimensional moving device drives the probe to scan the perforation model, and three-dimensional point cloud data, namely X-axis coordinates and Y-axis coordinates of the perforation model on the transversely moving plate and Z-axis coordinates of the probe, are obtained. In this embodiment, the longitudinally moving plate is rectangular, and the projection position of the probe at the start-up is the lower left corner of the transversely moving plate, and this point is taken as the origin, as shown in fig. 3.
The specific method of step S1 is as follows:
s11: and constructing the perforation model radius depth measurement system, and setting a point cloud executable program in a computer. Establishing a three-dimensional rectangular coordinate system, vertically fixing the probe, namely fixing the probe along the Z-axis direction, controlling the three-dimensional moving device to drive the probe to vertically move, controlling the transverse moving plate and the longitudinal moving plate to drive the perforation model to move by the computer, scanning the perforation model by the probe to obtain three-dimensional point cloud data, and then displaying and processing the point cloud in a computer window and outputting a final result.
S12: the experimenter operates on a computer system interface, controls the three-dimensional moving device to drive the probe to scan the perforation model to be tested, and when white light emitted by the probe is divided into continuous wavelength spectrums, each wavelength is focused on the upper outer surface of the perforation model to form rectangular light spots perpendicular to a focal plane, the scanning and acquisition model is started, three-dimensional point cloud data are formed, and the process is described with reference to fig. 4.
S13: the probe scans and collects outline data of the perforation model, and a system interface of the computer displays three-dimensional point cloud data of the perforation model; reference is made herein to fig. 5.
S2: and performing operation processing of invalid point removal, point cloud filtering denoising and point cloud segmentation on the three-dimensional point cloud data, and updating the three-dimensional point cloud data.
In the present invention, three-dimensional point cloud data is composed of a plurality of point cloud clusters having upper and lower planes in the Z-axis direction, referring to fig. 6. The invalid point is a point with a Z-axis coordinate of 0 in the three-dimensional point cloud. And denoising through the point cloud filtering, namely removing noise points, wherein the noise points are unordered point clouds in the three-dimensional point cloud data of the scanning acquisition perforation model.
The specific method of step S2 is as follows:
s21: in the initial three-dimensional point cloud data, firstly, invalid points with Z-axis coordinates of 0 are removed, and then, by means of a distance filtering algorithm, noise points in a Z-axis interval and an X-axis interval are filtered out by setting parameter values of a filtering direction and a filtering upper limit and a filtering lower limit, so that smooth three-dimensional point cloud data are obtained.
In the embodiment, the parameters set in the first step are Z-axis interval-0.25 mm-1 mm, the point cloud outside the filtering range is reserved, the parameters set in the second step are X-axis interval-0.6 mm, and the point cloud outside the filtering range is reserved.
S22: and obtaining a plurality of different point cloud clusters from the smooth three-dimensional point cloud data by using a point cloud segmentation algorithm, and distinguishing the point cloud clusters by adopting different colors.
In the invention, the three-dimensional point cloud data is composed of a plurality of point cloud data of an upper plane and a lower plane, and the point cloud data needs to be clearly distinguished in subsequent calculation, so that a point cloud segmentation algorithm is needed. The point cloud segmentation algorithm is a different-distance segmentation algorithm, three-dimensional data can be segmented into a plurality of point cloud clusters with upper and lower planes by setting parameters among clustered point cloud clusters, thresholds and distances, and different point cloud clusters are distinguished by adopting different colors.
The method adopts a different-distance segmentation algorithm and comprises the following specific steps:
(1) Defining a set of point clouds, wherein />Indicate->Coordinates of the individual points in three-dimensional space +.>I takes the values 1,2, …, n, n representing the number of sample points in the point cloud.
(2) Randomly selecting N starting pointsAs a center point, N is taken as 10; at->Constructing KD-Tree nearby, and finding each point by KD-Tree neighbor search algorithm>Nearby k points> K is 100; will->Corresponding k neighbor points join the aggregation cluster +.>In (a) and (b); assume that a certain neighbor is +>The coordinates are +.>,/>And->Distance betweend ij The method comprises the following steps:
average distance of all center points is averaged as threshold valueD ave :
Recalculating sample pointsAnd get Convergence->Average value of the distances between the sample pointsD:
(4) Will beAnd->Threshold value is compared, if-></>Sample Point +.>Adding original aggregation cluster->And otherwise, the cluster is classified into a new cluster;
(5) Repeating the steps (3) - (4) until no more distance existsLess than->Representing that the cluster is complete;
(6) Selecting a new clustering center again, and repeating the steps (2) - (5) until no new clustering points are generated;
(7) And distinguishing the cloud clusters of each point by adopting different colors.
S23: and updating the segmented point cloud data.
S3: fitting the three-dimensional point cloud data obtained in the step S2, specifically, fitting a space plane equation (a first fitting plane) where the top data of the perforation model are located with a space circle of a space circle center, solving a linear regression model by using a least square method, substituting the linear regression model into the space circle equation, obtaining radius value data of the perforation model at the position, and calculating depth value data.
The method comprises the following specific steps:
s31: fitting a space plane equation where the top data of the perforation model are positioned with a space circle of a space circle center, solving a linear regression model by using a least square method, substituting the linear regression model into the space circle equation, and obtaining the radius of the perforation model;
the spatial circle fitting method based on the linear regression model is as follows:
(1) General formula defining space plane equation, wherein />、/>、/>Three components of the planar normal vector, respectively.
(3) Formula of normal vector, wherein />Representing the cross product of the vector, substituting the three random points to +.>, wherein Namely normal vector->Is included in the three components of (a).
(4)、Optionally select one pointCalculating a spatial plane equation by using a point French formula:
it is further possible to obtain:
thus, the coefficients of the spatial plane equation are:
thus, the spatial plane equation is:
wherein R is the radius of the space circle.
(6) Three points selected from the second step N timesInto a space circular equation (wherein,/>) The following equation is obtained:
and (3) finishing to obtain:
(7) Establishing a coefficient equation:
(9) And taking the distance from each point on the point cloud set to the circle center as a dependent variable, taking the coordinates of the sample points as independent variables, and establishing a linear regression model: for each pointDistance to center of circled i Can be expressed as:
(10) Squaring the distance from each point to the center of the circleAs dependent variables, the coordinates of the individual points are independent variables, a design matrix is constructed>And response vector->:
wherein Representing the number of sample points (+)>>4);/>The first column is 1, and corresponds to the intercept in the linear regression model;
(11) Solving a linear regression model by using a least square method:
wherein ,representing model parameters->Representing the error, and obtaining the parameter vector by the least square method。/>By->The composition is a coefficient of a linear regression model.
and obtaining a linear equation set according to the sample points, solving the equation set, and obtaining radius R data.
(13) obtaining depth data of the perforation model by using a method of averaging the distances from the points to the space plane. The specific method comprises the following steps: as in fig. 7: the first fitting plane is the fitting plane of the perforation model top data (as shown by reference numeral 10 in fig. 7), the second fitting plane is the fitting plane of the perforation model bottom data (as shown by reference numeral 11 in fig. 7), and the above steps have resulted in the spatial plane equation of the first fitting planeBy using the same procedure, the spatial plane equation of the second fitting plane can be obtained +.>Randomly selecting M points in the first fitting plane>Calculating the average distance from any point to the second fitting planeH b :
Randomly selecting N points in a second fitting planeThe average distance from any point to the fitting plane 1 is calculatedH i :
Depth is determined according to the followingH d :
In the embodiment, finally, the radius of the perforation model to be measured is 0.5mm and the depth value is 1.6mm by space circle fitting based on a linear regression model; the measured values obtained by direct measurement are 0.492105mm and 1.58641mm; by contrast, the relative accuracy of the two is up to 98% and 99%, the relative error of the accuracy is not more than 1% at maximum, and the measurement error accuracy reaches the micron level, so that the measured three-dimensional point cloud data is very real and is close to the shape of a real object. Through experiments, the requirements of the accuracy and the precision can meet the requirements.
In the invention, the perforation model radius depth measurement system based on spectral confocal comprises a spectral confocal sensor, a probe, a three-dimensional moving device (namely an XYZ axis moving controller) and a computer, wherein an executable program, an instruction input module, a data acquisition module, a point cloud data display module, a point cloud processing module and a data output module are arranged in the computer. According to the invention, the measuring system and the measuring method are utilized to scan and collect the perforation model to obtain three-dimensional point cloud data, the three-dimensional point cloud processing technology is utilized to perform denoising filtering, point cloud segmentation and the like on the data, and finally the radius and depth data of the perforation model are obtained through space circle fitting based on the linear regression model.
The method utilizes the spectral confocal imaging technology to measure the radius and depth of the perforation model, improves the measurement speed and precision, is stable and efficient, greatly reduces the consumption of manpower and material resources and saves the cost. The method and the device start to collect the outline data of the perforation model, dynamically acquire the radius and depth values of the workpiece, display the point cloud of the perforation model in a three-dimensional mode, read the model and compare the model, and have clear and visual whole process.
It should be noted that the above is only for illustrating the design idea and features of the present embodiment, and it should be understood by those skilled in the art that the above description is improved or implemented, and all the improvements or modifications according to the present invention should be within the scope of the claims of the present invention.
Claims (7)
1. The system for measuring the radius and depth of the perforation model is characterized by comprising a three-dimensional moving device, a spectral confocal sensor and a computer; the three-dimensional moving device comprises a transverse moving plate, a longitudinal moving plate and a vertical moving frame; the perforation model to be measured is fixed on a transverse moving plate, the transverse moving plate is arranged on a longitudinal moving plate, and the longitudinal moving plate is arranged on a measuring platform; the vertical moving frame is L-shaped, a spectral confocal sensor is fixed at the horizontal end of the vertical moving frame, and a probe of the spectral confocal sensor is vertically downward; the spectral confocal sensor and the three-dimensional moving device are respectively connected with a computer, and the computer can control the transverse moving plate, the longitudinal moving plate and the vertical moving frame of the three-dimensional moving device to move.
2. A method for measuring radius and depth of a perforation model, which is characterized by comprising the following steps:
s1: constructing a perforation model radius and depth measurement system as claimed in claim 1, establishing a three-dimensional rectangular coordinate system, and scanning the perforation model by using a probe of the perforation model radius and depth measurement system to obtain three-dimensional point cloud data of the perforation model;
s2: performing operation processing of invalid point removal, point cloud filtering denoising and point cloud segmentation on the three-dimensional point cloud data, and updating the three-dimensional point cloud data;
s3: fitting the space plane equation where the three-dimensional point cloud data obtained in the step S2 are located with a space circle of the space circle center, solving a linear model by using a least square method to substitute the linear model into the space circle equation, obtaining radius value data of the perforation model at the position, and calculating depth value data.
3. The method for measuring radius and depth of perforation model as set forth in claim 2, wherein the specific calculation method of the radius value data in S3 is:
fitting a space plane equation where the top data of the perforation model are located with a space circle of a space circle center, solving a linear regression model by using a least square method, substituting the linear regression model into the space circle equation, and obtaining the radius of the perforation model; the spatial circle fitting method based on the linear regression model is as follows:
(1) General formula defining space plane equation, wherein />、/>、/>Three components of the plane normal vector;
(3) Formula of normal vector, wherein />Representing the cross product of the vector, substituting the three random points to +.>, wherein />Namely normal vector->Is included in the three components of (a);
(4) Optionally select one pointCalculating a spatial plane equation by using a point French formula:
it is further possible to obtain:
thus, the coefficients of the spatial plane equation are:
thus, the spatial plane equation is:
wherein R is the radius of the space circle;
(6) Three points selected from the second step N timesSubstituting into the space round equation to obtain the following equation:
and (3) finishing to obtain:
(7) Establishing a coefficient equation:
(9) And taking the distance from each point on the point cloud set to the circle center as a dependent variable, taking the coordinates of the sample points as independent variables, and establishing a linear regression model: for each pointDistance to center of circled i Can be expressed as:
(10) Squaring the distance from each point to the center of the circleAs dependent variables, the coordinates of the individual points are independent variables, a design matrix is constructed>And response vector->:
wherein Representing the number of sample points, +.>>4;/>The first column is 1, and corresponds to the intercept in the linear regression model;
(11) Solving a linear regression model by using a least square method:
wherein ,representing model parameters->Representing the error, using least square method to find the parameter vector +.>;/>By->The composition is the coefficient of the linear regression model;
according to the sample points, a linear equation set can be obtained, the equation set is solved, and radius R data are obtained;
(13) And obtaining depth data of the perforation model by using a method of averaging the distances from the points to the space planes.
4. A method for measuring radius and depth of a perforation model as claimed in claim 3, wherein the specific method of S3 (13) is as follows:
the first fitting plane is the fitting plane of the perforation model top data, the second fitting plane is the fitting plane of the perforation model bottom data, the space plane equation of step S3 (1)Equation for the first fitting plane, wherein +.>、/>、/>The spatial plane equation of the second fitting plane is obtained by the same method for the three components of the normal vector of the plane>, wherein />、/>、/>Three components of the plane normal vector;
randomly selecting M points in a first fitting planeCalculating the average distance from any point to the second fitting planeH b :
Randomly selecting N points in a second fitting planeCalculating the average distance between any point and the first fitting planeH i :
Depth is determined according to the followingH d :
5. The perforation pattern radius, depth measurement method according to claim 2, wherein the specific method of S2 is:
s21: removing invalid points with Z-axis coordinates of 0 from initial three-dimensional point cloud data, and filtering noise points in a Z-axis interval and an X-axis interval by setting parameter values of a filtering direction and upper and lower filtering limits by using a distance filtering algorithm to obtain smooth three-dimensional point cloud data;
s22: obtaining a plurality of different point cloud cluster groups from the smoothed three-dimensional point cloud data by utilizing a point cloud segmentation algorithm, and differentiating the point cloud cluster groups by adopting different colors;
s23: and updating the segmented point cloud data.
6. The method for measuring radius and depth of perforation model as set forth in claim 2, wherein in S22, a different distance segmentation algorithm is adopted, and the specific steps are as follows:
(1) Defining a set of point clouds, wherein />Indicate->Coordinates of individual points in three-dimensional spaceI takes on the values 1,2, …, n, n representing the number of sample points in the point cloud;
(2) Randomly selecting N starting pointsAs a center point;at->Constructing KD-Tree nearby, and finding each point by KD-Tree neighbor search algorithm>Nearby k points> The method comprises the steps of carrying out a first treatment on the surface of the Will->Corresponding k neighbor points join the aggregation cluster +.>In (a) and (b); assume that a certain neighbor is +>The coordinates are +.>,/>And->Distance betweend ij The method comprises the following steps:
average distance of all center points is averaged as threshold valueD ave :
recalculating sample pointsAnd get Convergence->Average value of the distances between the sample pointsD:
(4) Will beAnd->Threshold value is compared, if-></>Sample Point +.>Adding original aggregation cluster->And otherwise, the cluster is classified into a new cluster;
(5) Repeating the steps (3) - (4) until no more distance existsLess than->Representing that the cluster is complete;
(6) Selecting a new clustering center again, and repeating the steps (2) - (5) until no new clustering points are generated;
(7) And distinguishing the cloud clusters of each point by adopting different colors.
7. The perforation pattern radius, depth measurement method according to claim 2, wherein S1 comprises the steps of:
s11: building a radius and depth measuring system of the perforation model;
s12: controlling a three-dimensional moving device to drive a probe to scan a perforation model to be tested, dividing white light emitted by the probe into continuous wavelength spectrums, focusing each wavelength on the upper outer surface of the perforation model to form rectangular light spots perpendicular to a focal plane, and starting scanning and collecting the model and forming three-dimensional point cloud data;
s13: the probe scans and collects outline data of the perforation model, and a system interface of the computer displays three-dimensional point cloud data of the perforation model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310624915.9A CN116336953B (en) | 2023-05-30 | 2023-05-30 | System and method for measuring radius and depth of perforation model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310624915.9A CN116336953B (en) | 2023-05-30 | 2023-05-30 | System and method for measuring radius and depth of perforation model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116336953A true CN116336953A (en) | 2023-06-27 |
CN116336953B CN116336953B (en) | 2023-08-11 |
Family
ID=86882692
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310624915.9A Active CN116336953B (en) | 2023-05-30 | 2023-05-30 | System and method for measuring radius and depth of perforation model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116336953B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060268286A1 (en) * | 2005-05-25 | 2006-11-30 | Hong-Xi Cao | Apparatus and method for measuring displacement, surface profile and inner radius |
CN103411555A (en) * | 2013-08-15 | 2013-11-27 | 哈尔滨工业大学 | Parallel confocal annular microstructure measurement device and method based on linear array angular spectrum illumination |
CN105004274A (en) * | 2015-07-07 | 2015-10-28 | 深圳大学 | Cylindrical surface radius measuring method based on three-dimensional vision |
CN106871782A (en) * | 2017-01-20 | 2017-06-20 | 浙江大学 | A kind of method for calculating multispectral image polishing wax radiometer measurement region |
CN107798703A (en) * | 2016-08-30 | 2018-03-13 | 成都理想境界科技有限公司 | A kind of realtime graphic stacking method and device for augmented reality |
CN107798702A (en) * | 2016-08-30 | 2018-03-13 | 成都理想境界科技有限公司 | A kind of realtime graphic stacking method and device for augmented reality |
CN108844522A (en) * | 2018-06-26 | 2018-11-20 | 北京市政建设集团有限责任公司 | A kind of shield tunnel section center extraction method based on 3 D laser scanning |
CN111238383A (en) * | 2020-01-21 | 2020-06-05 | 武汉工程大学 | Colloid three-dimensional reconstruction and thickness measurement method and system based on spectrum confocal |
WO2020225411A1 (en) * | 2019-05-08 | 2020-11-12 | Carl Zeiss Smt Gmbh | Method for three-dimensionally determining an aerial image of a lithography mask |
CN112082491A (en) * | 2020-09-11 | 2020-12-15 | 苏州杰锐思智能科技股份有限公司 | Height detection method based on point cloud |
CN112902872A (en) * | 2021-03-17 | 2021-06-04 | 武汉工程大学 | Bearing inner hole measuring device and method based on laser sensor |
CN115112044A (en) * | 2022-06-10 | 2022-09-27 | 南京理工大学 | Wheel set size measurement method based on light spot cloud data of multi-line structure |
-
2023
- 2023-05-30 CN CN202310624915.9A patent/CN116336953B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060268286A1 (en) * | 2005-05-25 | 2006-11-30 | Hong-Xi Cao | Apparatus and method for measuring displacement, surface profile and inner radius |
CN103411555A (en) * | 2013-08-15 | 2013-11-27 | 哈尔滨工业大学 | Parallel confocal annular microstructure measurement device and method based on linear array angular spectrum illumination |
CN105004274A (en) * | 2015-07-07 | 2015-10-28 | 深圳大学 | Cylindrical surface radius measuring method based on three-dimensional vision |
CN107798703A (en) * | 2016-08-30 | 2018-03-13 | 成都理想境界科技有限公司 | A kind of realtime graphic stacking method and device for augmented reality |
CN107798702A (en) * | 2016-08-30 | 2018-03-13 | 成都理想境界科技有限公司 | A kind of realtime graphic stacking method and device for augmented reality |
CN106871782A (en) * | 2017-01-20 | 2017-06-20 | 浙江大学 | A kind of method for calculating multispectral image polishing wax radiometer measurement region |
CN108844522A (en) * | 2018-06-26 | 2018-11-20 | 北京市政建设集团有限责任公司 | A kind of shield tunnel section center extraction method based on 3 D laser scanning |
WO2020225411A1 (en) * | 2019-05-08 | 2020-11-12 | Carl Zeiss Smt Gmbh | Method for three-dimensionally determining an aerial image of a lithography mask |
CN111238383A (en) * | 2020-01-21 | 2020-06-05 | 武汉工程大学 | Colloid three-dimensional reconstruction and thickness measurement method and system based on spectrum confocal |
CN112082491A (en) * | 2020-09-11 | 2020-12-15 | 苏州杰锐思智能科技股份有限公司 | Height detection method based on point cloud |
CN112902872A (en) * | 2021-03-17 | 2021-06-04 | 武汉工程大学 | Bearing inner hole measuring device and method based on laser sensor |
CN115112044A (en) * | 2022-06-10 | 2022-09-27 | 南京理工大学 | Wheel set size measurement method based on light spot cloud data of multi-line structure |
Non-Patent Citations (2)
Title |
---|
张志荣: "基于光谱共焦系统的三维点云数据处理", 信息科技, no. 2, pages 49 - 76 * |
潘国荣: "空间圆形物体数据拟合新方法", 大地测量与地球动力学, vol. 28, no. 2, pages 92 - 94 * |
Also Published As
Publication number | Publication date |
---|---|
CN116336953B (en) | 2023-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103712555B (en) | Automotive frame pilot hole vision on-line measurement system and method thereof | |
CN105783723B (en) | Precision die surface processing accuracy detection device and method based on machine vision | |
CN102840829B (en) | Manual mark-basedsystem and manual mark-based method for measuring displacement field inside high temperature object area | |
CN112629441B (en) | 3D curved surface glass contour scanning detection method and system | |
CN112697058A (en) | Machine vision-based large-size plate assembly gap on-line measurement system and method | |
CN112001917A (en) | Machine vision-based geometric tolerance detection method for circular perforated part | |
JP2004078659A (en) | Pattern contour extraction method, image processing method, pattern edge retrieval method, probe scanning method, production method of semiconductor device, pattern inspection device and program | |
CN107796718A (en) | Brineling system and method | |
CN111102928A (en) | Calibration system and method for detecting hard spots of contact net | |
CN116336953B (en) | System and method for measuring radius and depth of perforation model | |
CN113155023B (en) | Method and system for measuring glass warping degree of liquid crystal substrate | |
CN116399241B (en) | Patch type inductance geometric parameter measurement method and system | |
Audfray et al. | A novel approach for 3D part inspection using laser-plane sensors | |
CN115791801A (en) | 3D glass on-line monitoring platform based on machine vision | |
CN116907381A (en) | Semiconductor wafer BUMP three-dimensional morphology measurement method | |
CN102183206A (en) | Line width measuring method for line on printed circuit board (PCB) | |
CN115035071A (en) | Visual detection method for black spot defect of PAD light guide plate | |
CN110411380B (en) | Non-contact surface roughness measurement method based on wavelet packet texture analysis | |
CN114034471A (en) | Method for measuring laser light path profile | |
Hong et al. | An AFM-based methodology for planar size and local 3D parameters of large workpieces | |
CN107289882A (en) | A kind of tooth-implanting flaw and roughness detecting method | |
CN106548474A (en) | A kind of micro-structure surface detection method | |
CN113340215A (en) | On-line measurement method for inter-plane offset based on parallel constraint | |
CN105890531A (en) | Precision communication relay contact spacing detection method based on sensor imaging system | |
CN109540745A (en) | A kind of precision Morphology observation system and detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |