Columnar part diffuse reflection inner surface size detection method

By using the light plane projection and cylindrical fitting methods, combined with the Hessian matrix and least squares method to optimize the light plane parameters, the measurement error problem in the diffuse reflection inner surface dimensional inspection of cylindrical parts was solved, high-precision dimensional inspection was achieved, the inspection cycle was shortened and the cost was reduced.

CN120668017AActive Publication Date: 2025-09-19TIANJIN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510788496.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-19
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

In the existing technology, the diffuse reflection inner surface dimension detection of cylindrical parts has the problem of large measurement errors, especially when the light plane and the inner surface are obliquely intersected, the light stripe width is wide, resulting in large errors in subsequent fitting calculations.

Method used

The light plane projection method is adopted to visually collect the pixel coordinates of the light stripes and convert them into three-dimensional coordinates. Combined with the Hessian matrix and cylindrical fitting method, the least squares method and Levenberg-Marquardt algorithm are used to optimize the light plane parameters, reduce the influence of the light stripe width on detection, and optimize the residuals through multiple ring gauges to improve the detection accuracy.

Benefits of technology

It effectively reduces the error caused by the width of the light stripe, improves the detection accuracy, shortens the detection cycle, meets the requirements of online non-contact dimensional detection of the coaxiality of cylindrical parts, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120668017A_ABST
    Figure CN120668017A_ABST
Patent Text Reader

Abstract

The invention discloses a method for detecting the size of a diffuse reflection inner surface of a cylindrical part, and the method comprises the steps: enabling a laser assembly to be matched with a conical lens, converting the three-dimensional conical projection into light plane projection, and enabling the main shafts of a reference cylinder, an industrial camera and a laser to be perpendicular to the light plane projection. According to the method, light plane projection is orthogonal to the inner surface of a reference cylinder and is obliquely crossed with the inner surface of a cylinder to be measured, but the oblique crossing angle is approximately orthogonal, the width of the light stripe is not obviously prolonged, accurate extraction of the light stripe cannot be interfered, errors caused by the width of the light stripe are reduced, and then the precision of subsequent calculation is improved; besides, the three-dimensional conical projection is converted into the light plane projection, so that the distance between the laser and the columnar part is remarkably shortened, and the accurate and comprehensive projection of the stripes can be ensured even under the condition of limited space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optical detection technology, and in particular to a method for detecting the diffuse reflection inner surface size of a columnar part. Background Art

[0002] The core strategy of the size detection of the diffuse reflection surface of cylindrical parts relies on the structured light stripe projection technology. It will project specific structural stripes onto the surface of the cylindrical parts and use industrial cameras to capture the deflection information caused by the stripes on the surface of the cylindrical parts, thereby realizing the surface size detection of the cylindrical parts. It is mainly divided into two methods: surface structure projection and line structure projection. The line structure projects a single laser line to the surface of the part. Combined with the continuous motion of the displacement platform, the surface structure light is formed by multi-frame line scanning data in the time dimension. Therefore, it is also a surface structure method. The patent with announcement number CN109916343A discloses a measurement method and system for detecting coaxiality using a single laser sensor. It uses a line structure laser sensor to adjust the position of the laser sensor by rotation. In the process of scanning the inner surfaces of the two holes to be measured, the geometric relationship is the oblique intersection of the light plane and the cylindrical surface, and then light stripes are formed at the intersection. Finally, the corresponding size is obtained through cylindrical fitting and coaxiality calculation.

[0003] However, in the above measurement method, the smaller the oblique angle, the wider the width of the light stripe, and the greater the error in the subsequent fitting calculation. Therefore, it is necessary to design a diffuse reflection inner surface size detection method for cylindrical parts to solve the problem of excessive measurement error. Summary of the Invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a method for detecting the size of the diffuse reflection inner surface of a cylindrical part.

[0005] The present invention provides a method for detecting the size of the diffuse reflection inner surface of a cylindrical part, which specifically includes the following steps:

[0006] S100, selecting a combination of a reference cylinder and a cylinder to be measured as a test object, and obtaining a plurality of first image information containing light fringes using a visual acquisition method, wherein the visual acquisition method generates a light plane that is orthogonal to the inner surface of the reference cylinder;

[0007] S200, processing a plurality of first image information, obtaining pixel coordinates (u x , v y );

[0008] S300, convert the pixel coordinates of the light stripes into three-dimensional coordinates to obtain the reference cylinder point cloud parameters (x a ,y a , z a) and the measured point cloud parameters of the cylinder to be measured (x b ,y b , z b );

[0009] S400, using a cylinder fitting method based on the reference cylinder point cloud parameters (x a ,y a , z a ) and the measured point cloud parameters of the cylinder to be measured (x b ,y b , z b ) is fitted to obtain the reference cylinder axis m a and the axis of the cylinder to be measured m b ;

[0010] S500, select the reference cylindrical axis m a Go to any point P ai , and the axis of the cylinder to be measured m b Go to any point P bi , connecting the points P ai and the point P bi Get the common axis m c ;

[0011] S600: Calculate the coaxiality using a first formula, where the first formula is as follows:

