A calibration method for online measurement system of external cylindrical surface machining based on line structured light

Through the calibration method of the cylindrical surface processing online measurement system based on line structured light, the impact of the accuracy of the target workpiece on the calibration accuracy is solved, the debugging process is simplified, the measurement accuracy and efficiency are improved, and high-precision three-dimensional measurement is achieved.

CN117781939BActive Publication Date: 2024-08-23CHAOHU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311739047.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2024-08-23
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

In the existing technology, the manufacturing accuracy of the target workpiece has a greater impact on the calibration accuracy. It is difficult to manufacture high-precision target workpieces. Calibration and debugging are difficult and errors accumulate, which affects the measurement results.

Method used

The calibration method of the online measurement system for cylindrical surface processing based on line structured light is adopted. By vertically irradiating the laser to the target workpiece, collecting the light pattern image, determining the projection characteristics of the structured light, performing feature extraction and fitting of the mapping relationship, and establishing the target cross-section cylindrical and the mapping relationship between the fitting ellipse in the image plane, and the interpolation function is used for system calibration, which reduces the impact of noise and improves the calibration accuracy.

Benefits of technology

High-precision calibration is achieved without the need for high-precision target workpiece manufacturing, device debugging is simplified, error accumulation is reduced, and calibration efficiency and measurement accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117781939B
    Figure CN117781939B
Patent Text Reader

Abstract

The present invention belongs to the field of online measurement technology, and discloses a calibration method of an online measurement system for outer cylindrical surface processing based on line structured light, which includes the following steps. Step 1: irradiate the target workpiece with laser vertically and collect light pattern images to measure the diameter of the outer circle of the target cross section; Step 2: determine the projection characteristics of the structured light from the image, and extract the features of the mapping relationship; Step 3: perform feature analysis; Step 4: perform elliptical equation fitting on the image point set based on the analysis, and calculate the fitted elliptical feature parameters; Step 5: repeat the process of steps 1 to 4 multiple times, and complete the calibration of the line structured light measurement system based on the collected discrete data and interpolation function to establish the mapping relationship between the outer diameter of the target cross section and the fitted elliptical feature parameters in the image plane. The present invention only needs to mechanically measure the actual size to achieve high-precision calibration, without establishing the corresponding relationship between the object point and the image point, and effectively reduces the influence of noise points in the image point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of online measurement, and in particular relates to a calibration method of an online measurement system for outer cylindrical surface machining based on line structured light. Background Art

[0002] In the current field of mechanical processing and manufacturing, on-machine three-dimensional measurement of workpieces is an effective means to timely discover workpiece processing quality problems, and it is of great significance in ensuring processing accuracy and reducing scrap rates. As one of the typical three-dimensional non-contact measurement technologies, line structured light measurement has the advantages of low cost, high efficiency, high precision, and strong real-time performance, and has been increasingly widely used in the field of mechanical processing and manufacturing. Line structured light measurement is a technology that projects a light plane onto the surface of an object through a line structured light sensor, obtains the intersection line between the light plane and the surface of the object to be measured, and thus restores its three-dimensional coordinates. Then, the third-axis motion information is added to splice the intersection line contour, so that the three-dimensional surface contour of the complex object surface can be accurately measured. Among them, obtaining the relative position relationship between the image point and the object point is called system calibration, which is the core link in the entire line structured light three-dimensional measurement and will directly affect the measurement accuracy.

