A method for detecting the size of a diffuse reflection inner surface of a columnar part
By employing a method of orthogonal projection of the light plane to the inner surface in the inspection of columnar parts, combined with the Hessian matrix and cylindrical fitting method, the error problem caused by the width of the light stripe was solved, achieving high-precision dimensional inspection and meeting the actual needs of industrial production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2025-06-13
- Publication Date
- 2026-06-05
AI Technical Summary
In the existing technology, the measurement of the inner surface dimensions of diffuse reflection of columnar parts has the problem of excessive measurement error, especially when the light plane and the inner surface are obliquely intersected, the light stripe width is wide, which leads to a large error in subsequent fitting calculation.
A conical lens with a field of view of 2α is used to project the light plane, making the light plane orthogonal to the inner surface of the reference cylinder. The center position of the light fringe is calculated by combining the Hessian matrix. The error equation is established for accurate fitting by the cylinder fitting method and the least squares method. Multiple ring gauges are used for residual optimization.
It reduces the error caused by the width of the light stripe, improves the detection accuracy, shortens the distance between the laser and the cylindrical part, ensures accurate projection of the stripe, resists point cloud noise interference, realizes accurate acquisition of the cylinder axis and radius, and reduces production costs and detection time.
Smart Images

Figure CN120668017B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical inspection technology, and in particular to a method for detecting the internal surface dimensions of diffuse reflection of columnar parts. Background Technology
[0002] The core strategy for dimensional detection of diffuse reflective surfaces of columnar parts relies on structured light stripe projection technology. This involves projecting specific structural stripes onto the surface of the columnar part and using an industrial camera to capture the deflection information caused by the stripes on the surface, thereby enabling the detection of the columnar part's surface dimensions. This is mainly divided into two methods: surface structure projection and line structure projection. Line structure projection projects a single laser line onto the part's surface, combined with continuous movement of a displacement platform. Multiple frames of line scan data over time are used to construct surface structured light, thus it is also a type of surface structure projection. Patent CN109916343A discloses a measurement method and system for detecting coaxiality using a single laser sensor. This method uses a line structured laser sensor, rotating and adjusting its position so that during the scanning of the inner surfaces of two holes to be measured, the geometric relationship is an oblique intersection of the light plane and the cylindrical surface, forming light stripes at the intersection. Finally, the corresponding dimensions are obtained through cylindrical fitting and coaxiality calculation.
[0003] However, in the above measurement methods, the smaller the angle of oblique intersection, the wider the width of the light stripe, which leads to a larger error in subsequent fitting calculations. Therefore, it is necessary to design a method for detecting the inner surface dimensions of diffuse reflection of columnar 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 desirable to provide a method for detecting the diffuse reflection inner surface dimensions of columnar parts.
[0005] The present invention provides a method for detecting the inner surface dimensions of a columnar part with diffuse reflection, which specifically includes the following steps:
[0006] S100. A combination of a reference cylinder and a cylinder to be tested is selected as the test piece. Several first image information containing light stripes are obtained through a visual acquisition method. A light plane is generated in the visual acquisition method. The light plane is orthogonal to the inner surface of the reference cylinder.
[0007] S200: Process several sets of the first image information to obtain the pixel coordinates corresponding to the light stripes in each set of the first image information. ;
[0008] S300: Convert the pixel coordinates of the light stripes into three-dimensional coordinates to obtain the reference cylindrical point cloud parameters. Measurement point cloud parameters of the cylinder to be measured ;
[0009] S400, Based on the reference cylindrical point cloud parameters, respectively, the cylindrical fitting method is used. and the measured point cloud parameters of the cylinder to be measured By performing fitting, the axis of the reference cylinder is obtained. and the axis of the cylinder to be measured ;
[0010] S500, Select the reference cylindrical axis Take office and the axis of the cylinder to be measured Take office Connect the points and the points mentioned Obtain common axis ;
[0011] S600. Calculate the coaxiality using the first formula, which is as follows:
[0012]
[0013] Where t is the coaxiality of the reference cylinder and the cylinder to be measured. This refers to the axis of the reference cylinder. and the axis of the cylinder to be measured any point on To the common axis The distance.
[0014] Preferably, in step S100, the visual acquisition method specifically includes the following steps:
[0015] S101, the displacement platform drives the industrial camera and laser to move a distance h along the axial direction of the workpiece under test. The industrial camera, laser and workpiece under test are coaxially arranged, and the axial 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 workpiece to form light stripes. The laser includes a coaxially arranged laser component and a conical lens. The field of view of the laser component is 2α, and the isosceles angle of the conical lens is... ;
[0017] S103. The industrial camera captures light stripes on the inner surface of the workpiece under test to obtain an image containing light stripes;
[0018] S104. Repeat steps S101 to S103 to obtain several images containing light stripes.
[0019] Preferably, in step S200, the light stripes are calculated using the Hessian matrix to obtain the pixel at the center of the light stripes. and the corresponding pixel coordinates .
[0020] Preferably, in step S300, the pixel coordinates of the light stripes are converted into three-dimensional coordinates using a set of conversion formulas, which are as follows:
[0021]
[0022]
[0023]
[0024]
[0025] Where f is the focal length of the industrial camera; For pixels Pixel coordinates; It is the origin of the pixel coordinate system, i.e., the position of the optical center; It is the light stripe and the pixel. The three-dimensional coordinates of the corresponding light point, A, B, C, and D are the coefficients of the equation of the light plane.
[0026] Preferably, in step S400, the cylinder fitting method specifically includes the following steps:
[0027] S401. The expression for the inner surface of the cylinder is established as follows:
[0028]
[0029] Where j refers to the j-th ring; i refers to the i-th point on the ring. This refers to the coordinate parameters of the i-th point on the j-th annulus. R is the vector of the axis; R is the actual radius. These are the three-dimensional coordinates of the initial point on the axis;
[0030] S402. The first error equation is established as follows:
[0031]
[0032] Where j refers to the j-th ring; i refers to the i-th point on the ring. It is the actual radius of the i-th point on the j-th ring. and theoretical radius Deviation;
[0033] S403. The second error equation is established as follows:
[0034]
[0035] in, These are the three-dimensional coordinates of the initial point on the axis. R is the initial setting value of the three-dimensional coordinates of the initial point on the axis, and R is the actual radius. This is the initial setting value for the radius of the inner surface of the cylinder. It is the vector of the axis. This is the initial setting value for the axis vector;
[0036] S404. By simultaneously solving the first and second error equations, the intermediate formula is obtained as follows:
[0037]
[0038] S405. Taking the partial derivative with respect to f, we get... , , , , , , as follows:
[0039]
[0040] S406. Write the error equation in matrix form: Let n be the number of points, then:
[0041]
[0042]
[0043] S407, Solving using the least squares method ;
[0044]
[0045] Preferably, 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:
[0046]
[0047] Where s is the solution coefficient; It is a point ; yes .
[0048] Preferably, in step 500, the equation of the line connecting the two points is simplified to obtain the equation of the common axis, which is as follows:
[0049]
[0050] in, It is the axis of the reference cylinder. and the axis of the cylinder to be measured Take office coordinate parameters, It is a common axis The initial point coordinate parameters.
[0051] Preferably, the axis of the reference cylinder is calculated according to the vertical distance formula. and the axis of the cylinder to be measured any point To the public axis distance The formula for the vertical distance is as follows:
[0052]
[0053] in, It is the axis of the reference cylinder. and the axis of the cylinder to be measured Take office coordinate parameters, It is a common axis The initial point coordinate parameters, It is a common axis Initial vector parameters
[0054] Preferably, before step S100, the optical plane parameters are optimized using a first optimization method, which specifically includes the following steps:
[0055] S001. Using the ring gauge as the test piece, obtain several second image information containing light stripes through the visual acquisition method.
[0056] 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.
[0057] S003. The point cloud parameters of the inner surface of the ring gauge are processed by the cylindrical fitting method to obtain the 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;
[0058] S004. Replace the ring gauge n times, and after each replacement, execute steps S001 to S003 to obtain n sets of ring gauge parameters.
[0059] S005. Establish the residual optimization function. The formula for the residual optimization function is as follows:
[0060]
[0061] Where H is the intrinsic parameter matrix of the industrial camera; It is the radial distortion coefficient of an industrial camera; is the tangential distortion coefficient of the industrial camera; A, B, C, and D are the optical plane parameters; It is the projection coefficient of the angle between the industrial camera spindle and the displacement platform multiplied by the systematic error; Coaxiality i : The ring gauge parameter changed for the i-th time, i≤n;
[0062] S006. The residual optimization function is used as the objective function, and the LM algorithm is used to optimize the optical plane parameters.
[0063] Preferably, in step S004, changing the ring gauge includes changing to a ring gauge of a different size and adjusting the position of the current ring gauge.
[0064] Compared with the prior art, the beneficial effects of the present invention are:
[0065] By setting the field of view of the laser component to 2α, the isosceles angle of the conical lens This invention transforms a three-dimensional conical projection into a planar optical projection. The principal axes of the reference cylinder, industrial camera, and laser are perpendicular to the planar optical projection. Compared to existing technologies where the planar optical projection is oblique to the inner surface, resulting in a wider light stripe width, this invention orthogonalizes the inner surface of the reference cylinder and obliquely intersects the inner surface of the cylinder under test. However, the angle of oblique intersection is close to orthogonal, so the extension of the light stripe width is not significant and will not interfere with the accurate extraction of the light stripe, reducing the error caused by the width of the light stripe and thus improving the accuracy of subsequent calculations. Furthermore, the use of a Hessian matrix can more accurately locate the center position of the light stripe, improving the accuracy of light stripe extraction.
[0066] In addition, the transformation of the three-dimensional conical projection into the light plane projection significantly shortens the distance between the laser and the cylindrical part. Even in the case of limited space, it can ensure accurate and complete projection of the stripes. Moreover, the light plane intersects with the inner surface of the test piece, which effectively avoids the size detection error caused by the change of the test piece's posture. This solves the problem in the existing technology where the light plane intersects with the inner surface at an angle, resulting in a wide light stripe width and thus a large error in subsequent fitting calculations.
[0067] The principle of the cylindrical fitting method is based on the geometric properties of the cylindrical surface. The key is that the distance from any point on the cylindrical surface to its axis is always equal to the radius R. Therefore, by establishing the first error equation and the second error equation, and by calculating the partial derivatives and the least squares method, the solution of the least squares method is a cyclic iterative process. In each iteration, the initial value substituted 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 terminated. This resists the interference of point cloud noise and achieves accurate acquisition of the cylindrical axis, a point on the axis, and the radius.
[0068] Finally, by using multiple ring gauges for measurement, and by establishing a residual optimization function between the standard dimensions and the measured ring gauge parameters, the function is optimized using the LM algorithm. The optimized optical plane parameters are then output, making the optical plane equation closer to the actual optical plane projection and reducing errors caused by problems such as actual installation or equipment processing accuracy.
[0069] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0070] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0071] Figure 1 A flowchart illustrating a method for detecting the diffuse reflection inner surface dimensions of a columnar part, provided in an embodiment of this application;
[0072] Figure 2 This is a schematic diagram illustrating the positional relationship between an industrial camera and a laser assembly in a method for detecting the diffuse reflection inner surface dimensions of a columnar part, as provided in an embodiment of this application.
[0073] Figure 3 This is a schematic diagram showing the positional relationship between the laser assembly and the conical lens in a method for detecting the diffuse reflection inner surface dimensions of a columnar part, as provided in an embodiment of this application.
[0074] The following are the labels in the diagram: 1. Test piece; 2. Displacement platform; 3. Conical lens; 4. Laser assembly; 5. Industrial camera. Detailed Implementation
[0075] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0076] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0077] Please refer to Figures 1-3 The present invention provides a method for detecting the internal surface dimensions of a columnar part with diffuse reflection, specifically including the following steps:
[0078] S100. Select a combination of a reference cylinder and a cylinder to be measured as the test piece. Obtain several first image information containing light stripes through a visual acquisition method. A light plane will be generated in the visual acquisition method. The light plane is orthogonal to the inner surface of the reference cylinder.
[0079] In step S100, the visual acquisition method specifically includes the following steps:
[0080] 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 under test. The industrial camera 5, the laser and the workpiece under test are coaxially arranged, and the axial direction is parallel to the displacement direction of the displacement platform 6.
[0081] S102. The laser generates a light plane, which intersects with the inner surface of the workpiece to form light stripes. The laser includes a laser assembly 4 and a conical lens 3 arranged coaxially. The field of view of the laser assembly 4 is 2α, and the isosceles angle of the conical lens 3 is... ;
[0082] S103, Industrial Camera 5 captures the light stripes on the inner surface of the workpiece under test to obtain an image containing the light stripes;
[0083] S104. Repeat steps S101 to S103 to obtain several images containing light stripes.
[0084] The measurement system comprises a displacement platform 6, an industrial camera 5, a laser assembly 4, and a conical lens 3. Figure 2 As shown, when the combination of the reference cylinder and the cylinder to be tested is used as the test piece, the image marker of the light stripes obtained by the visual acquisition method is used as the first image information. In step S101, the reference cylinder is coaxially set with the industrial camera 5 and the laser, and the conical lens 3 is used as the mating part of the laser assembly 4. Figure 3 The light path shown has a field of view of 2α for laser component 4 and an isosceles angle for conical lens 3. At this point, the three-dimensional conical projection can be transformed into a light plane projection. The principal axes of the reference cylinder, industrial camera 5, and laser are perpendicular to the light plane projection. Compared to the existing technology where the light plane projection is oblique to the inner surface, resulting in a wider light stripe width, in this invention, the light plane is orthogonal to the inner surface of the reference cylinder and oblique to the inner surface of the cylinder to be measured. However, the angle of the oblique intersection is close to orthogonal, and the extension of the light stripe width is not significant, which will not interfere with the accurate extraction of the light stripe and reduce the error caused by the width of the light stripe, thereby improving the accuracy of subsequent calculations. Furthermore, the transformation of the three-dimensional conical projection into a light plane projection also significantly shortens the distance between the laser and the cylindrical part. Even in the case of 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 the size detection error caused by the change of the posture of the part to be measured. This solves the problem in the existing technology where the light plane is oblique to the inner surface, resulting in a wider light stripe width and thus a large error in subsequent fitting calculations.
[0085] S200: Process several sets of first image information to obtain the pixel coordinates corresponding to the light stripes in each set of first image information. ;
[0086] In step S200, the light stripes are calculated using the Hessian matrix to obtain the pixel at the center of the light stripes. and the corresponding pixel coordinates .
[0087] The Hessian matrix is a symmetric square matrix composed of the second-order partial derivatives of a multivariate function, used to describe the local curvature characteristics of the function. The Hessian matrix is used to find the position "most like the center line" in the light stripe region, i.e., the place with the greatest curvature. Then, along the vertical direction of the light stripe (determined by the Hessian matrix), Gaussian fitting or the gray-level centroid method is used to find the sub-pixel position with the highest brightness, i.e., the center position of the light stripe. Finally, based on the pixels at the center position of the light stripe... Pixel coordinates are read directly from the first image information. .
[0088] S300: Convert the pixel coordinates of the light stripes into three-dimensional coordinates to obtain the reference cylindrical point cloud parameters. Measurement point cloud parameters of the cylinder to be measured ;
[0089] In step S300, the pixel coordinates of the light stripes are converted into three-dimensional coordinates using a set of conversion formulas, as follows:
[0090]
[0091]
[0092]
[0093]
[0094] Where f is the focal length of the industrial camera; For pixels Pixel coordinates; It is the origin of the pixel coordinate system, i.e., the position of the optical center; It is the light stripe and the pixel. The three-dimensional coordinates of the corresponding light point, A, B, C, and D are the coefficients of the equation of the light plane;
[0095] In the conversion formula group, the first two formulas are based on the pinhole model and use three-dimensional coordinates to represent pixel coordinates, but the two equations cannot solve for the three unknowns. Therefore, the light plane equation is introduced, and the pixel point The corresponding light spot's three-dimensional coordinates not only satisfy the pinhole model but also lie on the light plane. Therefore, by combining the equations, the three-dimensional coordinates of all light spots can be obtained. Based on the position of the laser front end after each advance, the three-dimensional coordinates of all light spots are divided into reference cylinder point cloud parameters and measured cylinder measurement point cloud parameters.
[0096] S400, based on the reference cylindrical point cloud parameters, respectively, using a cylindrical fitting method. Measurement point cloud parameters of the cylinder to be measured By performing fitting, the axis of the reference cylinder is obtained. and the axis of the cylinder to be measured ;
[0097] In step S400, the cylinder fitting method specifically includes the following steps:
[0098] S401. The expression for the inner surface of the cylinder is established as follows:
[0099]
[0100] Where j refers to the j-th ring; i refers to the i-th point on the ring. This refers to the coordinate parameters of the i-th point on the j-th annulus. R is the vector of the axis; R is the actual radius. These are the three-dimensional coordinates of the initial point on the axis;
[0101] S402. The first error equation is established as follows:
[0102]
[0103] Where j refers to the j-th ring; i refers to the i-th point on the ring. It is the actual radius of the i-th point on the j-th ring. and theoretical radius Deviation;
[0104] S403. The second error equation is established as follows:
[0105]
[0106] in, These are the three-dimensional coordinates of the initial point on the axis. R is the initial setting value of the three-dimensional coordinates of the initial point on the axis, and R is the actual radius. This is the initial setting value for the radius of the inner surface of the cylinder. It is the vector of the axis. This is the initial setting value for the axis vector;
[0107] S404. By simultaneously solving the first and second error equations, the intermediate formula is obtained as follows:
[0108]
[0109] S405. Taking the partial derivative with respect to f, we get... , , , , , , as follows:
[0110]
[0111] S406. Write the error equation in matrix form: Let n be the number of points, then:
[0112]
[0113]
[0114] S407, Solving using the least squares method ;
[0115]
[0116] The principle of the cylindrical 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 equal to the radius R. Therefore, by establishing the first error equation and the second error equation, and by calculating the partial derivative and the least squares method, the solution obtained by the least squares method is a cyclic iterative process. In each iteration, the initial value substituted 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 terminated. This resists the interference of point cloud noise and achieves accurate acquisition of the cylindrical axis, a point on the axis, and the radius.
[0117] The parameters of the benchmark cylindrical point cloud were processed using a cylindrical fitting method. Then step S407 solves for the corresponding It is the axis of the reference cylinder. The initial point of the reference cylinder axis and the radius of the reference cylinder Similarly, the cylindrical fitting method is used to process the point cloud parameters of the cylinder to be measured. Then the axis of the cylinder to be measured is obtained. The initial point of the axis of the cylinder to be measured and the radius of the cylinder to be measured .
[0118] S500, Select the reference cylinder axis Take office and the axis of the cylinder to be measured Take office Connection point and points Obtain common axis ;
[0119] In step S500, the common axis is obtained by the equation of the line connecting the two points, as follows:
[0120]
[0121] Where s is the solution coefficient; It is a point ; yes .
[0122] Within the scope of coaxiality testing, the detection deviation caused by the length difference and spatial distance between the reference axis and the measured axis is defined as amplification error. Therefore, when the heights of the reference cylinder and the measured cylinder are relatively small and the distance between them is large, a common axis is obtained by fitting the reference cylinder and the measured cylinder, and the coaxiality of the two cylinders relative to this common axis is evaluated separately. The larger value 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 axis of the reference cylinder is... Take office and the axis of the cylinder to be measured Take office The common axis formed by the connecting lines It better meets the actual needs of assembly and rotation in industrial production.
[0123] S600. Calculate the coaxiality using the first formula, which is as follows:
[0124]
[0125] Where t is the coaxiality between the reference cylinder and the cylinder to be measured. Refers to the axis of the reference cylinder and the axis of the cylinder to be measured any point on To the public axis The distance.
[0126] In step 500, the equation of the line connecting the two points is simplified to obtain the equation of the common axis, which is as follows:
[0127]
[0128] in, It is the axis of the reference cylinder. and the axis of the cylinder to be measured Take office coordinate parameters, It is a common axis The initial point coordinate parameters.
[0129] Next, the axis of the reference cylinder is calculated according to the vertical distance formula. and the axis of the cylinder to be measured any point To the public axis distance The formula for vertical distance is as follows:
[0130]
[0131] in, It is the axis of the reference cylinder. and the axis of the cylinder to be measured Take office coordinate parameters, It is a common axis The initial point coordinate parameters, It is a common axis Initial vector parameters;
[0132] Finally, the coaxiality is determined by selecting twice the maximum distance using the first formula.
[0133] Before step S100, the optical plane parameters are optimized using a first optimization method, which specifically includes the following steps:
[0134] S001. Using the ring gauge as the test piece, obtain several second image information containing light stripes through a visual acquisition method; when the ring gauge is used as the test piece, the image obtained by the visual acquisition method is taken as the second image information, which is different from the first image information in step S100.
[0135] 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 will not be repeated.
[0136] S003. Process the point cloud parameters of the inner surface of the ring gauge using the 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.
[0137] S004. Replace the ring gauge n times, and execute steps S001 to S003 after each replacement to obtain n sets of ring gauge parameters. The replacement of the ring gauge includes replacing it with a ring gauge of different sizes and adjusting the pose of the current ring gauge. By replacing the ring gauge, the ring gauge parameters obtained each time are different, which facilitates subsequent optimization and adjustment.
[0138] S005. Establish the residual optimization function. The formula for the residual optimization function is as follows:
[0139]
[0140] Where H is the intrinsic parameter matrix of the industrial camera; It is the radial distortion coefficient of an industrial camera; is the tangential distortion coefficient of the industrial camera; A, B, C, and D are the optical plane parameters; It is the projection coefficient of the angle between the industrial camera spindle and the displacement platform multiplied by the systematic error; Coaxiality i : The ring gauge parameter changed for the i-th time, i≤n;
[0141] Among them, the ring gauge is a standard part with various specifications and corresponding standard dimensions. The residual optimization function refers to the residual between the model prediction value and the actual observation value, specifically the residual between the standard dimension and the measured ring gauge parameters. In the actual measurement process, due to issues such as actual installation or equipment machining accuracy, the projection coefficient and systematic error of the angle between the industrial camera spindle and the displacement platform will occur. Therefore, the projection coefficient and systematic error of the angle between the industrial camera spindle and the displacement platform are denoted as... ,in addition The parameters for industrial cameras can be obtained using the Zhang Zhengyou calibration method.
[0142] S006. The residual optimization function is used as the objective function, and the LM algorithm is used to optimize the optical plane parameters.
[0143] The LM algorithm, short for Levenberg-Marquardt algorithm, is an optimization algorithm for solving nonlinear least squares problems. It iteratively optimizes based on initial values, ultimately outputting optimized eigenvalues. In this invention, the LM algorithm optimizes the output light plane parameters A, B, and C, whose represented light plane equations more closely approximate actual light plane projections, reducing errors caused by issues such as actual installation or equipment manufacturing precision. Furthermore, when assigning initial values to the residual optimization function, optionally, A=0, B=0, and C=1. The initial value of D is set as the initial design distance from the light plane to the optical center of the camera.
[0144] To verify the accuracy of the testing method, 30 sets of motor housings were selected and tested using the testing method of this invention and the coordinate measuring machine method, respectively. The experimental comparison data are as follows:
[0145]
[0146] The coordinate measuring machine (CMM) method requires detailed point-marking inspection of each part, acquiring a total of 120 data points. The inspection time for a single part is approximately 12 minutes, and the entire inspection process takes 6 hours to complete. However, the inspection method of this invention firstly controls the deviation within the range of 15μm, fully meeting the requirements for online non-contact dimensional inspection of coaxiality of columnar parts. Secondly, the measurement time for a single part is only 1-2 minutes, significantly shortening the dimensional inspection cycle and effectively reducing production costs.
[0147] In the description of this specification, the terms "connection," "installation," and "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0148] In the description of this specification, the terms "one embodiment," "some embodiments," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions 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 one or more embodiments or examples.
[0149] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for detecting the dimensions of the diffuse reflection inner surface of a columnar part, characterized in that, Specifically, the steps include the following: S100. A combination of a reference cylinder and a cylinder to be tested is selected as the test piece. Several first image information containing light stripes are obtained through a visual acquisition method. A light plane is generated in the visual acquisition method. The light plane is orthogonal to the inner surface of the reference cylinder. S200: Process several sets of the first image information to obtain the pixel coordinates corresponding to the light stripes in each set of the first image information. ; S300: Convert the pixel coordinates of the light stripes into three-dimensional coordinates to obtain the reference cylindrical point cloud parameters. Measurement point cloud parameters of the cylinder to be measured ; S400, Based on the reference cylindrical point cloud parameters, respectively, the cylindrical fitting method is used. and the measured point cloud parameters of the cylinder to be measured By performing fitting, the axis of the reference cylinder is obtained. and the axis of the cylinder to be measured ; S500, Select the reference cylindrical axis Take office and the axis of the cylinder to be measured Take office Connect the points and the points mentioned Obtain common axis ; S600. Calculate the coaxiality using the first formula, which is as follows: ; Where t is the coaxiality of the reference cylinder and the cylinder to be measured. This refers to the axis of the reference cylinder. and the axis of the cylinder to be measured any point on To the common axis The distance; The visual acquisition method specifically includes the following steps: S101, the displacement platform drives the industrial camera and laser to move a distance h along the axial direction of the workpiece under test. The industrial camera, laser and workpiece under test are coaxially arranged, and the axial 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 workpiece to form light stripes. The laser includes a coaxially arranged laser component and a conical lens. The field of view of the laser component is 2α, and the isosceles angle of the conical lens is... ; S103. The industrial camera captures light stripes on the inner surface of the workpiece under test to obtain an image containing light stripes; S104. Repeat steps S101 to S103 to obtain several images containing light stripes.
2. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 1, characterized in that, In step S200, the light stripes are calculated using the Hessian matrix to obtain the pixel at the center of the light stripes. and the corresponding pixel coordinates .
3. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 2, characterized in that, In step S300, the pixel coordinates of the light stripes are converted into three-dimensional coordinates using a set of conversion formulas, which are as follows: ; ; ; ; Where f is the focal length of the industrial camera; For pixels Pixel coordinates; It is the origin of the pixel coordinate system, i.e., the position of the optical center; It is the light stripe and the pixel. The three-dimensional coordinates of the corresponding light point, A, B, C, and D are the coefficients of the equation of the light plane.
4. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 1, characterized in that, In step S400, the cylinder fitting method specifically includes the following steps: S401. The expression for the inner surface of the cylinder is established as follows: ; Where j refers to the j-th ring; i refers to the i-th point on the ring. This refers to the coordinate parameters of the i-th point on the j-th annulus. R is the vector of the axis; R is the actual radius. These are the three-dimensional coordinates of the initial point on the axis; S402. The first error equation is established as follows: ; Where j refers to the j-th ring; i refers to the i-th point on the ring. It is the actual radius of the i-th point on the j-th ring. and theoretical radius Deviation; S403. The second error equation is established as follows: ; in, These are the three-dimensional coordinates of the initial point on the axis. R is the initial setting value of the three-dimensional coordinates of the initial point on the axis, and R is the actual radius. This is the initial setting value for the radius of the inner surface of the cylinder. It is the vector of the axis. This is the initial setting value for the axis vector; S404. By simultaneously solving the first and second error equations, the intermediate formula is obtained as follows: ; S405. Taking the partial derivative with respect to f, we get... , , , , , , as follows: ; S406. Write the error equation in matrix form: Let n be the number of points, then: ; ; S407, Solving using the least squares method ; 。 5. The method for detecting the diffuse reflection inner surface dimensions of a columnar part 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: ; Where s is the solution coefficient; It is a point ; yes .
6. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 5, characterized in that, In step 500, the equation of the line connecting the two points is simplified to obtain the equation of the common axis, which is as follows: ; in, It is the axis of the reference cylinder. and the axis of the cylinder to be measured Take office coordinate parameters, It is a common axis The initial point coordinate parameters.
7. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 6, characterized in that, The axis of the reference cylinder is calculated using the vertical distance formula. and the axis of the cylinder to be measured any point To the public axis distance The formula for the vertical distance is as follows: ; in, It is the axis of the reference cylinder. and the axis of the cylinder to be measured Take office coordinate parameters, It is a common axis The initial point coordinate parameters, It is a common axis Initial vector parameters.
8. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 4, characterized in that, Before step S100, the optical plane parameters are optimized using a first optimization method, which specifically includes the following steps: S001. Using the ring gauge as the test piece, obtain several second image information containing light stripes through the visual acquisition method. 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. S003. The point cloud parameters of the inner surface of the ring gauge are processed by the cylindrical fitting method to obtain the 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. Replace the ring gauge n times, and after each replacement, execute steps S001 to S003 to obtain n sets of ring gauge parameters. S005. Establish the residual optimization function. The formula for the residual optimization function is as follows: ; Where H is the intrinsic parameter matrix of the industrial camera; It is the radial distortion coefficient of an industrial camera; is the tangential distortion coefficient of the industrial camera; A, B, C, and D are the optical plane parameters; It is the projection coefficient of the angle between the industrial camera spindle and the displacement platform multiplied by the systematic error; Coaxiality i : The ring gauge parameter changed 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 optical plane parameters.
9. The method for detecting the diffuse reflection inner surface dimensions of a columnar part according to claim 8, characterized in that, In step S004, changing the ring gauge includes replacing it with a ring gauge of a different size and adjusting the position of the current ring gauge.