[0012] t=2max(d i )

[0013] Wherein, t is the coaxiality between the reference cylinder and the cylinder to be measured, d i Refers to the reference cylindrical axis m a and the axis m of the cylinder to be measured b Any point O on i (x i ,y i , z i ) to the common axis m c distance.

[0014] Preferably, in step S100, the visual acquisition method specifically includes the following steps:

[0015] S101, a displacement platform drives an industrial camera and a laser to move a distance h along the axial direction of the workpiece to be tested, wherein the industrial camera, the laser, and the workpiece to be tested are coaxially arranged, and the axis direction is parallel to the displacement direction of the displacement platform;

[0016] S102, the laser generates a light plane, which intersects with the inner surface of the test piece to form light stripes, the laser includes a coaxially arranged laser assembly and a conical lens, the field of view angle of the laser assembly is 2α, and the isosceles angle of the conical lens is θ=π / 4-α / 2;

[0017] S103, the industrial camera captures the light streaks on the inner surface of the test piece to obtain an image containing the light streaks;

[0018] S104 , repeating steps S101 to S103 to obtain several images containing light streaks.

[0019] Preferably, in step S200, the light stripes are solved by the Hessian matrix to obtain the pixel point L at the center of the light stripes. i , and the corresponding pixel coordinates (u i , v i ).

[0020] Preferably, in step S300, the pixel coordinates of the light streaks are converted into three-dimensional coordinates by using a conversion formula group, and the conversion formula group is as follows:

[0021]

[0022] Ax i +By i +Cz i +D=0

[0023] A 2 +B 2 +C 2 =1

[0024] Where, f is the focal length of the industrial camera; (u i , v i ) is the pixel L i The pixel coordinates; (u0, v0) is the origin of the pixel coordinate system, that is, the position of the optical center; (x i ,y i , z i ) is the light stripe and the pixel L i Corresponding to the three-dimensional coordinates of the light point, A, B, C, and D are the coefficients of the light plane equation.

[0025] Preferably, in step S400, the cylinder fitting method specifically includes the following steps:

[0026] S401. The expression for establishing the inner surface of the cylinder is as follows:

[0027] (x ij -x0) 2 +(y ij -y0)2 +(z ij -z0) 2 -[m x (x ij -x0)+m y (y ij -y0)+m z (z ij -z0)] 2 =R 2

[0028] Among them, j refers to the jth ring; i refers to the i-th point on the ring, (x ij ,y ij , z ij ) refers to the coordinate parameters of the i-th point on the j-th ring, (m x , m y , m z ) is the vector of the axis; R is the actual radius, (x0, y0, z0) are the three-dimensional coordinates of the initial point on the axis;

[0029] S402, establish the first error equation as follows:

[0030] f ij =(x ij -x0) 2 +(y ij -y0) 2 +(z ij -z0) 2 -[m x (x ij -x0)+m y (y ij -y0)+m z (z ij -z0)] 2 -R ideal 2

[0031] Among them, j refers to the jth ring; i refers to the i-th point on the ring, f ij is the actual radius R of the i-th point on the j-th circle ij and theoretical radius R ideal Deviation;

[0032] S403, establish the second error equation as follows:

[0033]