[0003] The calibration methods of line structured light measurement systems currently mainly include two categories: traditional calibration methods and direct calibration methods. The calibration process of the traditional calibration method is divided into two steps: first complete the camera calibration, and then perform the line structured light plane calibration. In order to improve the calibration accuracy of the above method, the corresponding calibration model will become more complex, the amount of calculation will increase, and the calibration process will be relatively cumbersome, so it is not suitable for on-machine measurement and calibration. The direct calibration method obtains the image coordinates of the feature points with known three-dimensional spatial coordinates in the workspace, establishes a mapping relationship between the image coordinates and the three-dimensional spatial coordinates, and then uses the mapping relationship to restore the spatial coordinates of the image points to complete the model reconstruction and measurement work. However, although this type of method can complete the calibration of the line structured light measurement system and has achieved certain results, it still has some shortcomings, mainly manifested as follows: the existing technology completes the calibration by establishing a mapping relationship between object points and image points, but the noise in the image points will affect the mapping relationship, thereby affecting the calibration accuracy; the target workpiece has very high precision requirements, and manufacturing high-precision target workpieces is a challenging task; in addition, the debugging of the calibration system device requires rich experience and appropriate methods, the calibration efficiency is low, and the random error is large; in addition, the difference between the morphological features of a specific target workpiece and the object being measured causes the error to accumulate and increase. Therefore, how to reduce the impact of the manufacturing accuracy of the target workpiece on the calibration accuracy, reduce the difficulty of debugging, and avoid error accumulation has become a technical problem that technicians need to solve. Summary of the invention

[0004] The purpose of the present invention is to provide a calibration method for an online measurement system for outer cylindrical surface machining based on line structured light, so as to solve the technical problems in the prior art that the manufacturing accuracy of the target workpiece has a great influence on the calibration accuracy, it is difficult to manufacture high-precision target workpieces, it is difficult to debug during calibration, and the difference between the target workpiece and the object causes error accumulation.

[0005] The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light comprises the following steps.

[0006] Step 1: Irradiate the target workpiece with laser vertically and collect the light pattern image to measure the diameter of the outer circle of the target cross section.

[0007] Step 2: Determine the structured light projection features from the image and perform feature extraction of the mapping relationship.

[0008] Step three, perform feature analysis; fit the object point set into a curve, which is the outer circle of the target cross section, and fit the image point set into a quadratic curve, which is an ellipse. Establish a mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane, and the diameter of the outer circle of the target cross section can be calculated based on the image point set.

[0009] Step 4: Fit the ellipse equation to the image point set based on the analysis and calculate the characteristic parameters of the fitted ellipse.

[0010] Step 5: Repeat the process from step 1 to step 4 multiple times. After repeating the process from step 1 to step 4 n times, n sets of discrete data (R i ,f(X i )), i = 1, 2, ..., n. Among them, R i represents the true diameter of the outer circle of the target cross section of the i-th group in the discrete data, f(X i ) represents the i-th group of discrete data and R i There is a fitting ellipse with a mapping relationship. Based on the interpolation function P(X), a mapping relationship between the outer diameter of the target cross section and the characteristic parameters of the fitting ellipse in the image plane is established to complete the calibration of the line structured light measurement system.

[0011] Preferably, in step 5, f(X) is the characteristic function of the fitted ellipse, expressed as:

[0012] f(X) = g(r a , r b )

[0013] In the above formula, f(X) is related to the characteristic parameters of the fitted ellipse, which include the major axis r a and short axis r b ; Since the area of ​​the fitted ellipse S e The calculation formula is S e =π*r a *rb , target cross-sectional area S c The calculation formula is: S c =π*R 2 , R represents the true diameter of the outer circle of the target cross section, and the interpolation function P(X) makes P(S e )=S c If established, It is established and used to describe the mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane; the discrete data is organized into (S ci , S ei ), S ci , S ei Represents the target cross-sectional circular area and the fitted ellipse area of ​​the i-th group.

[0014] Preferably, in the step 1, a cross-sectional position is selected on the target workpiece based on the irradiation position, and its diameter R value is measured and recorded, where R represents the true diameter of the outer circle of the target cross-sectional area.

[0015] Preferably, in the step 2, stripe area detection is performed on the light stripe image to determine the stripe image, and then fitting is performed to extract the center line to obtain a set of image points.

[0016] Preferably, in step 3, the intersection curve between the light plane and the target workpiece surface is a curve on the outer circle of the target cross section (w), and the target cross section is at O w -X w Y w The general equation of the outer circle of the target cross section is expressed in matrix form as follows:

[0017]

[0018] Among them, G is the homogeneous coordinate matrix of the quadratic curve, and A, B, C, D, E, and F are the coefficients of the general equation of the outer circle of the target cross section.

[0019] The spatial coordinates (x, y) of any object point on the intersecting curve T , which should also be a point on the outer circle of the target cross section. The homogeneous coordinate form of this point is (x, y, 1) T Recorded as Then we have:

