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 PDF

Info

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
Application number
CN202310624915.9A
Other languages
Chinese (zh)
Other versions
CN116336953B (en
Inventor
洪汉玉
周健
章秀华
张晓庆
夏康
张志荣
高耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Institute of Technology
Original Assignee
Wuhan Institute of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Institute of Technology filed Critical Wuhan Institute of Technology
Priority to CN202310624915.9A priority Critical patent/CN116336953B/en
Publication of CN116336953A publication Critical patent/CN116336953A/en
Application granted granted Critical
Publication of CN116336953B publication Critical patent/CN116336953B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/08Measuring arrangements characterised by the use of optical techniques for measuring diameters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/22Measuring arrangements characterised by the use of optical techniques for measuring depth
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range 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

System and method for measuring radius and depth of perforation model
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
Figure SMS_1
, wherein />
Figure SMS_2
、/>
Figure SMS_3
、/>
Figure SMS_4
Three components of the plane normal vector;
(2) Point cloud data set after segmentation
Figure SMS_5
Figure SMS_6
Three points are taken at will N times
Figure SMS_7
、/>
Figure SMS_8
、/>
Figure SMS_9
(3) Formula of normal vector
Figure SMS_10
, wherein />
Figure SMS_11
Representing the cross product of the vector, substituting the three random points to +.>
Figure SMS_12
, wherein
Figure SMS_13
Namely normal vector->
Figure SMS_14
Is included in the three components of (a);
(4) Optionally select one point
Figure SMS_15
Calculating a spatial plane equation by using a point French formula:
Figure SMS_16
it is further possible to obtain:
Figure SMS_17
thus, the coefficients of the spatial plane equation are:
Figure SMS_18
thus, the spatial plane equation is:
Figure SMS_19
(5) Assuming that the center of a space circle is
Figure SMS_20
The general equation for a space circle is:
Figure SMS_21
wherein R is the radius of the space circle;
(6) Three points selected from the second step N times
Figure SMS_22
Substituting into the space round equation to obtain the following equation:
Figure SMS_23
and (3) finishing to obtain:
Figure SMS_24
(7) Establishing a coefficient equation:
Figure SMS_25
(8) The space center coordinates can be obtained by a coefficient equation
Figure SMS_26
(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 point
Figure SMS_27
Distance to center of circled i Can be expressed as:
Figure SMS_28
i.e. the
Figure SMS_29
In the above
Figure SMS_30
Representation dot->
Figure SMS_31
Coordinates of->
Figure SMS_32
Is the center coordinates;
(10) Squaring the distance from each point to the center of the circle
Figure SMS_33
As dependent variables, the coordinates of the individual points are independent variables, a design matrix is constructed>
Figure SMS_34
And response vector->
Figure SMS_35
Figure SMS_36
wherein
Figure SMS_37
Representing the number of sample points, +.>
Figure SMS_38
>4;/>
Figure SMS_39
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:
Figure SMS_40
wherein ,
Figure SMS_41
representing model parameters->
Figure SMS_42
Representing the error, and obtaining the parameter vector by the least square method
Figure SMS_43
;/>
Figure SMS_44
By->
Figure SMS_45
The composition is the coefficient of the linear regression model;
(12) Will be linear regression model
Figure SMS_46
Substituting into a space circle equation to obtain:
Figure SMS_47
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)
Figure SMS_49
Equation for the first fitting plane, wherein +.>
Figure SMS_52
、/>
Figure SMS_54
、/>
Figure SMS_50
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>
Figure SMS_53
, wherein />
Figure SMS_55
、/>
Figure SMS_56
、/>
Figure SMS_48
Three components of the plane normal vector; randomly selecting M points in the first fitting plane +.>
Figure SMS_51
Calculating the average distance from any point to the second fitting planeH b :
Figure SMS_57
Randomly selecting N points in a second fitting plane
Figure SMS_58
Calculating the average distance between any point and the first fitting planeH i
Figure SMS_59
Depth is determined according to the followingH d
Figure SMS_60
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
Figure SMS_61
, wherein />
Figure SMS_62
Indicate->
Figure SMS_63
Coordinates of the individual points in three-dimensional space +.>
Figure SMS_64
I takes on the values 1,2, …, n, n representing the number of sample points in the point cloud;
(2) Randomly selecting N starting points
Figure SMS_67
As a center point; at->
Figure SMS_70
Constructing KD-Tree nearby, and finding each point by KD-Tree neighbor search algorithm>
Figure SMS_73
Nearby k points>
Figure SMS_66
Figure SMS_69
The method comprises the steps of carrying out a first treatment on the surface of the Will->
Figure SMS_72
Corresponding k neighbor points join the cluster
Figure SMS_75
In (a) and (b); assume that a certain neighbor is +>
Figure SMS_65
The coordinates are +.>
Figure SMS_68
,/>
Figure SMS_71
And->
Figure SMS_74
Distance betweend ij The method comprises the following steps:
Figure SMS_76
aggregation cluster
Figure SMS_77
Middle adjacent point to->
Figure SMS_78
Average distance of (2)d ave The formula of (2) is:
Figure SMS_79
flattening all center pointsAverage distance averaging as thresholdD ave
Figure SMS_80
(4) For a new sample point
Figure SMS_81
Calculate it to the cluster +.>
Figure SMS_82
Each sample point in (a)X i Distance of->
Figure SMS_83
Figure SMS_84
wherein
Figure SMS_85
Taking an identity matrix as an inverse matrix of the covariance matrix;
recalculating sample points
Figure SMS_86
And get Convergence->
Figure SMS_87
Average value of the distances between the sample pointsD
Figure SMS_88
(4) Will be
Figure SMS_89
And->
Figure SMS_90
Threshold value is compared, if->
Figure SMS_91
</>
Figure SMS_92
Sample Point +.>
Figure SMS_93
Adding original aggregation cluster->
Figure SMS_94
And otherwise, the cluster is classified into a new cluster;
(5) Repeating the steps (3) - (4) until no more distance exists
Figure SMS_95
Less than->
Figure SMS_96
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
Figure SMS_97
, wherein />
Figure SMS_98
Indicate->
Figure SMS_99
Coordinates of the individual points in three-dimensional space +.>
Figure SMS_100
I takes the values 1,2, …, n, n representing the number of sample points in the point cloud.
(2) Randomly selecting N starting points
Figure SMS_102
As a center point, N is taken as 10; at->
Figure SMS_105
Constructing KD-Tree nearby, and finding each point by KD-Tree neighbor search algorithm>
Figure SMS_108
Nearby k points>
Figure SMS_103
Figure SMS_106
K is 100; will->
Figure SMS_109
Corresponding k neighbor points join the aggregation cluster +.>
Figure SMS_111
In (a) and (b); assume that a certain neighbor is +>
Figure SMS_101
The coordinates are +.>
Figure SMS_104
,/>
Figure SMS_107
And->
Figure SMS_110
Distance betweend ij The method comprises the following steps:
Figure SMS_112
aggregation cluster
Figure SMS_113
Middle adjacent point to->
Figure SMS_114
Average distance of (2)d ave The formula of (2) is:
Figure SMS_115
average distance of all center points is averaged as threshold valueD ave
Figure SMS_116
(5) For a new sample point
Figure SMS_117
Calculate it to the cluster +.>
Figure SMS_118
Each sample point in (a)X i Distance of->
Figure SMS_119
Figure SMS_120
wherein
Figure SMS_121
The inverse of the covariance matrix is here the identity matrix.
Recalculating sample points
Figure SMS_122
And get Convergence->
Figure SMS_123
Average value of the distances between the sample pointsD
Figure SMS_124
(4) Will be
Figure SMS_125
And->
Figure SMS_126
Threshold value is compared, if->
Figure SMS_127
</>
Figure SMS_128
Sample Point +.>
Figure SMS_129
Adding original aggregation cluster->
Figure SMS_130
And otherwise, the cluster is classified into a new cluster;
(5) Repeating the steps (3) - (4) until no more distance exists
Figure SMS_131
Less than->
Figure SMS_132
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
Figure SMS_133
, wherein />
Figure SMS_134
、/>
Figure SMS_135
、/>
Figure SMS_136
Three components of the planar normal vector, respectively.
(2) Point cloud data set after segmentation
Figure SMS_137
Figure SMS_138
Three points are taken at will N times
Figure SMS_139
、/>
Figure SMS_140
、/>
Figure SMS_141
(3) Formula of normal vector
Figure SMS_142
, wherein />
Figure SMS_143
Representing the cross product of the vector, substituting the three random points to +.>
Figure SMS_144
, wherein
Figure SMS_145
Namely normal vector->
Figure SMS_146
Is included in the three components of (a).
(4)、Optionally select one point
Figure SMS_147
Calculating a spatial plane equation by using a point French formula:
Figure SMS_148
it is further possible to obtain:
Figure SMS_149
thus, the coefficients of the spatial plane equation are:
Figure SMS_150
thus, the spatial plane equation is:
Figure SMS_151
(5) Assuming that the center of a space circle is
Figure SMS_152
The general equation for a space circle is:
Figure SMS_153
wherein R is the radius of the space circle.
(6) Three points selected from the second step N times
Figure SMS_154
Into a space circular equation (wherein
Figure SMS_155
,/>
Figure SMS_156
) The following equation is obtained:
Figure SMS_157
and (3) finishing to obtain:
Figure SMS_158
(7) Establishing a coefficient equation:
Figure SMS_159
(8) The space center coordinates can be obtained by a coefficient equation
Figure SMS_160
(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 point
Figure SMS_161
Distance to center of circled i Can be expressed as:
Figure SMS_162
i.e. the
Figure SMS_163
In the above
Figure SMS_164
Representation dot->
Figure SMS_165
Coordinates of->
Figure SMS_166
Is the center coordinates;
(10) Squaring the distance from each point to the center of the circle
Figure SMS_167
As dependent variables, the coordinates of the individual points are independent variables, a design matrix is constructed>
Figure SMS_168
And response vector->
Figure SMS_169
Figure SMS_170
wherein
Figure SMS_171
Representing the number of sample points (+)>
Figure SMS_172
>4);/>
Figure SMS_173
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:
Figure SMS_174
wherein ,
Figure SMS_175
representing model parameters->
Figure SMS_176
Representing the error, and obtaining the parameter vector by the least square method
Figure SMS_177
。/>
Figure SMS_178
By->
Figure SMS_179
The composition is a coefficient of a linear regression model.
(12) Will be linear regression model
Figure SMS_180
Substituting into a space circle equation to obtain:
Figure SMS_181
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 plane
Figure SMS_182
By using the same procedure, the spatial plane equation of the second fitting plane can be obtained +.>
Figure SMS_183
Randomly selecting M points in the first fitting plane>
Figure SMS_184
Calculating the average distance from any point to the second fitting planeH b :
Figure SMS_185
Randomly selecting N points in a second fitting plane
Figure SMS_186
The average distance from any point to the fitting plane 1 is calculatedH i
Figure SMS_187
Depth is determined according to the followingH d
Figure SMS_188
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
Figure QLYQS_1
, wherein />
Figure QLYQS_2
、/>
Figure QLYQS_3
、/>
Figure QLYQS_4
Three components of the plane normal vector;
(2) Point cloud data set after segmentation
Figure QLYQS_5
Figure QLYQS_6
Three points of N times are arbitrarily taken>
Figure QLYQS_7
Figure QLYQS_8
、/>
Figure QLYQS_9
(3) Formula of normal vector
Figure QLYQS_10
, wherein />
Figure QLYQS_11
Representing the cross product of the vector, substituting the three random points to +.>
Figure QLYQS_12
, wherein />
Figure QLYQS_13
Namely normal vector->
Figure QLYQS_14
Is included in the three components of (a);
(4) Optionally select one point
Figure QLYQS_15
Calculating a spatial plane equation by using a point French formula:
Figure QLYQS_16
it is further possible to obtain:
Figure QLYQS_17
thus, the coefficients of the spatial plane equation are:
Figure QLYQS_18
thus, the spatial plane equation is:
Figure QLYQS_19
(5) Assuming that the center of a space circle is
Figure QLYQS_20
The general equation for a space circle is:
Figure QLYQS_21
wherein R is the radius of the space circle;
(6) Three points selected from the second step N times
Figure QLYQS_22
Substituting into the space round equation to obtain the following equation:
Figure QLYQS_23
and (3) finishing to obtain:
Figure QLYQS_24
(7) Establishing a coefficient equation:
Figure QLYQS_25
(8) The space center coordinates can be obtained by a coefficient equation
Figure QLYQS_26
(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 point
Figure QLYQS_27
Distance to center of circled i Can be expressed as:
Figure QLYQS_28
i.e. the
Figure QLYQS_29
In the above
Figure QLYQS_30
Representation dot->
Figure QLYQS_31
Coordinates of->
Figure QLYQS_32
Is the center coordinates;
(10) Squaring the distance from each point to the center of the circle
Figure QLYQS_33
As dependent variables, the coordinates of the individual points are independent variables, a design matrix is constructed>
Figure QLYQS_34
And response vector->
Figure QLYQS_35
Figure QLYQS_36
wherein
Figure QLYQS_37
Representing the number of sample points, +.>
Figure QLYQS_38
>4;/>
Figure QLYQS_39
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:
Figure QLYQS_40
wherein ,
Figure QLYQS_41
representing model parameters->
Figure QLYQS_42
Representing the error, using least square method to find the parameter vector +.>
Figure QLYQS_43
;/>
Figure QLYQS_44
By->
Figure QLYQS_45
The composition is the coefficient of the linear regression model;
(12) Will be linear regression model
Figure QLYQS_46
Substituting into a space circle equation to obtain:
Figure QLYQS_47
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)
Figure QLYQS_49
Equation for the first fitting plane, wherein +.>
Figure QLYQS_52
、/>
Figure QLYQS_54
、/>
Figure QLYQS_50
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>
Figure QLYQS_51
, wherein />
Figure QLYQS_53
、/>
Figure QLYQS_55
、/>
Figure QLYQS_48
Three components of the plane normal vector;
randomly selecting M points in a first fitting plane
Figure QLYQS_56
Calculating the average distance from any point to the second fitting planeH b
Figure QLYQS_57
Randomly selecting N points in a second fitting plane
Figure QLYQS_58
Calculating the average distance between any point and the first fitting planeH i
Figure QLYQS_59
Depth is determined according to the followingH d
Figure QLYQS_60
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
Figure QLYQS_61
, wherein />
Figure QLYQS_62
Indicate->
Figure QLYQS_63
Coordinates of individual points in three-dimensional space
Figure QLYQS_64
I takes on the values 1,2, …, n, n representing the number of sample points in the point cloud;
(2) Randomly selecting N starting points
Figure QLYQS_67
As a center point;at->
Figure QLYQS_69
Constructing KD-Tree nearby, and finding each point by KD-Tree neighbor search algorithm>
Figure QLYQS_72
Nearby k points>
Figure QLYQS_66
Figure QLYQS_70
The method comprises the steps of carrying out a first treatment on the surface of the Will->
Figure QLYQS_73
Corresponding k neighbor points join the aggregation cluster +.>
Figure QLYQS_75
In (a) and (b); assume that a certain neighbor is +>
Figure QLYQS_65
The coordinates are +.>
Figure QLYQS_68
,/>
Figure QLYQS_71
And->
Figure QLYQS_74
Distance betweend ij The method comprises the following steps:
Figure QLYQS_76
aggregation cluster
Figure QLYQS_77
Middle adjacent point to->
Figure QLYQS_78
Average distance of (2)d ave The formula of (2) is:
Figure QLYQS_79
average distance of all center points is averaged as threshold valueD ave
Figure QLYQS_80
(3) For a new sample point
Figure QLYQS_81
Calculate it to the cluster +.>
Figure QLYQS_82
Each sample point in (a)X i Distance of->
Figure QLYQS_83
Figure QLYQS_84
wherein
Figure QLYQS_85
Taking an identity matrix as an inverse matrix of the covariance matrix;
recalculating sample points
Figure QLYQS_86
And get Convergence->
Figure QLYQS_87
Average value of the distances between the sample pointsD
Figure QLYQS_88
(4) Will be
Figure QLYQS_89
And->
Figure QLYQS_90
Threshold value is compared, if->
Figure QLYQS_91
</>
Figure QLYQS_92
Sample Point +.>
Figure QLYQS_93
Adding original aggregation cluster->
Figure QLYQS_94
And otherwise, the cluster is classified into a new cluster;
(5) Repeating the steps (3) - (4) until no more distance exists
Figure QLYQS_95
Less than->
Figure QLYQS_96
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.
CN202310624915.9A 2023-05-30 2023-05-30 System and method for measuring radius and depth of perforation model Active CN116336953B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (12)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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