[0034] Among them, (x0, y0, z0) is the three-dimensional coordinate of the initial point on the axis, (x0', y0', z0') is the initial setting value of the three-dimensional coordinate of the initial point on the axis, R is the actual radius, R' is the initial setting value of the radius of the inner surface of the cylinder, (m x , m y , m z ) is the axis vector, (m x ',m y ',m z ') is the initial setting value of the axis vector;

[0035] S404: Combine the first error equation and the second error equation to obtain the following intermediate formula:

[0036] f0=(x ij -x′0) 2 +(y ij -y′0) 2 +(z ij -z′0) 2 -[m x ′(x ij -x′0)

[0037] +m′ y (y ij -y′0)+m z ′(z ij -z′0)] 2 -(R′) 2

[0038] S405. Take the partial derivative of f and get as follows:

[0039]

[0040] S406. Write the error equation in matrix form: A n×7 X 7×1 =B n×1 , n is the number of points, then:

[0041]

[0042] S407, solve X by least squares method 7×1 ;

[0043]

[0044] Preferably, in step S500, the common axis is obtained by a line equation connecting two points, and the line equation connecting two points is as follows:

[0045]

[0046] Among them, s is the coefficient to be solved; (x ai ,y ai , z ai ) is point P ai Coordinate parameters; (x bi ,y bi , z bi ) is point P bi The coordinate parameters of .

[0047] Preferably, in step 500, the equation of the line connecting the two points is simplified to obtain a common axis equation, which is as follows:

[0048]

[0049] Among them, (x i ,y i , z i ) is the reference cylinder axis m a and the axis of the cylinder to be measured m b Take any one point O i The coordinate parameters, (x c0 ,y c0 , z c0 ) is the common axis m c The initial point coordinate parameters, (m cx , m cy , m cz ) is the common axis m c Initial vector parameters.

[0050] Preferably, the reference cylindrical axis m is calculated according to the vertical distance formula a and the axis of the cylinder to be measured m b Any point O i (x i ,y i , z i ) to the common axis m c The distance d i , the vertical distance formula is as follows:

[0051]

[0052] Among them, (x i ,y i , z i ) is the reference cylinder axis m a and the axis of the cylinder to be measured m b Take any one point O i The coordinate parameters, (x c0 ,y c0 , z c0 ) is the common axis m c The initial point coordinate parameters, (mcx , m cy , m cz ) is the common axis u c Initial vector parameters

[0053] Preferably, before step S100, the light plane parameters are optimized using a first optimization method, wherein the first optimization method specifically comprises the following steps:

[0054] S001. Using a ring gauge as a test piece, obtain a plurality of second image information containing light fringes using the visual acquisition method;

[0055] S002. Process the second image information, convert the pixel coordinates of the light streaks into three-dimensional coordinates, and obtain point cloud parameters of the inner surface of the ring gauge;

[0056] S003, processing the point cloud parameters of the inner surface of the ring gauge by a cylinder fitting method to obtain ring gauge parameters, wherein the ring gauge parameters include the ring gauge axis, the initial point of the ring gauge axis, and the ring gauge radius;

[0057] S004, replacing the ring gauge n times, and executing steps S001 to S003 after each replacement to obtain n sets of ring gauge parameters;

[0058] S005. Establish a residual optimization function. The residual optimization function formula is as follows:

[0059]

[0060] Among them, H is the internal parameter matrix of the industrial camera; k1, k2, k3 are the radial distortion coefficients of the industrial camera; p1, p1 are the tangential distortion coefficients of the industrial camera; A, B, C, D are the light plane parameters; k x and k y Coaxiality is the projection coefficient of the angle between the main axis of the industrial camera and the displacement platform × system error; i : parameters of the ring gauge replaced for the i-th time (i≤n);

[0061] S006. The residual optimization function is used as the objective function, and the LM algorithm is used to optimize the light plane parameters.

[0062] Preferably, in step S004, replacing the ring gauge includes replacing a ring gauge of a different size and adjusting the posture of the current ring gauge.

[0063] Compared with the prior art, the present invention has the following beneficial effects:

[0064] By setting the field of view angle of the laser assembly to 2α and the isosceles angle θ of the conical lens to π / 4-α / 2, the three-dimensional conical projection can be converted into a light plane projection. The main axes of the reference cylinder, industrial camera, and laser are perpendicular to the light plane projection. Compared with the existing technology, the light plane is obliquely intersected with the inner surface, resulting in a wide light stripe width. In the present invention, the light plane projection is orthogonal to the inner surface of the reference cylinder and obliquely intersected with the inner surface of the cylinder to be measured, but the oblique intersection angle is close to orthogonal. The extension of the light stripe width is not obvious, which does not interfere with the accurate extraction of the light stripe, reduces the error caused by the width of the light stripe, and thus improves the accuracy of subsequent calculations. Furthermore, the Hessian matrix is ​​used to more accurately find the center position of the light stripe, improving the accuracy of light stripe extraction.

[0065] In addition, the conversion of three-dimensional cone projection to light plane projection significantly shortens the distance between the laser and the cylindrical part. Even in limited space, it can ensure accurate and comprehensive projection of the stripes. Moreover, the light plane intersects with the inner surface of the part to be measured, effectively avoiding dimensional detection errors caused by changes in the posture of the part to be measured. This solves the problem in existing technologies where the light plane intersects the inner surface obliquely, resulting in wide light stripes and large errors in subsequent fitting calculations.

[0066] The principle of the cylinder fitting method is based on the geometric characteristics of the cylindrical surface. The key is that the distance from any point on the cylindrical surface to its axis is always kept equal to the radius R. Therefore, by establishing the first error equation and the second error equation, partial derivatives and the least squares method are calculated. The solution by the least squares method is a cyclic iterative process. The initial value substituted in each iteration is equal to the previous initial value plus the calculated correction value. When the value is small enough to meet the required detection capability, the iteration is exited, resisting the interference of point cloud noise, and realizing the accurate acquisition of the cylindrical axis, a point on the axis, and the radius.

[0067] Finally, by using multiple ring gauges for measurement, a residual optimization function between the standard size and the measured ring gauge parameters is established, and the LM algorithm is used for optimization, the optimized light plane parameters are finally output, making the light plane equation closer to the actual light plane projection, reducing errors caused by problems such as actual installation or equipment processing accuracy.

[0068] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0070] Figure 1 A flow chart of a method for detecting the size of the diffuse reflection inner surface of a cylindrical part provided in an embodiment of the present application;

[0071] Figure 2 A schematic diagram of the positional relationship between an industrial camera and a laser assembly in a method for detecting the diffuse reflection inner surface dimensions of a cylindrical part provided in an embodiment of the present application;

[0072] Figure 3 A schematic diagram of the positional relationship between the laser assembly and the conical lens in a method for detecting the diffuse reflection inner surface dimensions of a cylindrical part provided in an embodiment of the present application.

[0073] Numbers in the figure: 1. Measured object; 2. Displacement platform; 3. Conical lens; 4. Laser assembly; 5. Industrial camera. DETAILED DESCRIPTION

[0074] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.

[0075] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0076] Please refer to Figures 1 to 3 The embodiment of the present invention provides a method for detecting the size of the diffuse reflection inner surface of a cylindrical part, which specifically includes the following steps:

[0077] S100, selecting a combination of a reference cylinder and a cylinder to be measured as a test object, and obtaining a plurality of first image information containing light fringes by a visual acquisition method, wherein the visual acquisition method generates a light plane that is orthogonal to the inner surface of the reference cylinder;

[0078] In step S100, the visual acquisition method specifically includes the following steps:

[0079] S101, the displacement platform 6 drives the industrial camera 5 and the laser to move a distance h along the axial direction of the workpiece to be tested, the industrial camera 5, the laser and the workpiece to be tested being coaxially arranged, and the axial direction is parallel to the displacement direction of the displacement platform 6;

[0080] S102, the laser generates a light plane, which intersects with the inner surface of the test piece to form light stripes. The laser includes a coaxially arranged laser component 4 and a conical lens 3. The field of view angle of the laser component 4 is 2α, and the isosceles angle of the conical lens 3 is θ = π / 4-α / 2;

[0081] S103, the industrial camera 5 captures the light streaks on the inner surface of the test piece to obtain an image containing the light streaks;

[0082] S104 , repeating steps S101 to S103 to obtain several images containing light streaks.

[0083] Among them, the displacement platform 6, the industrial camera 5, the laser component 4 and the conical lens 3 constitute a measurement system, such as Figure 2 As shown, when the combination of the reference cylinder and the cylinder to be measured is used as the object to be measured, the image of the light stripes obtained by the visual acquisition method is marked as the first image information, and in step S101, the reference cylinder is coaxially arranged with the industrial camera 5 and the laser, and the conical lens 3 is used as a matching part of the laser assembly 4. Figure 3 In the light path shown, the field of view angle of the laser component 4 is 2α, and the isosceles angle of the conical lens 3 is θ=π / 4-α / 2. At this time, the three-dimensional conical projection can be converted into a light plane projection. The main axes of the reference cylinder, the industrial camera 5 and the laser are perpendicular to the light plane projection. Compared with the prior art, the light plane projection is obliquely intersected with the inner surface, resulting in a wide light stripe width. In the present invention, the light plane is orthogonal to the inner surface of the reference cylinder and obliquely intersected with the inner surface of the cylinder to be measured, but the oblique angle is close to orthogonal, so the light stripe width is not significantly extended, which will not interfere with the accuracy of the light stripe. Extraction reduces the error caused by the width of the light stripes, thereby improving the accuracy of subsequent calculations; further, the conversion of three-dimensional conical projection to light plane projection also significantly shortens the distance between the laser and the cylindrical parts, ensuring accurate and comprehensive projection of the stripes even in limited space. Moreover, the light plane intersects with the inner surface of the workpiece to be measured, effectively avoiding the dimensional detection error caused by the posture change of the workpiece to be measured, and solving the problem in the existing technology that the light plane and the inner surface intersect obliquely, resulting in a wider light stripe width, and then large errors in subsequent fitting calculations.

[0084] S200, process a plurality of first image information, and obtain pixel coordinates (u x , v y );

[0085] In step S200, the light stripes are solved by the Hessian matrix to obtain the pixel point L at the center of the light stripes. i , and the corresponding pixel coordinates (u i , v i ).

[0086] Among them, the Hessian matrix is ​​a symmetric square matrix composed of the second-order partial derivatives of a multivariate function, which is used to describe the local curvature characteristics of the function. The Hessian matrix is ​​used to find the position in the light strip area that is "most like the center line", that is, the place with the largest curvature. Then, along the vertical direction of the light strip (the direction is determined by the Hessian matrix), Gaussian fitting or grayscale centroid method is used to find the sub-pixel position with the highest brightness, that is, the center position of the light stripe. Then, according to the pixel point L at the center position of the light stripe, the pixel point L is calculated. i , directly read the pixel coordinates (u i , v i ).

[0087] S300, convert the pixel coordinates of the light stripes into three-dimensional coordinates to obtain the reference cylinder point cloud parameters (x a ,y a , z a ) and the measured point cloud parameters of the cylinder to be measured (x b ,y b , z b );

[0088] In step S300, the pixel coordinates of the light streak are converted into three-dimensional coordinates using a conversion formula group, and the conversion formula group is as follows:

[0089]

[0090] Ax i +By i +Cz i +D=0

[0091] A 2 +B 2 +C 2 =1

[0092] Where, f is the focal length of the industrial camera; (u i , v i ) is the pixel L i The pixel coordinates; (u0, v0) is the origin of the pixel coordinate system, that is, the position of the optical center; (x i ,y i , z i ) is the light stripe and the pixel L i Corresponding to the three-dimensional coordinates of the light point, A, B, C, and D are the coefficients of the light plane equation;