[0020]

[0021] For any The calculation formula of the projection point in the image plane is: The homogeneous coordinates of the image point m are expressed as The mapping relationship between the homogeneous coordinate form of the object point and the homogeneous coordinate form of the image point is described by a homography matrix H, then:

[0022]

[0023] Where F = H -T GH -1 , F represents the homogeneous coordinate matrix of the quadratic curve.

[0024] make a, b, c, d, e, f are the coefficients of the general equation of the quadratic curve in the plane, then the general equation of the quadratic curve in the image plane is expressed as:

[0025] ax 2 +by 2 +2cxy+2dx+2ey+f=0

[0026] Therefore, the projection of the outer circle of the target cross section in the image plane is still a quadratic curve, which is an elliptic curve, and the image points corresponding to all object points on the intersecting curve are on the elliptic curve described by the above formula.

[0027] Preferably, in step 4, the center of the outer circle of the target cross section coincides with the origin of the space coordinates where the image point set is located, and the equation of the outer circle of the target cross section is:

[0028]

[0029] The equation of the quadratic elliptic curve is:

[0030] x 2 +a·xy+b·y 2 +c·x+d·y+e=0

[0031] Wherein, D represents the diameter of the outer circle of the target cross section, which is the measured feature.

[0032] Substitute the pixel coordinates obtained based on the center of the line structured light stripe into the quadratic elliptic curve equation. According to the least squares principle, the objective function of the fitting is:

[0033]

[0034] Among them, a, b, c, d, e are the coefficients of the quadratic elliptic curve equation. Solving the equation obtains the values ​​of a, b, c, d, e, and completes the ellipse fitting.

[0035] Preferably, in step five, a cubic spline interpolation function is used as the interpolation function.

[0036] Preferably, in the step 2, an extremum method is used to extract the center line of the fringe image from the image.

[0037] The present invention has the following advantages.

[0038] (1) The calibration target used in this method does not require high-precision manufacturing and can achieve high-precision calibration by simply mechanically measuring the actual size.

[0039] (2) The calibration target used in this method is a machined part, which does not require special installation and debugging. The debugging requirements of the device can be met only by the clamping accuracy of the machine tool itself.

[0040] (3) The calibration target used in this method is an outer circular surface, and the system measurement object is also an outer circular surface. The morphological features of the target and the object being measured are unified, which can reduce the cumulative error.

[0041] (4) This method does not need to establish the correspondence between object points and image points, but directly establishes the correspondence between the fitting features of the object point set and the image point set by fitting the object point set and the image point set, which can effectively reduce the influence of noise points in the image points. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 The present invention is a flow chart of a method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light.

[0043] Figure 2 Schematic diagram of the outer circular surface machining method in an embodiment of the present invention.

[0044] Figure 3 It is a schematic diagram of the measurement principle of the line structured light measurement system of the present invention.

[0045] Figure 4 This is the comparison result of the outer diameter of the target cross section before and after the cubic spline interpolation processing used in the present invention.

[0046] Figure 5 This is a comparison diagram of the 3D model generated by the present invention and the real circular workpiece when the model is scanned and verified. The upper part of the figure is a photo of the real circular workpiece, and the lower part is a diagram of the generated 3D model. DETAILED DESCRIPTION

[0047] The specific implementation modes of the present invention will be further explained in detail below by describing the embodiments with reference to the accompanying drawings, so as to help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention.

[0048] In order to overcome the technical problems existing in the background technology and complete the real-time measurement work in the process of machining the outer circular surface, this scheme draws on the mapping idea in the direct calibration method, takes any processed outer circular surface as the target, sets the line structured light plane, extracts the intersection line between the light plane and the target surface, and fits the quadratic curve after image processing. Analyze the projection features of the quadratic curve, find the relationship between the projected quadratic curve and the features of the measured object, try to directly establish the mapping relationship between the quadratic elliptic curve features and the outer circular surface diameter in the image coordinate system based on the interpolation function, compare and select the appropriate interpolation function, complete the final calibration of the line structured light measurement system (i.e., the outer circular surface machining online measurement system based on line structured light), and conduct measurement and scanning experiments.

