CN116804532B - 3D measurement method for distance between parallel line segments - Google Patents
3D measurement method for distance between parallel line segments Download PDFInfo
- Publication number
- CN116804532B CN116804532B CN202311072473.8A CN202311072473A CN116804532B CN 116804532 B CN116804532 B CN 116804532B CN 202311072473 A CN202311072473 A CN 202311072473A CN 116804532 B CN116804532 B CN 116804532B
- Authority
- CN
- China
- Prior art keywords
- straight line
- point
- fitting straight
- fitting
- point set
- 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.)
- Active
Links
- 238000000691 measurement method Methods 0.000 title claims description 7
- 238000000034 method Methods 0.000 claims abstract description 45
- 230000005484 gravity Effects 0.000 claims abstract description 40
- 238000005259 measurement Methods 0.000 claims abstract description 22
- 238000005070 sampling Methods 0.000 claims abstract description 4
- 238000006467 substitution reaction Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 6
- 238000003064 k means clustering Methods 0.000 claims description 4
- 238000012216 screening Methods 0.000 claims description 3
- 238000003384 imaging method Methods 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 7
- 238000011161 development Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The application discloses a 3D measuring method for distance between parallel line segments, which comprises the following steps: dividing two target line segments into a point set a 1 Point set a 2 The method comprises the steps of carrying out a first treatment on the surface of the Removing noise points by random sampling consistency algorithm to obtain point set a 1 ' Point set a 2 'A'; the point set a is aligned by a least square method 1 ' Point set a 2 ' straight line fitting, obtaining a fitting straight line l 1 Fitting straight line l 2 The method comprises the steps of carrying out a first treatment on the surface of the Calculate a fitting straight line l 1 Fitting straight line l 2 An included angle with the X axis and an included angle between the X axis and the X axis; calculate a fitting straight line l 1 Fitting straight line l 2 A gravity center point W and a gravity center point Y coordinate corresponding to the target line segment; fitting straight line l 1 Fitting straight line l 2 Respectively rotates around the gravity center point W and the gravity center point Y to obtain a parallel fitting straight line l 1 ' fitting straight line l 2 'A'; calculate a fitting straight line l 1 ' upper point M to fit straight line l 2 'distance'. The application can eliminate the measurement error caused by external factors during the measurement of the parallel line segments, so as to ensure the accuracy and stability of the measurement.
Description
Technical Field
The application relates to the technical field of 3D measurement, in particular to a 3D measurement method for distance between parallel line segments.
Background
Along with the development of 3D vision measurement technology and the popularization of stereoscopic vision cameras, the acquisition of three-dimensional data of an object becomes very convenient, and the 3D vision technology is also more and more widely applied to the research and development of automatic production equipment. The 3D visual detection technology can identify the spatial stereo position and surface information of the object, and is not easily influenced by environmental conditions. In recent years, development and popularization of three-dimensional sensors such as laser radar, three-dimensional scanner, depth camera, and the like have made acquisition of three-dimensional data easier, which has promoted rapid development of 3D vision technology. Because the line laser 3D vision measurement technology has the advantages of non-contact, high efficiency, low cost and the like, the line laser 3D vision measurement technology is widely applied to the measurement process of height, thickness, width, radius, flatness, angle, position, shape and the like at present, and particularly for the distance measurement between parallel line segments at different spatial positions on a workpiece, the measurement process is more and more simple due to the popularization of the line laser 3D vision measurement technology.
However, due to the influence of different factors, such as processing errors of a workpiece to be measured, camera lens distortion, reconstruction errors and the like, two line segments reconstructed and imaged in a camera lens of the parallel line segment to be measured are not completely parallel, so that measurement is inaccurate, and difficulty is brought to actual measurement of the distance between the parallel line segments.
In order to facilitate accurate distance measurement of parallel line segments, the parallel line segments to be measured need to be corrected into parallel line segments, and then distance measurement is performed to eliminate error influence.
Disclosure of Invention
The application aims to provide a 3D measuring method for the distance between parallel line segments, which is used for correcting the parallel line segments to be measured which are not completely parallel into the parallel line segments and then measuring the distance, so as to eliminate the measuring error caused by the condition that the parallel line segments are not completely parallel due to external factors when the distance between the parallel line segments is measured in the prior art.
In order to achieve the aim of the application, the application adopts the following technical scheme:
A3D measuring method for the distance between parallel line segments comprises the following steps:
step S1: imaging two target line segments in a coordinate system of a camera, and marking the coordinate system of the camera as a coordinate system XOZ, wherein an X axis is a transverse axis, a Z axis is a longitudinal axis, and O is a coordinate system origin;
step S2: effective area screening is carried out on the two target line segments, the two target line segments are respectively divided into two point sets, and the two point sets are respectively marked as point set a 1 Point set a 2 ;
Step S3: the point sets a are respectively aligned by a random sampling consistency algorithm 1 Point set a 2 Processing is carried out to remove the point set a 1 Point set a 2 Noise points within to obtain a set of points a 1 ' Point set a 2 ’;
Step S4: the point set a is aligned by a least square method 1 ' fitting a straight line to obtain a fitted straight line l 1 :A 1 X+B 1 Z+C 1 =0, and pair point set a by least square method 2 ' fitting a straight line to obtain a fitted straight line l 2 :A 2 X+B 2 Z+C 2 =0;
Step S5: calculate a fitting straight line l 1 Included angle theta with X axis 1 Calculating a fitting straight line l 2 Included angle theta with X axis 2 According to the included angle theta 1 Included angle theta 2 Calculate a fitting straight line l 1 And a fitting straight line l 2 Included angle theta between 12 ;
Step S6: calculate a fitting straight line l 1 Coordinates (X) of the center of gravity point W of the corresponding target line segment in the coordinate system XOZ W ,Z W ) Calculating a fitting straight line l 2 Coordinates (X) of the center of gravity point Y of the corresponding target line segment in the coordinate system XOZ Y ,Z Y );
Step S7: will fit straight line l 1 Rotate θ around the center of gravity point W 12 Obtaining a fitting straight line l by/2 1 ' and will fit a straight line l 2 Rotate θ around the center of gravity point Y 12 Obtaining a fitting straight line l by/2 2 ' fitting straight line l 1 ' fitting straight line l 2 'parallel';
step S8: taking a fitting straight line l 1 ' last point M, calculate point M to fit straight line l 2 The distance d is the distance between the two target segments.
Further, the step S3 specifically includes the following steps:
step S31: point set a 1 The method comprises the steps of dividing an inner point group and an outer point group, wherein the inner points of the inner point group are data to be fitted which accords with a linear model, the outer points of the outer point group are noise data which does not accord with the linear model, and collecting points a 1 The inner point group of (a) is marked as point set a 1 ’;
Step S32: point set a 2 Is divided into an inner point group and an outer point group, whereinThe inner points of the inner point group are data to be fitted which accords with the linear model, the outer points of the outer point group are noise data which does not accord with the linear model, and the point set a is obtained 2 The inner point group of (a) is marked as point set a 2 ’。
Further, the step S5 specifically includes the following steps:
step S51: calculate a fitting straight line l 1 Included angle theta with X axis 1 =cot(A 1 /B 1 );
Step S52: calculate a fitting straight line l 2 Included angle theta with X axis 2 =cot(A 2 /B 2 );
Step S53: calculate a fitting straight line l 1 And a fitting straight line l 2 Included angle theta between 12 =(θ 1 -θ 2 )。
Further, the step S6 specifically includes the following steps:
step S61: point set a 1 ' comprising n interior points, point set a 1 ' expressed as { (X) 1 ,Z 1 ),(X 2 ,Z 2 ),...,(X n ,Z n ) Computing the point set a } 1 The coordinates of the center of gravity point W in the coordinate system XOZ are:
W=(∑(X 1 +X 2 +...+X n )/n,∑(Z 1 +Z 2 +...+Z n )/n)=(X W ,Z W );
step S62: point set a 2 ' comprising m interior points, point set a 2 ' expressed as { (X) 1 ,Z 1 ),(X 2 ,Z 2 ),...,(X m ,Z m ) Computing the point set a } 2 The coordinates of the' barycentric point Y in the coordinate system XOZ are:
Y=(∑(X 1 +X 2 +...+X m )/m,∑(Z 1 +Z 2 +...+Z m )/m)=(X Y ,Z Y )。
further, the step S7 specifically includes:
will fit straight line l 1 Rotate θ around the center of gravity point W 12 Obtaining a fitting straight line l by/2 1 ' fitting straight line l 1 ' included angle with X-axisThe method comprises the following steps: θ 1 '=(θ 1 -θ 12 /2)=(θ 1 +θ 2 ) 2, fitting straight line l 2 Rotate θ around the center of gravity point Y 12 Obtaining a fitting straight line l by/2 2 ' fitting straight line l 2 The angle between the' and X axis is: θ 2 '=(θ 2 +θ 12 /2)=(θ 1 +θ 2 )/2,θ 1 '=θ 2 ' fitting straight line l 1 ' fitting straight line l 2 'parallel'.
Further, the step S8 specifically includes the following steps:
step S81: record a fitting straight line l 1 The' point-oblique equation is z=kx+b 1 Coordinates (X) of the center of gravity point W W ,Z W ) Substitution z=kx+b 1 In (1) obtaining a fitting straight line l 1 Ordinate b of' intersection with Z axis 1 =(Z W -k×X W );
Step S82: record a fitting straight line l 2 The' point-oblique equation is z=kx+b 2 Coordinates (X) of the center of gravity point Y Y ,Z Y ) Substitution z=kx+b 2 In (1) obtaining a fitting straight line l 2 Ordinate b of' intersection with Z axis 2 =(Z Y -k×X Y );
Step S83: taking a point M, and recording the coordinates of the point M in a coordinate system XOZ as (X M ,Z M );
Step S84: let X M =0, X M =0 substitution into the fitting line l 1 The' point-oblique equation is z=kx+b 1 Z is obtained from M =k×0+b 1 =b 1 I.e. points M (0, b 1 ) To fit straight line l 1 Points on';
step S85: calculate the point M (0, b) 1 ) To a fitting straight line l 2 The distance d of' is:
further, in the step S2, two target line segments are adaptively segmented into two point sets by using a clustering method.
Further, the clustering method is a k-means clustering method.
Compared with the prior art, the application has the beneficial effects that:
the 3D measuring method for the distance between parallel line segments can eliminate measuring errors caused by incomplete parallelism after the parallel line segments are reconstructed in a camera due to external factors such as processing errors of a workpiece to be measured, camera lens distortion, reconstruction errors and the like in the measuring process of the parallel line segments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a 3D measurement method for distance between parallel line segments according to an embodiment of the present application;
FIG. 2 is a fitted straight line l 1 Fitting straight line l 2 Fitting straight line l 1 ' fitting straight line l 2 ' schematic positional relationship.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate an azimuth or a positional relationship based on that shown in the drawings. These terms are only used to better describe the present application and its embodiments and are not intended to limit the scope of the indicated devices, elements or components to the particular orientations or to configure and operate in the particular orientations.
Also, some of the terms described above may be used to indicate other meanings in addition to orientation or positional relationships, for example, the term "upper" may also be used to indicate some sort of attachment or connection in some cases. The specific meaning of these terms in the present application will be understood by those of ordinary skill in the art according to the specific circumstances.
Furthermore, the terms "mounted," "configured," "provided," "connected," "coupled," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; may be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements, or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Referring to fig. 1 and 2, an embodiment of the present application provides a 3D measurement method for a distance between parallel line segments, the 3D measurement method includes the following steps:
step S1: two target line segments are imaged in the coordinate system of the camera, the coordinate system of the camera is noted as coordinate system XOZ, where the X-axis is the horizontal axis, the Z-axis is the vertical axis, and O is the origin of the coordinate system.
In this embodiment, the two target line segments may be two line segments formed after the laser emits laser light to the stepped surface of the workpiece and captured by the camera. The application is not limited in this regard.
Step S2: effective area screening is carried out on the two target line segments, the two target line segments are respectively divided into two point sets, and the two point sets are respectively marked as point set a 1 Point set a 2 。
In step S2, two target line segments are adaptively divided into two point sets by using a clustering method. In this embodiment, the clustering method is a k-means clustering method. The K-means clustering method is a clustering analysis algorithm for iterative solution, and comprises the steps of dividing data into K groups, randomly selecting K objects as initial clustering centers, calculating the distance between each object and each seed clustering center, and distributing each object to the closest clustering center. The cluster centers and the objects assigned to them represent a cluster. For each sample assigned, the cluster center of the cluster is recalculated based on the existing objects in the cluster. This process will repeat until a certain termination condition is met. The termination condition may be that no (or a minimum number of) objects are reassigned to different clusters, no (or a minimum number of) cluster centers are changed again, and the sum of squares of errors is locally minimum. In the prior art, a detailed description is omitted herein.
Step S3: the point sets a are respectively aligned by a random sampling consistency algorithm 1 Point set a 2 Processing is carried out to remove the point set a 1 Point set a 2 Noise points within to obtain a set of points a 1 ' Point set a 2 ’。
In this embodiment, the step S3 specifically includes the following steps:
step S31: point set a 1 The method comprises the steps of dividing an inner point group and an outer point group, wherein the inner points of the inner point group are data to be fitted which accords with a linear model, the outer points of the outer point group are noise data which does not accord with the linear model, and collecting points a 1 The inner point group of (a) is marked as point set a 1 ’;
Step S32: point set a 2 The method comprises the steps of dividing an inner point group and an outer point group, wherein the inner points of the inner point group are data to be fitted which accords with a linear model, the outer points of the outer point group are noise data which does not accord with the linear model, and collecting points a 2 The inner point group of (a) is marked as point set a 2 ’。
Step S4: the point set a is aligned by a least square method 1 ' fitting a straight line to obtain a fitted straight line l 1 :A 1 X+B 1 Z+C 1 =0, and pair point set a by least square method 2 ' fitting a straight line to obtain a fitted straight line l 2 :A 2 X+B 2 Z+C 2 =0。
Step S5: calculate a fitting straight line l 1 Included angle theta with X axis 1 Calculating a fitting straight line l 2 Included angle theta with X axis 2 According to the included angle theta 1 Included angle theta 2 Calculate a fitting straight line l 1 And a fitting straight line l 2 Included angle theta between 12 。
In this embodiment, the step S5 specifically includes the following steps:
step S51: calculate a fitting straight line l 1 Included angle theta with X axis 1 =cot(A 1 /B 1 );
Step S52: calculate a fitting straight line l 2 Included angle theta with X axis 2 =cot(A 2 /B 2 );
Step S53: calculate a fitting straight line l 1 And a fitting straight line l 2 Included angle theta between 12 =(θ 1 -θ 2 )。
Step S6: calculate a fitting straight line l 1 Coordinates (X) of the center of gravity point W of the corresponding target line segment in the coordinate system XOZ W ,Z W ) Calculating a fitting straight line l 2 Coordinates (X) of the center of gravity point Y of the corresponding target line segment in the coordinate system XOZ Y ,Z Y )。
In this embodiment, the step S6 specifically includes the following steps:
step S61: point set a 1 ' comprising n interior points, point set a 1 ' expressed as { (X) 1 ,Z 1 ),(X 2 ,Z 2 ),...,(X n ,Z n ) Computing the point set a } 1 The coordinates of the center of gravity point W in the coordinate system XOZ are:
W=(Σ(X 1 +X 2 +...+X n )/n,∑(Z 1 +Z 2 +...+Z n )/n)=(X W ,Z W );
step S62: point set a 2 ' comprising m interior points, point set a 2 ' expressed as { (X) 1 ,Z 1 ),(X 2 ,Z 2 ),...,(X m ,Z m ) Computing the point set a } 2 The coordinates of the' barycentric point Y in the coordinate system XOZ are:
Y=(∑(X 1 +X 2 +...+X m )/m,∑(Z 1 +Z 2 +...+Z m )/m)=(X Y ,Z Y )。
step S7: will fit straight line l 1 Rotate θ around the center of gravity point W 12 Obtaining a fitting straight line l by/2 1 ' and will fit a straight line l 2 Rotate θ around the center of gravity point Y 12 Obtaining a fitting straight line l by/2 2 ' fitting straight line l 1 ' fitting straight line l 2 'parallel'.
Since the center of gravity point is relatively stable in noise interference, the fitting straight line l is made 1 Fitting straight line l 2 Respectively are provided withRotate around the corresponding gravity center point W and Y to obtain a parallel fitting straight line l 1 ' fitting straight line l 2 ' the precision is high, and the implementation is easy. At the same time due to fitting straight line l 1 ' is a fitting straight line l 1 The rotation around the gravity center point W is obtained, and the gravity center point W is the fitting straight line l 1 Points on' again being the fitting straight line l 1 Points on; fitting straight line l 2 ' fitting straight line l 2 The rotation around the gravity center point Y is obtained, and the gravity center point Y is the fitting straight line l 2 Points on' again being the fitting straight line l 2 Upper point.
In this embodiment, step S7 specifically includes:
will fit straight line l 1 Rotate θ around the center of gravity point W 12 Obtaining a fitting straight line l by/2 1 ' fitting straight line l 1 The angle between the' and X axis is: θ 1 '=(θ 1 -θ 12 /2)=(θ 1 +θ 2 ) 2, fitting straight line l 2 Rotate θ around the center of gravity point Y 12 Obtaining a fitting straight line l by/2 2 ' fitting straight line l 2 The angle between the' and X axis is: θ 2 '=(θ 2 +θ 12 /2)=(θ 1 +θ 2 )2,θ 1 '=θ 2 ' fitting straight line l 1 ' fitting straight line l 2 'parallel'.
Step S8: taking a fitting straight line l 1 ' last point M, calculate point M to fit straight line l 2 The distance d is the distance between the two target segments.
In this embodiment, the step S8 specifically includes the following steps:
step S81: record a fitting straight line l 1 The' point-oblique equation is z=kx+b 1 Coordinates (X) of the center of gravity point W W ,Z W ) Substitution z=kx+b 1 In (1) obtaining a fitting straight line l 1 Ordinate b of' intersection with Z axis 1 =(Z W -k×X W );
Step S82: record a fitting straight line l 2 The' point-oblique equation is z=kx+b 2 Coordinates (X) of the center of gravity point Y Y ,Z Y ) Substitution z=kx+b 2 In (3) obtaining a fitting straight linel 2 Ordinate b of' intersection with Z axis 2 =(Z Y -k×X Y );
Step S83: taking a point M, and recording the coordinates of the point M in a coordinate system XOZ as (X M ,Z M );
Step S84: let X M =0, X M =0 substitution into the fitting line l 1 The' point-oblique equation is z=kx+b 1 Z is obtained from M =k×0+b 1 =b 1 I.e. points M (0, b 1 ) To fit straight line l 1 Points on';
step S85: calculate the point M (0, b) 1 ) To a fitting straight line l 2 The distance d of' is:
point M (0, b) 1 ) To a fitting straight line l 2 The distance d is the distance between the two target segments.
It should be noted that, due to the fitting straight line l 1 Rotated around the center of gravity point W to obtain a fitted straight line l 1 Because of the gravity center point W is also a fitting straight line l 1 ' point on the upper surface, therefore, the coordinates (X W ,Z W ) Substitution z=kx+b 1 The fitting straight line l is obtained 1 The ordinate of the' intersection with the Z axis. Similarly, the gravity center point Y is a fitting straight line l 2 The point on' can be obtained by the coordinates (X Y ,Z Y ) Calculate a fitting straight line l 2 The ordinate of the' intersection with the Z axis.
Compared with the prior art, the application has the beneficial effects that:
the 3D measuring method for the distance between parallel line segments can eliminate measuring errors caused by incomplete parallelism after the parallel line segments are reconstructed in a camera due to external factors such as processing errors of a workpiece to be measured, camera lens distortion, reconstruction errors and the like in the measuring process of the parallel line segments.
Finally, it should be noted that the foregoing description is only a preferred embodiment of the present application, and although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the technical solutions described in the foregoing embodiments, or equivalents may be substituted for some of the technical features thereof, and any modifications, equivalents, improvements or changes thereof may be made without departing from the spirit and principle of the present application.
Claims (8)
1. A 3D measurement method for a distance between parallel line segments, comprising the steps of:
step S1: imaging two target line segments in a coordinate system of a camera, and marking the coordinate system of the camera as a coordinate system XOZ, wherein an X axis is a transverse axis, a Z axis is a longitudinal axis, and O is a coordinate system origin;
step S2: effective area screening is carried out on the two target line segments, the two target line segments are respectively divided into two point sets, and the two point sets are respectively marked as point set a 1 Point set a 2 ;
Step S3: the point sets a are respectively aligned by a random sampling consistency algorithm 1 Point set a 2 Processing is carried out to remove the point set a 1 Point set a 2 Noise points within to obtain a set of points a 1 ' Point set a 2 ’;
Step S4: the point set a is aligned by a least square method 1 ' fitting a straight line to obtain a fitted straight line l 1 :A 1 X+B 1 Z+C 1 =0, and pair point set a by least square method 2 ' fitting a straight line to obtain a fitted straight line l 2 :A 2 X+B 2 Z+C 2 =0;
Step S5: calculate a fitting straight line l 1 Included angle theta with X axis 1 Calculating a fitting straight line l 2 Included angle theta with X axis 2 According to the included angle theta 1 Included angle theta 2 Calculate a fitting straight line l 1 And a fitting straight line l 2 Included angle theta between 12 ;
Step S6: calculate a fitting straight line l 1 Coordinates (X) of the center of gravity point W of the corresponding target line segment in the coordinate system XOZ W ,Z W ) Calculating a fitting straight line l 2 Coordinates (X) of the center of gravity point Y of the corresponding target line segment in the coordinate system XOZ Y ,Z Y );
Step S7: will fit straight line l 1 Rotate θ around the center of gravity point W 12 Obtaining a fitting straight line l by/2 1 ' and will fit a straight line l 2 Rotate θ around the center of gravity point Y 12 Obtaining a fitting straight line l by/2 2 ' fitting straight line l 1 ' fitting straight line l 2 'parallel';
step S8: taking a fitting straight line l 1 ' last point M, calculate point M to fit straight line l 2 The distance d is the distance between the two target segments.
2. A method for 3D measurement of distance between parallel line segments according to claim 1, wherein said step S3 comprises the steps of:
step S31: point set a 1 The method comprises the steps of dividing an inner point group and an outer point group, wherein the inner points of the inner point group are data to be fitted which accords with a linear model, the outer points of the outer point group are noise data which does not accord with the linear model, and collecting points a 1 The inner point group of (a) is marked as point set a 1 ’;
Step S32: point set a 2 The method comprises the steps of dividing an inner point group and an outer point group, wherein the inner points of the inner point group are data to be fitted which accords with a linear model, the outer points of the outer point group are noise data which does not accord with the linear model, and collecting points a 2 The inner point group of (a) is marked as point set a 2 ’。
3. A method for 3D measurement of distance between parallel line segments according to claim 2, wherein said step S5 comprises the steps of:
step S51: calculation ofFitting straight line l 1 Included angle theta with X axis 1 =cot(A 1 /B 1 );
Step S52: calculate a fitting straight line l 2 Included angle theta with X axis 2 =cot(A 2 /B 2 );
Step S53: calculate a fitting straight line l 1 And a fitting straight line l 2 Included angle theta between 12 =(θ 1 -θ 2 )。
4. A method for 3D measurement of distance between parallel line segments according to claim 3, wherein said step S6 comprises the steps of:
step S61: point set a 1 ' comprising n interior points, point set a 1 ' expressed as { (X) 1 ,Z 1 ),(X 2 ,Z 2 ),...,(X n ,Z n ) Computing the point set a } 1 The coordinates of the center of gravity point W in the coordinate system XOZ are:
W=(∑(X 1 +X 2 +...+X n )/n,Σ(Z 1 +Z 2 +...+Z n )/n)=(X W ,Z W );
step S62: point set a 2 ' comprising m interior points, point set a 2 ' expressed as { (X) 1 ,Z 1 ),(X 2 ,Z 2 ),...,(X m ,Z m ) Computing the point set a } 2 The coordinates of the' barycentric point Y in the coordinate system XOZ are:
Y=(∑(X 1 +X 2 +...+X m )/m,∑(Z 1 +Z 2 +...+Z m )/m)=(X Y ,Z Y )。
5. the method for 3D measurement of distance between parallel line segments according to claim 4, wherein said step S7 is specifically:
will fit straight line l 1 Rotate θ around the center of gravity point W 12 Obtaining a fitting straight line l by/2 1 ' fitting straight line l 1 The angle between the' and X axis is: θ 1 '=(θ 1 -θ 12 /2)=(θ 1 +θ 2 ) 2, fitting straight line l 2 Rotate θ around the center of gravity point Y 12 Obtaining a fitting straight line l by/2 2 ' fitting straight line l 2 The angle between the' and X axis is: θ 2 '=(θ 2 +θ 12 /2)=(θ 1 +θ 2 )/2,θ 1 '=θ 2 ' fitting straight line l 1 ' fitting straight line l 2 'parallel'.
6. A method for 3D measurement of distance between parallel line segments according to claim 5, wherein said step S8 comprises the steps of:
step S81: record a fitting straight line l 1 The' point-oblique equation is z=kx+b 1 Coordinates (X) of the center of gravity point W W ,Z W ) Substitution z=kx+b 1 In (1) obtaining a fitting straight line l 1 Ordinate b of' intersection with Z axis 1 =(Z W -k×X W );
Step S82: record a fitting straight line l 2 The' point-oblique equation is z=kx+b 2 Coordinates (X) of the center of gravity point Y Y ,Z Y ) Substitution z=kx+b 2 In (1) obtaining a fitting straight line l 2 Ordinate b of' intersection with Z axis 2 =(Z Y -k×X Y );
Step S83: taking a point M, and recording the coordinates of the point M in a coordinate system XOZ as (X M ,Z M );
Step S84: let X M =0, X M =0 substitution into the fitting line l 1 The' point-oblique equation is z=kx+b 1 Z is obtained from M =k×0+b 1 =b 1 I.e. points M (0, b 1 ) To fit straight line l 1 Points on';
step S85: calculate the point M (0, b) 1 ) To a fitting straight line l 2 The distance d of' is:
7. the method for 3D measurement of distance between parallel line segments according to claim 1, wherein in the step S2, two target line segments are adaptively divided into two point sets by using a clustering method.
8. A method of 3D measurement of distance between parallel line segments as claimed in claim 7, wherein said clustering method is k-means clustering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311072473.8A CN116804532B (en) | 2023-08-24 | 2023-08-24 | 3D measurement method for distance between parallel line segments |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311072473.8A CN116804532B (en) | 2023-08-24 | 2023-08-24 | 3D measurement method for distance between parallel line segments |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116804532A CN116804532A (en) | 2023-09-26 |
CN116804532B true CN116804532B (en) | 2023-11-28 |
Family
ID=88079709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311072473.8A Active CN116804532B (en) | 2023-08-24 | 2023-08-24 | 3D measurement method for distance between parallel line segments |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116804532B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100091383A (en) * | 2009-02-10 | 2010-08-19 | 전남대학교산학협력단 | Correction method of radial distortion based on a line-fitting |
CN107358138A (en) * | 2017-06-07 | 2017-11-17 | 广东正业科技股份有限公司 | Bearing calibration, mobile terminal and the storage device of nonlinear distortion EAN bar codes |
CN107818563A (en) * | 2017-10-26 | 2018-03-20 | 西安工程大学 | A kind of transmission line of electricity bundle spacing space measurement and localization method |
CN109813221A (en) * | 2019-03-05 | 2019-05-28 | 天津工业大学 | The measurement Error Compensation method of heavy steel plate based on controlling filed |
CN111141208A (en) * | 2019-01-09 | 2020-05-12 | 银河水滴科技(北京)有限公司 | Parallel line detection method and device |
CN111242935A (en) * | 2020-01-16 | 2020-06-05 | 安徽工程大学 | Machine vision-based firebrick brick joint image comparison method |
-
2023
- 2023-08-24 CN CN202311072473.8A patent/CN116804532B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100091383A (en) * | 2009-02-10 | 2010-08-19 | 전남대학교산학협력단 | Correction method of radial distortion based on a line-fitting |
CN107358138A (en) * | 2017-06-07 | 2017-11-17 | 广东正业科技股份有限公司 | Bearing calibration, mobile terminal and the storage device of nonlinear distortion EAN bar codes |
CN107818563A (en) * | 2017-10-26 | 2018-03-20 | 西安工程大学 | A kind of transmission line of electricity bundle spacing space measurement and localization method |
CN111141208A (en) * | 2019-01-09 | 2020-05-12 | 银河水滴科技(北京)有限公司 | Parallel line detection method and device |
CN109813221A (en) * | 2019-03-05 | 2019-05-28 | 天津工业大学 | The measurement Error Compensation method of heavy steel plate based on controlling filed |
CN111242935A (en) * | 2020-01-16 | 2020-06-05 | 安徽工程大学 | Machine vision-based firebrick brick joint image comparison method |
Also Published As
Publication number | Publication date |
---|---|
CN116804532A (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110672040B (en) | High-precision rotation angle measuring method based on vision | |
CN102376089B (en) | Target correction method and system | |
CN109035320A (en) | Depth extraction method based on monocular vision | |
CN105486289B (en) | A kind of laser photography measuring system and camera calibration method | |
CN107481284A (en) | Method, apparatus, terminal and the system of target tracking path accuracy measurement | |
CN109579695B (en) | Part measuring method based on heterogeneous stereoscopic vision | |
CN112161574B (en) | Three-dimensional measurement system and measurement method based on divergent multi-line laser projection | |
CN109520436B (en) | Butterfly spring three-dimensional size automatic measurement system based on machine vision and measurement method thereof | |
CN110672020A (en) | Stand tree height measuring method based on monocular vision | |
CN110223355B (en) | Feature mark point matching method based on dual epipolar constraint | |
CN110763204B (en) | Planar coding target and pose measurement method thereof | |
CN103615980A (en) | Method and system for measuring parameters of round holes in plate | |
CN109540040B (en) | Active vision detection system and method based on unconstrained concentric beam family automobile morphology | |
CN106023153B (en) | A kind of method of bubble in measurement water body | |
CN113119129A (en) | Monocular distance measurement positioning method based on standard ball | |
CN108088381A (en) | A kind of contactless minim gap method for measuring width based on image procossing | |
CN111179335A (en) | Standing tree measuring method based on binocular vision | |
CN110146017A (en) | Industrial robot repetitive positioning accuracy measurement method | |
CN115222819A (en) | Camera self-calibration and target tracking method based on multi-mode information reference in airport large-range scene | |
CN113705564B (en) | Pointer type instrument identification reading method | |
CN109506629B (en) | Method for calibrating rotation center of underwater nuclear fuel assembly detection device | |
CN110992416A (en) | High-reflection-surface metal part pose measurement method based on binocular vision and CAD model | |
CN114463425A (en) | Workpiece surface featureless point positioning method based on probability Hough linear detection | |
CN116804532B (en) | 3D measurement method for distance between parallel line segments | |
CN111815580B (en) | Image edge recognition method and small module gear module 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 |