[0093] Among them, in the conversion formula group, the first two formulas are based on the pinhole model and use three-dimensional coordinates to express pixel coordinates, but the two equations cannot solve the three unknowns (x i ,y i , z i ), so the light plane equation is introduced, the pixel point L iThe three-dimensional coordinates of the corresponding light points not only satisfy the pinhole model but also lie on the light plane. Therefore, the three-dimensional coordinates of all light points can be obtained by combining them. According to the position of the laser front end after each forward movement, the three-dimensional coordinates of all light points are divided into the reference cylinder point cloud parameters and the measured cylinder point cloud parameters.

[0094] S400, based on the reference cylinder point cloud parameters (x a ,y a , z a ) and the measured point cloud parameters of the cylinder to be measured (x b ,y b , z b ) is fitted to obtain the reference cylinder axis m a and the axis of the cylinder to be measured m b ;

[0095] In step S400, the cylinder fitting method specifically includes the following steps:

[0096] S401. The expression for establishing the inner surface of the cylinder is as follows:

[0097] (x ij -x0) 2 +(y ij -y0) 2 +(z ij -z0) 2 -[m x (x ij -x0)+m y (y ij -y0)+m z (z ij -z0)] 2 =R 2

[0098] Among them, j refers to the jth ring; i refers to the i-th point on the ring, (x ij ,y ij , z ij ) refers to the coordinate parameters of the i-th point on the j-th ring, (m x , m y , m z ) is the vector of the axis; R is the actual radius, (x0, y0, z0) are the three-dimensional coordinates of the initial point on the axis;

[0099] S402, establish the first error equation as follows:

[0100] f ij =(x ij -x0) 2 +(y ij -y0) 2 +(zij -z0) 2 -[m x (x ij -x0)+m y (y ij -y0)+m z (z ij -z0)] 2 -R ideal 2

[0101] Among them, j refers to the jth ring; i refers to the i-th point on the ring, f ij is the actual radius R of the i-th point on the j-th circle ij and theoretical radius R ideal Deviation;

[0102] S403, establish the second error equation as follows:

[0103] f0=(x ij -x′0) 2 +(y ij -y′0) 2 +(z ij -z′0) 2 -[m x ′(x ij -x′0)

[0104] +m′ y (y ij -y′0)+m z ′(z ij -z′0)] 2 -(R′) 2