[0049] The outer circular surface is the main surface of rotating parts such as shafts, sleeves and discs, and is one of the most common surfaces in mechanical processing. Common machining methods for outer circular surfaces include turning, grinding and various finishing methods. Figure 2 Taking the turning process shown in the figure as an example, after the workpiece is positioned and clamped by a fixture (chuck), it is driven to rotate around the center axis of the workpiece, and the relative motion between it and the corresponding tool forms the main cutting motion. c Indicates that the tool, driven by the working platform, moves in a straight line along the center axis of the workpiece as the feed motion, which is indicated by v f Indicates. The cutting of the outer cylindrical surface is completed under the joint action of the main motion and the feed motion. The most important measurement feature of the outer cylindrical surface of the rotating body parts is the diameter size at different cross-sectional positions. The traditional measurement method is to stop the machine tool, remove the workpiece, and use a measuring tool to measure. The work efficiency is low and is greatly affected by human factors. This solution adopts line structured light measurement technology to realize the on-machine real-time measurement system during the machining of the outer cylindrical surface, focusing on completing the system calibration.

[0050] The line structured light measurement system targeted by this method is Figure 3 As shown in the figure, it is mainly composed of a single-line laser and a CCD camera. The line structured light sensor projects a laser line, forming a light plane π in three-dimensional space, which intersects with the surface of the object to be measured to form a curve. After the curve is captured by the camera, the image of the intersection curve can be obtained. w -X w Y w Z w is the spatial coordinate system of the object, where O w Z w The axis coincides with the center axis of the workpiece, and the optical plane π coincides with O w Z w Axis perpendicular to O w -X w Y w Surface overlap; O c -X cY c Z c is the camera coordinate system, point O c represents the origin of the coordinate system, O c Z c is the camera optical axis; o-uv represents the camera image coordinate system, and the origin o of the coordinate system is defined at the upper left corner of the camera image plane.

[0051] Under the camera pinhole imaging model, it is assumed that an object point P is a point on the intersection curve of the light plane and the surface of the workpiece to be measured. The coordinates of this point in the spatial coordinate system are M = (X wi , Y wi , Z wi ), whose homogeneous seat is The coordinates of the image point p corresponding to point P in the image coordinate system are m=(u i , v i ), homogeneous coordinate representation According to the linear transformation, the imaging geometric relationship between the image point and the object point is expressed in the form of a perspective projection matrix in homogeneous coordinates:

[0052]

[0053] Where: s is the scale factor, matrix A is the intrinsic parameter matrix of the camera, R is the 3×3 unit orthogonal rotation matrix, and t is the 3×1 translation vector. The jth (j=1,2,3) column element of the rotation matrix R is composed of r j If , then formula (1) can be expressed as:

[0054]

[0055] Since the curve where the light plane intersects the workpiece contains feature points that are not on the same straight line, they can be combined into a virtual feature plane, which coincides with the light plane and is consistent with the O of the spatial coordinate system. w -X w Y w The surfaces overlap, and Z w =0, then formula (2) can be rewritten as:

[0056]

[0057] Formula (3) can directly establish the mapping relationship between the image coordinate point and the three-dimensional coordinate point in space.

[0058] Since the light plane is O in the space coordinate system w -X w Y w plane, so the image coordinate u can correspond to the spatial coordinate Y w , the image coordinate v corresponds to the space coordinate X wTherefore, the homogeneous coordinates of the object point M can be expressed as The homogeneous coordinates of the image point m can be expressed as The mapping relationship between the two can be described by a homography matrix H, then:

[0059]

[0060] Where H = A[r1r3t], which is a 3×3 matrix. Space coordinate Z w The location information is provided by the mobile platform.

[0061] like Figure 1 As shown, the present invention provides a method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light, which includes the following steps.

[0062] Step 1: Irradiate the target workpiece with laser vertically and collect the light pattern image to measure the diameter of the outer circle of the target cross section.

[0063] The laser is irradiated vertically to the target workpiece by the laser, and the resulting line structured light pattern image is collected by the CCD camera. A cross-section position is selected on the target workpiece based on the irradiation position, and its diameter R value is measured and recorded using a micrometer. R represents the true diameter of the outer circle of the target cross section.

[0064] Step 2: Determine the structured light projection features from the image and perform feature extraction of the mapping relationship.

[0065] The stripe area detection is performed on the light stripe image to determine the stripe image, and then the center line is extracted by fitting to obtain the image point set m i =(u i ,v i ).

[0066] Step 3: Perform feature analysis.

[0067] In such Figure 3 In the line structured light measurement system shown in FIG. 1 , the intersection curve between the light plane and the target workpiece surface is a curve on the outer circle of the target cross section (ω). w -X w Y w In the plane and coincident with the light plane. Since the circle is a special form of a quadratic curve, its general equation can be expressed as:

[0068] Ax 2 +By 2 +2Cxy+2Dx+2Ey+F=0 (5)

[0069] Convert it into matrix form as follows:

[0070]

[0071] Where G is a 3×3 symmetric matrix, called the homogeneous coordinate matrix of the quadratic curve.

[0072] The spatial coordinates (x, y) of any object point on the intersection curve T , which should also be a point on the outer circle of the target cross section. The homogeneous coordinate form of this point is (x, y, 1) T Recorded as Then equation (6) is simplified to:

[0073]

[0074] In addition, from formula (4), we can see that for any The calculation formula of the projection point in the image plane is: Substituting equation (4) into equation (7) yields:

[0075]

[0076] Where F = H -T GH -1 , F is still a 3×3 symmetric matrix, representing the homogeneous coordinate matrix of the quadratic curve.

[0077] make Then the general equation of the quadratic curve in the image plane can be expressed as:

[0078] ax 2 +by 2 +2cxy+2dx+2ey+f=0 (9)

[0079] Therefore, O w -X w Y w The projection of the outer circle of the target cross section in the plane on the image plane is still a quadratic curve, which is an elliptic curve, and the image points corresponding to all object points on the intersecting curve are on the elliptic curve described by formula (9).

[0080] Step 4: Fit the ellipse equation to the image point set based on the analysis, and calculate the fitting ellipse characteristic parameters of the ellipse equation.

[0081] Through the previous analysis, it is clear that the intersection curve between the light plane and the target workpiece surface (i.e., the set of object points) is on the outer circle of the target cross section; the projection of the outer circle of the target cross section in the image plane is an ellipse; the projection of the intersection curve in the image plane (i.e., the set of image points) is on the ellipse. In other words, fitting the set of object points into a curve is the outer circle of the target cross section, and fitting the set of image points into a quadratic curve is the ellipse. On this basis, this solution will directly establish the mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane when calibrating the online structured light measurement system.

[0082] exist Figure 2 In the line structured light measurement system shown in FIG. 1 , the center of the outer circle of the target cross section described by equation (5) is aligned with the origin of the spatial coordinate system O w If they coincide, equation (5) can be simplified to:

[0083]

[0084] The quadratic elliptic curve equation represented by equation (9) can be simplified to:

[0085] x 2 +a·xy+b·y 2 +c·x+d·y+e=0 (11)

[0086] Where D represents the diameter of the outer circle of the target cross section, which describes the most important measured feature of the outer circle surface of rotating parts.

[0087] P i (x i ,y i )(i=1, 2, 3, 4...N) is a point in the image point set. When N≥6, according to the least squares principle, the objective function of the fitting is:

[0088]

[0089] Solve the equation to get the values ​​of a, b, c, d, and e, and complete the ellipse fitting. Based on the geometric knowledge of the ellipse, the four characteristic parameters of the ellipse are further calculated, namely: the position center (x0, y0), the major axis r a 、Short axis r b and the major axis inclination angle θ.

[0090] To sum up the above analysis, this step establishes the mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane, which is specifically achieved by directly establishing the mapping relationship between the four characteristic parameters of the fitted ellipse in the image plane and the outer circle diameter of the target cross section in the spatial coordinate system.

[0091] Step 5: Repeat the process of steps 1 to 4 multiple times to obtain multiple sets of discrete data for establishing a mapping relationship, establish a mapping relationship between the outer diameter of the target cross section and the characteristic parameters of the fitted ellipse in the image plane based on the interpolation function, and complete the calibration of the line structured light measurement system.