[0105] Among them, (x0, y0, z0) is the three-dimensional coordinate of the initial point on the axis, (x0', y0', z0') is the initial setting value of the three-dimensional coordinate of the initial point on the axis, R is the actual radius, R' is the initial setting value of the radius of the inner surface of the cylinder, (m x , m y , m z ) is the axis vector, (m x ',m y ',m z ') is the initial setting value of the axis vector;

[0106] S404: Combine the first error equation and the second error equation to obtain the following intermediate formula:

[0107] f0=(x ij -x′0) 2 +(y ij -y′0) 2+(z ij -z′0) 2 -[m x ′(x ij -x′0)

[0108] +m′ y (y ij -y′0)+m z ′(z ij -z′0)] 2 -(R′) 2

[0109] S405. Take the partial derivative of f and get as follows:

[0110]

[0111] S406. Write the error equation in matrix form: A n×7 X 7×1 =B n×1 , n is the number of points, then:

[0112]

[0113] S407, solve X by least squares method 7×1 ;

[0114]

[0115] Among them, the principle of the cylinder fitting method is based on the geometric characteristics of the cylindrical surface. The key is that the distance from any point Q on the cylindrical surface to its axis is always kept equal to the radius R. Therefore, by establishing the first error equation and the second error equation, by calculating the partial derivative and the least squares method, the solution by the least squares method is a cyclic iterative process. The initial value substituted in each iteration is equal to the previous initial value plus the calculated correction value. When the value is small enough to meet the required detection capability, the iteration is exited, resisting the interference of point cloud noise, and realizing the accurate acquisition of the cylindrical axis and a point on the axis and the radius;

[0116] The reference cylinder point cloud parameters (x a ,y a , z a ), then step S407 solves the corresponding X 7×1 , is the reference cylinder axis m a (m ax , m ay , m az ), the initial point of the reference cylinder axis (x a0 ,y a0 , z a0) and the base cylinder radius R a ; Similarly, the cylindrical fitting method is used to process the cylindrical point cloud parameters (x b ,y b , z b ), then the axis m of the cylinder to be measured is obtained b (m bx , m by , m bz ), the initial point of the axis of the cylinder to be measured (x b0 ,y b0 , z b0 ) and the radius of the cylinder to be measured R b .

[0117] S500, select the reference cylinder axis m a Go to any point P ai , and the axis of the cylinder to be measured m b Go to any point P bi , connecting point P ai and point P bi Get the common axis m c ;

[0118] In step S500, the common axis is obtained by the equation of the line connecting the two points. The equation of the line connecting the two points is as follows:

[0119]

[0120] Among them, s is the coefficient to be solved; (x ai ,y ai , z ai ) is point P ai Coordinate parameters; (x bi ,y bi , z bi ) is point P bi The coordinate parameters of .

[0121] In the scope of coaxiality detection, the detection deviation caused by the length difference and spatial distance between the reference axis and the measured axis is defined as the magnification error. Therefore, when the height of the reference cylinder and the measured cylinder is relatively small and the distance between them is large, the common axis is obtained by fitting the reference cylinder and the measured cylinder, and the coaxiality of the two cylinders relative to the common axis is evaluated respectively. The larger value of the data is taken as the coaxiality error of the part. This method is closer to the actual needs of assembly and rotation in industrial production. Therefore, the reference cylinder axis m is taken as the coaxiality error of the part. a Go to any point P ai and the axis of the cylinder to be measured m b Go to any point P bi The common axis m formed by the connecting lines c It is more in line with the actual needs of assembly and rotation in industrial production.

[0122] S600: Calculate the coaxiality using the first formula. The first formula is as follows:

[0123] t=2max(d i )

[0124] Among them, t is the coaxiality between the reference cylinder and the cylinder to be measured, d i Refers to the reference cylinder axis m a and the axis of the cylinder to be measured m b Any point O on i (x i ,y i , z i ) to the common axis m c distance.

[0125] In step 500, the equation of the line connecting the two points is simplified to obtain the common axis equation, which is as follows:

[0126]

[0127] Among them, (x i ,y i , z i ) is the reference cylinder axis m a and the axis of the cylinder to be measured m b Take any one point O i The coordinate parameters, (x c0 ,y c0 , z c0 ) is the common axis m c The initial point coordinate parameters, (m cx , m cy , m cz ) is the common axis m c Initial vector parameters.

[0128] Then, the reference cylinder axis m is calculated according to the vertical distance formula. a and the axis of the cylinder to be measured m b Any point O i (x i ,y i , z i ) to the common axis m c The distance d i , the vertical distance formula is as follows:

[0129]

[0130] Among them, (x i ,y i , z i ) is the reference cylinder axis m a and the axis of the cylinder to be measured mb Take any one point O i The coordinate parameters, (x c0 ,y c0 , z c0 ) is the common axis m c The initial point coordinate parameters, (m cx , m cy , m cz ) is the common axis m c Initial vector parameters;

[0131] Finally, twice the maximum distance is selected as the coaxiality through the first formula.

[0132] Before step S100, the light plane parameters are optimized using a first optimization method, which specifically includes the following steps:

[0133] S001. Using a ring gauge as a test piece, obtain a plurality of second image information containing light stripes through a visual acquisition method. When the ring gauge is used as a test piece, the image finally obtained by the visual acquisition method is used as the second image information, which is different from the first image information in step S100.

[0134] S002. Process the second image information, convert the pixel coordinates of the light stripes into three-dimensional coordinates, and obtain the point cloud parameters of the inner surface of the ring gauge; this step is the same as steps S200 and S300, and the specific steps are not repeated here.

[0135] S003. Process the point cloud parameters of the inner surface of the ring gauge by a cylindrical fitting method to obtain the ring gauge parameters. This step is the same as S400 and will not be repeated here. The ring gauge parameters include the ring gauge axis, the initial point of the ring gauge axis, and the ring gauge radius.

[0136] S004. Replace the ring gauge n times, and execute steps S001 to S003 after each replacement to obtain n sets of ring gauge parameters; wherein, replacing the ring gauge includes replacing the ring gauge of different sizes and adjusting the posture of the current ring gauge. By replacing the ring gauge, the ring gauge parameters obtained each time are different, which is convenient for subsequent optimization and adjustment.

[0137] S005. Establish a residual optimization function. The residual optimization function formula is as follows:

[0138]

[0139] Among them, H is the internal parameter matrix of the industrial camera; k1, k2, k3 are the radial distortion coefficients of the industrial camera; p1, p1 are the tangential distortion coefficients of the industrial camera; A, B, C, D are the light plane parameters; k x and k y Coaxiality is the projection coefficient of the angle between the main axis of the industrial camera and the displacement platform × system error;i : parameters of the ring gauge replaced for the i-th time (i≤n);

[0140] Among them, the ring gauge is a standard part with various specifications and corresponding standard sizes. The residual optimization function refers to the residual between the model prediction value and the actual observation value, specifically the residual between the standard size and the measured ring gauge parameters. In the actual measurement process, due to problems such as actual installation or equipment processing accuracy, the projection coefficient and system error of the angle between the industrial camera spindle and the displacement platform will be caused. Therefore, the projection coefficient and system error of the angle between the industrial camera spindle and the displacement platform are marked as k x and k y ,In addition, H, k1, k2, k3, p1, and p1 are industrial camera parameters, which can be obtained through Zhang Zhengyou ,calibration method.

[0141] S006. The residual optimization function is used as the objective function, and the LM algorithm is used to optimize the light plane parameters;

[0142] Among them, the full name of the LM algorithm is the Levenberg-Marquardt algorithm, which is an optimization algorithm for solving nonlinear least squares problems. It performs iterative optimization based on the initial value and finally outputs the optimized eigenvalue. In the present invention, the light plane parameters A, B and C are output after optimization by the LM algorithm. The light plane equation represented by it is closer to the actual light plane projection, reducing errors caused by problems such as actual installation or equipment processing accuracy. In addition, when giving the initial value of the residual optimization function, optionally, A=0, B=0, C=1, k x =0,k y =0, the initial value of D is set to the initial design distance from the light plane to the optical center of the camera.

[0143] In order to verify the accuracy of the detection method, 30 sets of motor housings were selected and tested using the detection method of the present invention and the three-coordinate detection method respectively. The experimental comparison data are as follows:

[0144] Experimental data (unit: mm)

[0145]

[0146]

[0147] The three-coordinate measurement method requires detailed dot detection of each part, and a total of 120 sets of data points are obtained. The detection of a single part takes about 12 minutes, and the overall detection work takes 6 hours to complete. However, by adopting the detection method of the present invention, firstly, the deviation is controlled within the range of 15μm, which fully meets the requirements of online non-contact dimensional detection of the coaxiality of cylindrical parts. Secondly, the measurement time of a single part only takes 1-2 minutes, which significantly shortens the dimensional detection cycle and effectively reduces production costs.

[0148] In this specification, the terms "connect," "install," and "fix" should be understood broadly. For example, "connect" can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a direct connection or an indirect connection through an intermediary. Those skilled in the art will understand the specific meanings of these terms in this application based on the specific circumstances.

[0149] Throughout this specification, terms such as "one embodiment" or "some embodiments" mean that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0150] The above are merely preferred embodiments of the present application and are not intended to limit the present application. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for detecting the size of the inner surface of a cylindrical part by diffuse reflection, characterized in that: The specific steps include: S100, selecting a combination of a reference cylinder and a cylinder to be measured as a test object, and obtaining a plurality of first image information containing light fringes using a visual acquisition method, wherein the visual acquisition method generates a light plane that is orthogonal to the inner surface of the reference cylinder; S200, processing a plurality of first image information, obtaining pixel coordinates (u x , v y ); S300, convert the pixel coordinates of the light stripes into three-dimensional coordinates to obtain the reference cylinder point cloud parameters (x a ,y a , z a ) and the measured point cloud parameters of the cylinder to be measured (x b ,y b , z b ); S400, using a cylinder fitting method based on the reference cylinder point cloud parameters (x a ,y a , z a ) and the measured point cloud parameters of the cylinder to be measured (x b ,y b , z b ) is fitted to obtain the reference cylinder axis m a and the axis of the cylinder to be measured m b ; S500, select the reference cylindrical axis m a Go to any point P ai , and the axis of the cylinder to be measured m b Go to any point P bi , connecting the points P ai and the point P bi Get the common axis m c ; S600: Calculate the coaxiality using a first formula, where the first formula is as follows: t=2max(d i ) Wherein, t is the coaxiality between the reference cylinder and the cylinder to be measured, d i Refers to the reference cylindrical axis m a and the axis m of the cylinder to be measured b Any point O on i (x i ,y i , z i ) to the common axis m c distance.

2. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 1, characterized in that: In step S100, the visual acquisition method specifically includes the following steps: S101, a displacement platform drives an industrial camera and a laser to move a distance h along the axial direction of the workpiece to be tested, wherein the industrial camera, the laser, and the workpiece to be tested are coaxially arranged, and the axis direction is parallel to the displacement direction of the displacement platform; S102, the laser generates a light plane, which intersects with the inner surface of the test piece to form light stripes, the laser includes a coaxially arranged laser assembly and a conical lens, the field of view angle of the laser assembly is 2α, and the isosceles angle of the conical lens is θ=π / 4-α / 2; S103, the industrial camera captures the light streaks on the inner surface of the test piece to obtain an image containing the light streaks; S104 , repeating steps S101 to S103 to obtain several images containing light streaks.

3. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 1, characterized in that: In step S200, the light stripes are calculated by using the Hessian matrix to obtain the pixel point L at the center of the light stripes. i , and the corresponding pixel coordinates (u i , v i ).

4. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 3, characterized in that: In step S300, the pixel coordinates of the light streak are converted into three-dimensional coordinates using a conversion formula group, and the conversion formula group is as follows: Ax i +By i +Cz i +D=0 A 2 +B 2 +C 2 =1 Where, f is the focal length of the industrial camera; (u i , v i ) is the pixel L i The pixel coordinates; (u0, v0) is the origin of the pixel coordinate system, that is, the position of the optical center; (x i ,y i , z i ) is the light stripe and the pixel L i Corresponding to the three-dimensional coordinates of the light point, A, B, C, and D are the coefficients of the light plane equation.

5. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 2, characterized in that: In step S400, the cylinder fitting method specifically includes the following steps: S401. The expression for establishing the inner surface of the cylinder is as follows: (x ij -x0) 2 +(y ij -y0) 2 +(z ij -z0) 2 -[m x (x ij -x0)+m y (y ij -y0)+m z (z ij -z0)] 2 =R 2 Among them, j refers to the jth ring; i refers to the i-th point on the ring, (x ij ,y ij , z ij ) refers to the coordinate parameters of the i-th point on the j-th ring, (m x , m y , m z ) is the vector of the axis; R is the actual radius, (x0, y0, z0) are the three-dimensional coordinates of the initial point on the axis; S402, establish the first error equation as follows: f ij =(x ij -x0) 2 +(y ij -y0) 2 +(z ij -z0) 2 -[m x (x ij -x0)+m y (y ij -y0)+m z (z ij -z0)] 2 -R ideal 2 Among them, j refers to the jth ring; i refers to the i-th point on the ring, f ij is the actual radius R of the i-th point on the j-th circle ij and theoretical radius R ideal Deviation; S403, establish the second error equation as follows: Among them, (x0, y0, z0) is the three-dimensional coordinate of the initial point on the axis, (x0', y0', z0') is the initial setting value of the three-dimensional coordinate of the initial point on the axis, R is the actual radius, R' is the initial setting value of the radius of the inner surface of the cylinder, (m x , m y , m z ) is the axis vector, (m x ',m y ',m z ') is the initial setting value of the axis vector; S404: Combine the first error equation and the second error equation to obtain the following intermediate formula: f0=(x ij -x′0) 2 +(y ij -y′0) 2 +(z ij -z′0) 2 -[m x ′(x ij -x′0) +m′ y (y ij -y′0)+m z ′(z ij -z′0)] 2 -(R′) 2 S405. Take the partial derivative of f and get as follows: S406. Write the error equation in matrix form: A n×7 X 7×1 =B n×1 , n is the number of points, then: S407, solve X by least squares method 7×1 ; 6. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 1, characterized in that: In step S500, the common axis is obtained by the equation of the line connecting the two points, and the equation of the line connecting the two points is as follows: Among them, s is the coefficient to be solved; (x ai ,y ai , z ai ) is point P ai Coordinate parameters; (x bi ,y bi , z bi ) is point P bi The coordinate parameters of .

7. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 6, characterized in that: In step 500, the equation of the line connecting the two points is simplified to obtain the common axis equation, which is as follows: Among them, (x i ,y i , z i ) is the reference cylinder axis m a and the axis of the cylinder to be measured m b Take any one point O i The coordinate parameters, (x c0 ,y c0 , z c0 ) is the common axis m c The initial point coordinate parameters, (m cx , m cy , m cz ) is the common axis m c Initial vector parameters.

8. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 7, characterized in that: According to the vertical distance formula, the reference cylinder axis m is calculated a and the axis of the cylinder to be measured m b Any point O i (x i ,y i , z i ) to the common axis m c The distance d i , the vertical distance formula is as follows: Among them, (x i ,y i , z i ) is the reference cylinder axis m a and the axis of the cylinder to be measured m b Take any one point O i The coordinate parameters, (x c0 ,y c0 , z c0 ) is the common axis m c The initial point coordinate parameters, (m cx , m cy , m cz ) is the common axis u c Initial vector parameters.

9. The method for detecting the inner surface size of a cylindrical part by diffuse reflection according to claim 5, characterized in that: Before step S100, the light plane parameters are optimized using a first optimization method, wherein the first optimization method specifically includes the following steps: S001. Using a ring gauge as a test piece, obtain a plurality of second image information containing light fringes using the visual acquisition method; S002. Process the second image information, convert the pixel coordinates of the light streaks into three-dimensional coordinates, and obtain point cloud parameters of the inner surface of the ring gauge; S003, processing the point cloud parameters of the inner surface of the ring gauge by a cylinder fitting method to obtain ring gauge parameters, wherein the ring gauge parameters include the ring gauge axis, the initial point of the ring gauge axis, and the ring gauge radius; S004, replacing the ring gauge n times, and executing steps S001 to S003 after each replacement to obtain n sets of ring gauge parameters; S005. Establish a residual optimization function. The residual optimization function formula is as follows: Among them, H is the internal parameter matrix of the industrial camera; k1, k2, k3 are the radial distortion coefficients of the industrial camera; p1, p1 are the tangential distortion coefficients of the industrial camera; A, B, C, D are the light plane parameters; k x and k y Coaxiality is the projection coefficient of the angle between the main axis of the industrial camera and the displacement platform × system error; i : parameters of the ring gauge replaced for the i-th time (i≤n); S006. The residual optimization function is used as the objective function, and the LM algorithm is used to optimize the light plane parameters.

10. The method for detecting the size of the inner surface of a cylindrical part by diffuse reflection according to claim 9, characterized in that: In step S004, replacing the ring gauge includes replacing a ring gauge of a different size and adjusting the posture of the current ring gauge.

Citation Information

Patent Citations

  • Cylindrical object pose detection device and method based on linear structure optical vision

    CN113048949A

  • Complete calibration method of line structured light vision sensor based on single cylinder target

    CN113554708A

  • Inner wall surface three-dimensional measurement system, method, device, medium and equipment

    CN115235380A

  • Motor stator coaxiality measuring method and device

    CN117168365A

  • Non-contact coaxiality measurement method and system

    CN118189859A