[0092] After repeating steps 1 to 4 n times, we can obtain n sets of discrete data (R i ,f(X i )), i = 1, 2, ..., n. Among them, R i represents the true diameter of the outer circle of the target cross section of the i-th group in the discrete data, f(X i ) represents the i-th group of discrete data and Ri There is a mapping relationship between the fitted ellipse, f(X) is the characteristic function of the fitted ellipse, expressed as:

[0093] f(X) = g((x, y), r a , r b ,θ) (13)

[0094] In the above formula, f(X) is related to the four characteristic parameters of the fitted ellipse (position center (x0, y0), major axis r a 、Short axis r b and the major axis inclination angle θ), expressed as g((x, y), r a , r b , θ). When formula (13) holds, the function R = f(X) is defined on the interval [a, b], and it is known that at the point a≤X0≤X1≤X2...≤X n ≤The value on b is R0, R1, R2...R n , there exists an interpolation function P(X) such that P(f(X i ))=R i The mapping relationship between the outer diameter of the target cross section and the characteristic parameters of the fitted ellipse in the image plane is established based on the interpolation function P(X), and the calibration of the line structured light measurement system is completed.

[0095] After analyzing the discrete data, it was found that during the operation of the machine tool, there was no obvious mapping relationship between the coordinates of the position center, the major axis inclination of the ellipse, and the outer diameter of the target section, and their contribution to the measurement characteristics could be ignored.

[0096] Therefore, formula (13) can be simplified as:

[0097] f(X) = g(r a , r b ) (14)

[0098] The above formula shows that the characteristic function f(X) of the fitted ellipse corresponding to the outer circle of the target cross section is only related to the major axis r a and short axis r b The major axis r of the fitted ellipse a and short axis r b Will directly determine the area of ​​the fitted ellipse, the area of ​​the fitted ellipse S e The calculation formula is as follows:

[0099] S e =π*r a *r b (15)

[0100] Then let:

[0101] f(X) = g(r a , rb )=S e (16)

[0102] That is, the area of ​​the fitted ellipse S e The calculation formula is used as the characteristic function f(X) of the fitted ellipse.

[0103] In addition, since the target cross-sectional area S c The calculation formula is: S c =π*R 2 , R represents the true diameter of the outer circle of the target cross section, so the discrete data can be organized into (S ci , S ei ), S ci , S ei represents the target cross-sectional circular area and the fitted ellipse area of ​​the i-th group. If there exists a function P(X), such that P(S e )=S c If established, If it holds, the interpolation function P(X) can describe the mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane.

[0104] As for the difference function, by comparing the errors produced by selecting different interpolation functions, it is found that the maximum error rate and maximum error value produced by the cubic spline interpolation method can meet the higher accuracy requirements. Therefore, the cubic spline interpolation function is used as the interpolation function.

[0105] The method of the present invention is verified by a calibration experiment.

[0106] The line structured light measurement system used in the experiment includes the following experimental instruments: MV-CA130-20GC camera (HIKVISION China), with a resolution of 1280 pixels × 1024 pixels, a pixel size of 4.8um × 4.8um, and a lens focal length of 8mm; the wavelength of the line laser is 650nm. The distance between the line laser and the CCD is about 300mm, and the angle between the two optical axes is about 30°. This experiment uses an ordinary CNC lathe with a maximum processing diameter of 320mm and a maximum processing length of 800mm.

[0107] The target workpieces of this experiment are two stepped conical workpieces. The actual size of each step position is measured and recorded using a micrometer. At the same step position, the measurement is repeated 5 times to obtain 5 images with laser. Each target image is processed. First, the region of interest is extracted; then the image is median filtered to obtain a line structured light pattern image with interference information filtered out; finally, the center point of the structured light pattern and the image coordinate point set are obtained based on the centroid method. The ellipse equation is fitted, and the position center (x0, y0) of the ellipse and the major axis r are calculated. a 、Short axis r bThe above processing is performed on the 9 positions of each stepped cone workpiece, and a total of 18 sets of corresponding discrete data of fitting ellipse features and outer diameter of target cross section are obtained, as shown in Table 1.

[0108] Table 1: Discrete data table

[0109]

[0110] After analyzing the above data, it is found that during the operation of the machine tool, there is no obvious mapping relationship between the center position coordinates and the major axis inclination of the ellipse and the outer diameter of the target section, and their contribution to the measurement characteristics can be ignored.

[0111] This scheme will focus on establishing the mapping relationship between the major and minor axis characteristic dimensions of the combined ellipse and the outer diameter of the target cross section. ci ,S ei ), S ci , S ei represents the target cross-sectional circular area and the fitted ellipse area of ​​the i-th group. By using the function P(X), P(S e )=S c If it holds, the interpolation function P(X) can describe the mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane.

[0112] According to the data listed in Table 1, the area of ​​the fitted ellipse is calculated according to formula (15), and the outer circle area of ​​the target cross section is calculated. There is a certain linear relationship between the outer circle area of ​​the target cross section and the area of ​​the fitted ellipse. However, the maximum error rate of the difference function obtained by linear interpolation of the above 18 sets of discrete data to calculate the outer circle diameter of the target cross section is 2.91%, and the maximum error value is 0.376mm. Obviously, the measurement accuracy of this method is low.

[0113] Considering that cubic spline fitting interpolation has a good effect in data smoothing and denoising, cubic spline is used to interpolate the outer circle area of ​​the target cross section and the area of ​​the fitting ellipse. The comparison results of the outer circle diameter of the target cross section before and after interpolation are as follows: Figure 4 As shown. The results show that cubic spline fitting can eliminate the dependence on model selection in fitting and has good adaptability. Linear interpolation is performed on the above 18 sets of discrete data to calculate the outer diameter of the target cross section. It can be seen that the maximum error rate is 0.22%, the maximum error value is 0.031mm, and the fitting accuracy is greatly improved compared with the linear fitting result.

[0114] Therefore, this method finally uses the cubic spline function interpolation method to directly establish the corresponding relationship between the characteristics of the fitted ellipse in the image plane and the outer diameter of the target cross section in the spatial coordinate system, completing the calibration of the line structured light measurement system.

[0115] Afterwards, the method was tested for repeatability, measurement accuracy and model scanning verification.

[0116] Repeatability test is to repeat the measurement at the same diameter position of the target workpiece, and calibrate and calculate the size of the outer diameter of the target cross section through this method, calculate and count the repeatability error δ of the output results of multiple measurements, and it can be obtained that the repeatability error of the outer diameter measurement is less than 2%, indicating that the measurement repeatability accuracy of this method is high.

[0117] Multiple groups of ellipse characteristic parameters at the same step position are calculated respectively, and each parameter is weighted averaged and recorded as the ellipse characteristic parameter value at that position. The maximum measurement error is 0.102, the minimum measurement error is only 0.024mm, the average measurement error is 0.080mm, and the relative error is less than 0.5%. This shows that the measurement method has high measurement accuracy and can measure the diameter size characteristics of the outer circular surface on the machine.

[0118] The model scanning verification is to process a specific circular workpiece on a CNC lathe, and use the calibrated line structured light measurement system to continuously scan the workpiece. A total of 213 structured light stripe images are extracted and fitted ellipse processing is performed. The corresponding target cross-section outer circle diameter size is interpolated to obtain the light stripe image and the fitted ellipse image. w -X w Y w The coordinates of points on the outer circle of the target cross section in the plane, with the angle between each point being γ (γ = 2°). Space coordinate Z w The position information comes from each scan, that is, it is provided by the CNC lathe tool turret moving platform. The line structured light measurement system of this method is used to calculate the corresponding target cross-section outer diameter, and the 3D model generated based on this data is basically the same as the specific circular workpiece. See the comparison diagram Figure 5 , which verifies the real-time performance of the calibration results of this method.

[0119] The present invention is described above by way of example in conjunction with the accompanying drawings. It is obvious that the specific implementation of the present invention is not limited to the above-mentioned method. As long as various non-substantial improvements are made using the inventive concept and technical solution of the present invention, or the inventive concept and technical solution are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.

Claims

1. A method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light, characterized in that: The following steps are involved: Step 1: irradiate the target workpiece with laser vertically and collect the light pattern image to measure the diameter of the outer circle of the target cross section; Step 2: Determine the structured light projection features from the light pattern image and extract the features of the mapping relationship; Step 3: Perform feature analysis: Fit the object point set into a curve, which is the outer circle of the target cross section; fit the image point set into a quadratic curve, which is an ellipse; establish a mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane, and calculate the diameter of the outer circle of the target cross section based on the image point set; Step 4: Fit the ellipse equation to the image point set based on the analysis, and calculate the characteristic parameters of the fitted ellipse; Step 5: Repeat the process from step 1 to step 4 multiple times. After repeating the process from step 1 to step 4 n times, n sets of discrete data (R i ,f(X i )), i = 1, 2, ..., n; where R i represents the true diameter of the outer circle of the target cross section of the i-th group in the discrete data, f(X i ) represents the i-th group of discrete data and R i There is a fitting ellipse with a mapping relationship. Based on the interpolation function P(X), a mapping relationship between the outer diameter of the target cross section and the characteristic parameters of the fitting ellipse in the image plane is established to complete the calibration of the line structured light measurement system.

2. The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light according to claim 1, characterized in that: In the step 5, f(X) is the characteristic function of the fitted ellipse, expressed as: f(X)=g(r a ,r b ) In the above formula, f(X) is related to the characteristic parameters of the fitted ellipse, which include the major axis r a and the short axis r b ; Since the area of ​​the fitted ellipse S e The calculation formula is S e =π*r a *r b , target cross-sectional area S c The calculation formula is: S c =π*R 2 , R represents the true diameter of the outer circle of the target cross section, and the interpolation function P(X) makes P(S e )=S c If established, It is established and used to describe the mapping relationship between the outer circle of the target cross section and the fitted ellipse in the image plane; the discrete data is organized into (S ci ,S ei ), S ci , S ei Represents the target cross-sectional circular area and the fitted ellipse area of ​​the i-th group.

3. The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light according to claim 1 or 2, characterized in that: In the step 1, a cross-sectional position is selected on the target workpiece based on the irradiation position, and its diameter R value is measured and recorded, where R represents the true diameter of the outer circle of the target cross-sectional area.

4. The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light according to claim 3, characterized in that: In the step 2, the stripe region detection is performed on the light stripe image to determine the stripe image, and then the center line is extracted by fitting to obtain the image point set m=(u i ,v i ).

5. The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light according to claim 4, characterized in that: In the step 3, the intersection curve between the light plane and the target workpiece surface is a curve on the outer circle of the target cross section (ω). w -X w Y w The general equation of the outer circle of the target cross section is expressed in matrix form as follows: Where G is the homogeneous coordinate matrix of the quadratic curve, A, B, C, D, E, F are the coefficients of the general equation of the outer circle of the target cross section; The spatial coordinates (x, y) of any object point on the intersecting curve T , which should also be a point on the outer circle of the target cross section, and the homogeneous coordinate form of this point is (x, y, 1) T Recorded as Then we have: For any The calculation formula of the projection point in the image plane is: The homogeneous coordinates of the image point m are expressed as The mapping relationship between the homogeneous coordinate form of the object point and the homogeneous coordinate form of the image point is described by a homography matrix H, then: Where F = H -T GH -1 , F represents the homogeneous coordinate matrix of the quadratic curve; make a, b, c, d, e, f are the coefficients of the general equation of the quadratic curve in the plane, then the general equation of the quadratic curve in the image plane is expressed as: ax 2 +by 2 +2cxy+2dx+2ey+f=0 Therefore, the projection of the outer circle of the target cross section in the image plane is still a quadratic curve, which is an elliptic curve, and the image points corresponding to all object points on the intersecting curve are on the elliptic curve described by the above formula.

6. The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light according to claim 1, characterized in that: In the step 5, a cubic spline interpolation function is used as the interpolation function.

7. The method for calibrating an online measurement system for outer cylindrical surface machining based on line structured light according to claim 4, characterized in that: In the step 2, the center line of the fringe image is extracted from the fringe image using an extreme value method.