Method for detecting ovality of wire rod by using combined plane mirror

By combining planar mirror technology and multi-camera system, the existing wire ellipticity detection methods have solved the problems of low accuracy and complex operation, and efficient, accurate and lossless wire ellipticity detection is achieved, which is suitable for the rapid detection needs of modern industries.

CN119984092APending Publication Date: 2025-05-13NANJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510177002.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing wire ellipticity detection methods have low accuracy, cumbersome operation, high cost, poor anti-interference ability and difficulty in meeting the modern industry's demand for rapid and non-destructive testing.

Method used

Using combined plane mirror technology, multi-angle reflective light paths are constructed through multi-camera systems to achieve rapid data acquisition of wire cross-sectional geometry, and accurately calculate ellipticity in combination with specific algorithms.

Benefits of technology

It improves detection accuracy, avoids mechanical damage to the object to be tested, reduces equipment costs and maintenance complexity, adapts to complex production environments, and realizes real-time dynamic online inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119984092A_ABST
    Figure CN119984092A_ABST
Patent Text Reader

Abstract

According to the method for detecting the ovality of the wire rod by using the combined plane mirror, the combined plane mirror technology is innovatively adopted to change the light path direction and optimize the optical path design, so that the structure of a detection device is simpler and more efficient, and compact spatial layout is realized, thereby effectively reducing the manufacturing cost and the use overhead of equipment and improving the detection efficiency. And the interference problem caused by difficult arrangement of each device on a production line is avoided. A non-contact measurement method is adopted, direct contact with a wire is avoided, mechanical damage to a measured object is reduced, and the detection applicability is remarkably improved; according to the method, rapid data acquisition of the geometrical shape of the section of the wire is realized by utilizing optical reflection characteristics, and the ovality of the wire is accurately calculated by combining a specific algorithm. Meanwhile, the system has strong anti-interference capability, can adapt to a complex production environment, realizes real-time dynamic online detection on the premise of ensuring the measurement precision and reliability, and meets the high-efficiency detection requirement of modern industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of wire rod ovality detection, and in particular relates to a wire rod ovality detection method using a combined plane mirror. Background Art

[0002] Wire ovality is an important indicator for evaluating the degree of deviation of the cross-sectional shape of the wire from the ideal circular shape, and is also one of the key parameters for measuring the quality of the wire. Accurately measuring ovality is of great significance to improving product performance and improving production processes. At present, the measurement methods of ovality are mainly divided into two types: contact and non-contact. The contact method directly contacts the wire through a mechanical probe or measuring device to measure the diameter in different directions of the cross section, thereby calculating the ovality. This method has high measurement accuracy, but the operation process is cumbersome, the efficiency is low, and it may cause a certain degree of damage to the surface of the wire, so it is difficult to meet the needs of modern production for rapid and non-destructive testing. The non-contact method is mainly based on optical measurement technology, including laser scanning and multi-point measurement. Non-contact measurement captures wire cross-sectional information through optical equipment and obtains ovality results through algorithm processing. Laser scanning technology has the characteristics of high measurement accuracy, but the equipment structure is complex and the cost is high; multi-point measurement technology usually uses multiple photoelectric sensors to obtain wire diameter data from different angles at the same time, such as through a laser rangefinder. This method can effectively reduce the impact of environmental noise on the measurement results, but requires higher accuracy and complexity in the installation and calibration of the equipment.

[0003] The principle of contact measurement of ovality is to directly contact the surface of the wire through a mechanical probe or measuring device, and collect diameter data of the cross section in different directions. During measurement, the probe or probe needs to be positioned on the cross section of the wire, and measurements are taken at different angles to ensure that the maximum and minimum diameters of the cross section are captured. This method relies on the mechanical precision of the measuring equipment to ensure the accuracy of the measurement results. For example, when measuring with a vernier caliper or micrometer, the diameter values ​​in different directions of the cross section are gradually obtained by rotating the measuring device to form a complete data set. For high-precision measurement requirements, a dedicated ovality measuring instrument can be used, which uses multiple probes to simultaneously collect diameter data in multiple directions, thereby achieving more efficient and accurate ovality calculations. This measurement principle based on physical contact can accurately reflect the geometric shape of the wire cross section and provide reliable basic data support for the calculation of ovality.

[0004] Although the contact measurement ellipticity technology has high measurement accuracy, it also exposes some problems and limitations in practical applications. First, this method requires the mechanical probe or measuring head to be in direct contact with the object to be measured. This contact may cause scratches or deformation on the surface of the wire or workpiece, especially when testing materials with soft surfaces or thin coatings, which can easily affect their quality. Secondly, contact measurement usually relies on manual operation or mechanical devices. The measurement process is complicated and time-consuming, with low efficiency, and it is difficult to meet the requirements of modern industrial production for fast and efficient detection. In addition, since the measuring head needs to sample in multiple directions step by step to obtain complete data of the cross section, this is almost not applicable for dynamic measurement or online detection. At the same time, contact measurement is sensitive to environmental conditions. For example, vibration or external interference may cause a decrease in measurement accuracy. The calibration and maintenance of the equipment are also cumbersome, and system errors may be introduced if you are not careful.

[0005] The laser scanning method of measuring ellipticity uses a laser scanner to perform non-contact, all-round measurement of the cross section of the object to be measured, and obtains the contour data of the cross section to calculate the ellipticity. The specific operation is that the laser scanner emits a laser beam to the cross section of the object to be measured, receives the reflected signal, and combines the position information provided by the angle encoder to obtain the point data of each angle of the cross section. After processing, these collected data can generate a two-dimensional contour graph of the cross section of the object to be measured. During the measurement process, the laser scanner is usually fixed, and the all-round data collection of the cross section is completed by rotating the object to be measured; or the cross-sectional information is obtained by rotating the scanning head around the object to be measured. Subsequently, the calculation software uses the collected contour data to analyze the maximum and minimum diameters of the cross section to determine the ellipticity.

[0006] Although laser scanning is highly accurate and non-contact in measuring ellipticity, there are still some problems. First, it is sensitive to the measurement environment. For example, strong light, dust or smoke may interfere with the acquisition of laser signals and affect the measurement accuracy. Secondly, this method has high requirements on the reflective characteristics of the surface of the object to be measured. For highly smooth or low-reflectivity surfaces, signal instability is prone to problems. In addition, laser scanning equipment is expensive, including investment in hardware and data processing systems. At the same time, equipment calibration and operation are complex, which increases the difficulty of technical maintenance. When measuring high-speed rotation or complex shapes, data acquisition may be missed or delayed, affecting real-time performance. These factors limit its application in some scenarios.

[0007] Multi-point measurement technology uses multiple sensors to collect diameter data of the cross section of the object to be measured from different angles at the same time to calculate the ellipticity. This method usually uses a laser rangefinder or a photoelectric sensor, and evenly distributes the sensors around the object to be measured, or arranges sensors at more angles to achieve comprehensive data collection of the cross section. During measurement, the object to be measured may be stationary or may rotate at a certain speed. Each sensor collects the distance data from the surface of the object to be measured to the sensor from a fixed angle to generate diameter information in multiple directions of the cross section. Based on these measured diameter data, the ellipticity can be further calculated.

[0008] There are some problems with multi-point measurement technology in practical applications. First, the installation and calibration of the equipment is difficult, and multiple sensors need to be strictly aligned with the center of the cross section, otherwise errors are likely to occur. Second, the hardware cost of the equipment is high, and daily maintenance is relatively complicated. In a dynamic detection environment, external factors such as vibration and light may interfere with the stability of the data. In addition, for objects with rough surfaces or irregular shapes, the accuracy of sensor measurements may be limited due to different directions. At the same time, the amount of data collected simultaneously by multiple sensors is large, and if the system performance is insufficient, it may cause processing delays or deviations in measurement results. Summary of the invention

[0009] In view of the many shortcomings of existing wire ovality detection methods, the present invention proposes a wire ovality detection method using a combined plane mirror. By innovatively adopting the combined plane mirror technology, the present invention optimizes the optical path design, making the structure of the detection device more concise and efficient, thereby effectively reducing the manufacturing cost and use overhead of the equipment. The method utilizes the optical reflection characteristics to achieve rapid data acquisition of the cross-sectional geometry of the wire, and combines a specific algorithm to accurately calculate the ovality of the wire. At the same time, the present invention has strong anti-interference ability, can adapt to complex production environments, and realizes real-time dynamic online detection while ensuring measurement accuracy and reliability, meeting the efficient detection needs of modern industry.

[0010] To achieve the above object, the present invention adopts the following technical solutions:

[0011] In a first aspect, the present invention provides a method for detecting the ovality of a wire using a combined plane mirror, comprising the following steps:

[0012] S1: 2N+1 cameras are installed to measure the diameter of the measured wire, N≥1, one of which is located in the center and emits light directly to the measured wire, and the other 2N cameras are symmetrically distributed on both sides of the central camera, and the emitted light is reflected to the measured wire through a plane mirror, so that the light between the cameras does not interfere; each camera is correspondingly provided with a backlight source;

[0013] S2: Turn on the backlight source in sequence to trigger the corresponding camera to collect the image of the checkerboard calibration plate. After completing the calibration of the camera imaging, use the square size in the calibration plate as the standard size to calibrate the camera pixel equivalent and determine the pixel equivalent.

[0014] S3: Turn on the backlight sources in turn to trigger the corresponding cameras to collect images of the tested wires. After preprocessing the wire images, the pixel diameter of the wires is detected and the actual diameter of the wires is calculated in combination with the pixel equivalent.

[0015] S4: Calculate the ovality of the wire according to the actual diameter of the wire.

[0016] Optionally, in step S1, the diameter endpoint positions measured by each camera are evenly distributed on the circumference of the measured wire.

[0017] Optionally, in step S2, the correction of camera imaging includes coordinate system conversion and distortion correction, specifically:

[0018] The coordinate system of the calibration plate image is transformed, and the relationship expression from the camera coordinate system to the world coordinate system is:

[0019]

[0020] In the formula, (X w , Y w , Z w ) and (X c , Y c , Z c ) are points in the world coordinate system and the camera coordinate system, R = R x R y R z , T=[t x t y t z ], R x , R y , R z Respectively represent the rotation matrices around the x-axis, y-axis, and z-axis, t x ,t y ,t z are the translations along the x, y, and z axes respectively;

[0021] The relationship expression from the world coordinate system to the pixel coordinate system is:

[0022]

[0023] Where (u, v) represents a point in the pixel coordinate system, (u0, v0) represents the origin of the image coordinate system, and f x =f / dx,f y=f / dy, where f represents the focal length of the camera, (x, y) is the point in the image coordinate system, and K is the camera intrinsic parameter matrix;

[0024] The radial distortion is corrected by the following formula:

[0025]

[0026] Where (u, v) is the coordinate before radial distortion correction, (u c , v c ) is the coordinate after radial distortion correction, r 2 =u 2 +v 2 , k1, k2, and k3 are the first-order, second-order, and third-order coefficients of radial distortion, respectively;

[0027] The tangential distortion is corrected by the following formula:

[0028]

[0029] Where (u, v) is the coordinate before tangential distortion correction, (u c , v c ) is the coordinate after tangential distortion correction, r 2 =u 2 +v 2 , p1 and p2 are the first-order and second-order coefficients of tangential distortion, respectively.

[0030] Optionally, in step S2, the process of determining the pixel equivalent is specifically:

[0031] The calibration plate image is preprocessed, and the edge detection algorithm is used to extract the edge information of the square grid in the calibration plate, and the pixel spacing d between the two relative edges is measured. p , the pixel equivalent is calculated according to the following formula:

[0032]

[0033] Where k represents the pixel equivalent and d0 represents the actual size between the two edges.

[0034] Optionally, in step S3, the preprocessing of the wire image includes grayscale processing using a weighted average method and median filtering.

[0035] Optionally, in step S3, the process of detecting and obtaining the pixel diameter of the wire specifically includes:

[0036] Perform pixel edge detection on the wire image to determine the wire edge in the wire image;

[0037] Perform sub-pixel edge detection on the wire image to determine the sub-pixel point coordinates of the wire edge in the wire image;

[0038] The pixel diameter of the wire is calculated based on the sub-pixel coordinates of the wire edge.

[0039] Optionally, the pixel edge detection adopts a canny operator, and the sub-pixel edge detection adopts a Zernike moment sub-pixel edge model.

[0040] Optionally, the pixel diameter of the wire is calculated according to the sub-pixel coordinates of the edge of the wire, specifically:

[0041] The coordinates of the sub-pixel points on the edge of the wire are fitted with the least square method to obtain the equations of the two edge lines of the wire:

[0042]

[0043] When k1=k2, the wire pixel diameter is

[0044] When k1≠k2, the sub-pixel coordinate point (x i ,y i ) to the other edge line, and then calculate the average values ​​d1 and d2. d The average value of 2 is taken as the wire pixel diameter, expressed as:

[0045]

[0046] Where m and n are the number of sub-pixel points of the two edge lines respectively.

[0047] Optionally, in step S3, the actual diameter of the wire is calculated by combining the pixel equivalent, specifically:

[0048] D = kd;

[0049] Where D represents the actual diameter of the wire, k represents the pixel equivalent, and d represents the pixel diameter of the wire.

[0050] Optionally, in step S4, according to 2N+1 actual diameters D1, D2, ..., D 2N+1 , calculate the ellipticity as follows:

[0051]

[0052] Where φ represents the ellipticity.

[0053] The beneficial effects of the present invention are as follows: the present invention proposes a wire ovality detection method using a combined plane mirror. Compared with the traditional detection method, the combined plane mirror is used to construct a multi-angle reflection light path, which effectively improves the detection accuracy and can accurately capture subtle changes in the cross-sectional shape of the wire; secondly, the method avoids direct contact with the wire, which not only reduces mechanical damage to the object being measured, but also significantly improves the applicability of the detection, and is suitable for wires of various materials and shapes; finally, the system has a simple structure, is easy to build and maintain, can adapt to the rapid detection needs in industrial mass production, improves detection efficiency, and reduces operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is the schematic diagram of the multi-camera parallel light line diameter measurement.

[0055] Figure 2 It is the distribution diagram of measuring points in diameter measurement.

[0056] Figure 3 This is a flow chart of multi-camera parallel light line diameter measurement. DETAILED DESCRIPTION

[0057] The present invention will now be described in further detail with reference to the accompanying drawings.

[0058] The present invention proposes a wire ovality detection method using a combined plane mirror, and the specific steps include:

[0059] S1: Hardware system construction. Install the camera, plane mirror and backlight, and determine the layout of the camera, plane mirror and backlight.

[0060] S2: System calibration:

[0061] S2.1: Image acquisition of the checkerboard calibration plate. The backlight sources are turned on in sequence, triggering the camera to acquire the image of the calibration plate.

[0062] S2.2: The calibration plate image was preprocessed. In order to reduce the image data volume and processing difficulty, the image was grayed out; in view of the common image noise in industrial production, the median filter was selected as the filtering algorithm used in this system.

[0063] S2.3: Extract pixel edges from the calibration plate image, and combine factors such as edge extraction accuracy and noise resistance to select the Canny operator as the pixel-level edge detection algorithm used in this system.

[0064] S2.4: Complete the calibration of the camera imaging, use the square size in the calibration plate as the standard size to calibrate the camera pixel equivalent, and determine the pixel equivalent.

[0065] S3: Determine the wire diameter. According to the above steps, trigger the camera to collect the wire image, and perform preprocessing, pixel edge detection and sub-pixel edge detection on the wire image. Then, the wire diameter can be calculated based on the obtained pixel equivalent and the pixel size of the wire diameter obtained by detection.

[0066] S4: Calculate ovality. Three sets of vision systems can obtain three diameters, and then calculate the ovality according to the formula.

[0067] Next, combine Figure 1 The example shown describes the specific implementation process of a wire ovality detection method using a combined plane mirror proposed by the present invention.

[0068] The camera, mirror and backlight are Figure 1 Placed, the three cameras measure three diameters in total. The three diameters have six endpoints, which are nearly evenly distributed on the circumference. It is generally believed that the measurement results will be more reliable and trustworthy. Based on this, the circumference is divided into six equal parts. The two endpoints of diameter d1 are A1 and A2, the two endpoints of diameter d2 are B1 and B2, and the two endpoints of diameter d3 are C1 and C2. Figure 2 shown.

[0069] The light emitted from A1 and A2 (incident light), that is, the tangent line passing through A1 and A2, is directed to plane mirror #1-3. To make the outgoing light horizontal, that is, the sum of the incident angle and the reflection angle is 60°, the angle between the normal of plane mirror #1-3 and the horizontal direction is 210°.

[0070] Similarly, the light emitted from C1 and C2 (incident light), that is, the tangent passing through C1 and C2, is directed to the 3-3# plane mirror. To make the outgoing light horizontal, that is, the sum of the incident angle and the reflection angle is 60°, the angle between the normal of the 3-3# plane mirror and the horizontal direction is 150°.

[0071] The problem of measuring diameter points distributed on the circumference is solved by the 1-3# plane mirror and the 3-3# plane mirror. However, the light emitted from A2 and reflected by the 1-3# plane mirror and heading to the left is close to the light emitted from B1 and heading to the left, which will cause installation interference between the 1# camera and the 2# camera; similarly, the light emitted from C1 and reflected by the 3-3# plane mirror and heading to the left is close to the light emitted from B2 and heading to the left, which will cause installation interference between the 2# camera and the 3# camera.

[0072] In order to solve the problem that the two groups of light are close to each other, 1-1# plane mirror and 1-2# plane mirror, 3-1# plane mirror and 3-2# ​​plane mirror are added respectively. According to the law of reflection of light, the angle between the normal line of 1-1# plane mirror and the horizontal direction is 225°, and the angle between the normal line of 1-2# plane mirror and the horizontal direction is 45°; the angle between the normal line of 3-1# plane mirror and the horizontal direction is 135°, and the angle between the normal line of 3-2# ​​plane mirror and the horizontal direction is 315°. Both groups of plane mirrors (1-1# plane mirror and 1-2# plane mirror, 3-1# plane mirror and 3-2# ​​plane mirror) need to be translated to the left for a distance, leaving space to install 1# backlight source and 3# backlight source.

[0073] System calibration mainly involves coordinate system conversion, distortion correction and pixel equivalent calibration.

[0074] The conversion relationship from the camera coordinate system to the world coordinate system is:

[0075]

[0076] Where R = R x R y R z , T=[t x t y t z ]. x , R y , R z Respectively represent the rotation matrices around the x-axis, y-axis, and z-axis, t x ,t y ,t z are the translations along the x, y, and z axes respectively.

[0077] From the point P(X c , Y c , Z c ) is converted to the image coordinate system (O i The process of projecting a point p(x, y) on a plane xy) is called perspective projection, and its similar geometric relationship can be expressed as:

[0078]

[0079] In the formula, f represents the focal length of the camera. Converting the formula into matrix form, we have:

[0080]

[0081] The point p(x, y) in the image coordinate system is converted to the pixel coordinate system ( p The process of converting a point p(u, v) from a point in the image to a point in the image uv) is called a quadratic transformation, and this transformation can be described by the following formula: Its matrix form is expressed as:

[0082]

[0083] Where (u0, v0) is the image coordinate O i The actual size of each pixel is dx·dy.

[0084] Finally, the relationship expression from the world coordinate system to the pixel coordinate system is obtained as follows:

[0085]

[0086] In the formula, f x =f / dx,f y =f / dy, K is the camera intrinsic parameter matrix.

[0087] Distortion phenomena are usually divided into two types: radial distortion and tangential distortion. The correction of radial distortion can be described and corrected by the following mathematical model:

[0088]

[0089] Where (u, v) is the coordinate of the point on the image before radial distortion correction. After radial distortion correction, the coordinate becomes (u c , v c ), r 2 =u 2 +v 2 , k1, k2, and k3 are the first-order, second-order, and third-order coefficients of radial distortion, respectively.

[0090] The mathematical correction model of tangential distortion can be expressed by formula (7):

[0091]

[0092] Where (u, v) is the coordinate of the point on the image before tangential distortion correction, (u c , v c ) is the coordinate of the point on the image after tangential distortion correction, r 2 =u 2 +v 2 , p1 and p2 are the first-order and second-order coefficients of tangential distortion, respectively.

[0093] The pixel equivalent is generally calibrated using the standard parts method. The grid size in the calibration plate is used as the standard size to calibrate the camera pixel equivalent. The expression for calculating the pixel equivalent is:

[0094]

[0095] Where d0 represents the actual size of the object, in mm; d p Indicates pixel size, the unit is pixel; k indicates pixel equivalent, the unit is mm / pixel.

[0096] After completing the camera imaging calibration, the actual size of the grid on the calibration board can be used as a reference to calibrate the camera's pixel equivalent. By preprocessing the image and using the edge detection algorithm to extract the edge information of the grid, the pixel spacing between the left and right sides of the grid (i.e., d p ), and then combined with formula (8), the pixel equivalent of the camera can be calculated.

[0097] When collecting wire images, the backlight sources are controlled to light up in sequence. Figure 1 The small black square on the far right represents the backlight source, which is enabled when measuring d2. Similarly, when measuring d1 and d3, you also need to configure the corresponding backlight source ( Figure 1 The backlight sources used for measuring d1, d2, and d3 are defined as 1# backlight, 2# backlight, and 3# backlight, respectively. When measuring d1, 1# backlight is turned on, 2# backlight and 3# backlight are turned off; when measuring d2, 2# backlight is turned on, 1# backlight and 3# backlight are turned off; when measuring d3, 3# backlight is turned on, 1# backlight and 2# backlight are turned off.

[0098] The wire images captured by the camera are usually color images. Through grayscale processing, the data volume can be reduced while maintaining the integrity of the image information, and the contrast between the target area and the background can be enhanced, thus facilitating subsequent image processing. One of the common methods for grayscale image conversion is the weighted average method. The formula of this method is:

[0099] GRAY=0.3R+0.59G+0.11B(9)

[0100] Where GRAY is the gray value of the corresponding pixel after conversion.

[0101] Median filtering is excellent in removing noise. Its basic principle is to extract the grayscale values ​​of all pixels in the current template window, calculate the median of these values, and use the median to replace the grayscale value of the central pixel of the template window. The calculation method of median filtering can be expressed by the following formula:

[0102] g(x, y)=Med{f(xk, yl), (k, l∈W)}(10)

[0103] Where f(x, y) and g(x, y) are the images before and after processing, respectively; k and l represent the offset of each pixel in the filter window relative to the center pixel; and W is the filter template.

[0104] When using the Canny operator for edge detection, the image must first be smoothed using a Gaussian filter to reduce noise interference. Then the Sobel operator is used to calculate the gradient amplitude and direction of the image to extract gradient information. The convolution templates of the Sobel operator in the X-axis and Y-axis directions are:

[0105]

[0106]

[0107] Use the convolution template in the X direction and the Y direction to convolve with the image to be processed, and obtain the convolution value G in the X direction and the Y direction. x and G y . Then the gradient vector G of the image is:

[0108]

[0109] By comparing the gradient values ​​of adjacent pixels and performing non-maximum suppression, the grayscale value of each pixel is then compared with the set high and low thresholds to generate two images: one containing areas where the grayscale value is completely higher than the high threshold, and the other containing areas where the grayscale value is completely higher than the low threshold. Finally, the pixel sets in the two images are merged to form a complete target edge.

[0110] After preprocessing the obtained wire image, it is necessary to perform sub-pixel edge detection based on the Zemike moment. According to the Zemike moment sub-pixel edge model, after rotating the coordinate axis by θ degrees, the edge model and the rotation invariance of the moment are: nm =Z nm e jmθ , so according to the rotation invariance of the moment amplitude, we have:

[0111]

[0112] In the above formula, Z nm represents the Zemike moment, n and m represent the order and frequency of the Zernike basis function, and θ represents the angle between the origin and the vertical line of the target edge and the x-axis. 11 The real part is Re[Z 11 ], the imaginary part is Im[Z 11 ], since the image is symmetrically distributed with respect to the x-axis after being rotated by angle θ, Im[Z 11 ] is equal to 0, then:

[0113] Im[Z′ 11 ]=sinθRe[Z 11 ]-cosθIm[Z 11]=0 (15)

[0114] So there is Then, the expressions of the Zemike moments of various orders after the image rotation are further derived as follows:

[0115]

[0116] In the formula, h represents the gray value of the background of the image, and k is the step gray value between the background and the target. According to the above formula, the corresponding edge parameter value in the ideal edge model can be calculated as follows:

[0117]

[0118] According to the geometric relationship in the figure, the sub-pixel coordinate expression corresponding to the pixel point in the image can be derived as follows:

[0119]

[0120] In the formula, the radius of the unit pixel circle is

[0121] After determining the sub-pixel coordinates of the wire edge in the wire image, these coordinates need to be fitted to obtain two edge lines, thereby calculating the wire diameter. The most common method for fitting data points into a straight line is the least squares method. Assume that the equation of the fitted line is: f(x) = kx + b, and the solution based on the least squares principle is as follows:

[0122]

[0123] After obtaining the equations of the two edge lines of the wire through the least squares fitting method, the pixel diameter of the wire can be obtained through mathematical calculation. According to formula (8), the actual diameter of the wire can be obtained by multiplying the pixel diameter by the pixel equivalent. The specific method for calculating the pixel diameter of the wire is as follows:

[0124] Assume that the equations of the two edge lines are: When two edge lines have k1=k2=k, the wire pixel diameter is

[0125] When two edge lines have k1≠k2, we can find the sub-pixel coordinate point (x i ,y i ) to another edge straight line, and then calculate the average values ​​d1 and d2, and use the average values ​​as the wire pixel diameter value. That is, the solution formula for the wire pixel diameter can be expressed as:

[0126]

[0127] Where m and n are the number of sub-pixel points on the two edges respectively.

[0128] Then, the actual diameter is calculated based on the wire pixel diameter and pixel equivalent: D=kd.

[0129] In the entire visual measurement system, three diameters D1, D2, and D3 can be measured, and the ovality φ is calculated as follows:

[0130]

[0131] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.

Claims

1. A wire rod ovality detection method using a combined plane mirror, characterized in that: The steps include: S1: 2N+1 cameras are installed to measure the diameter of the measured wire, N≥1, one of which is located in the center and emits light directly to the measured wire, and the other 2N cameras are symmetrically distributed on both sides of the central camera, and the emitted light is reflected to the measured wire through a plane mirror, so that the light between the cameras does not interfere; each camera is correspondingly provided with a backlight source; S2: Turn on the backlight source in sequence to trigger the corresponding camera to collect the image of the checkerboard calibration plate. After completing the calibration of the camera imaging, use the square size in the calibration plate as the standard size to calibrate the camera pixel equivalent and determine the pixel equivalent. S3: Turn on the backlight sources in turn to trigger the corresponding cameras to collect images of the tested wires. After preprocessing the wire images, the pixel diameter of the wires is detected and the actual diameter of the wires is calculated in combination with the pixel equivalent. S4: Calculate the ovality of the wire according to the actual diameter of the wire.

2. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S1, the diameter endpoint positions measured by each camera are evenly distributed on the circumference of the measured wire.

3. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S2, the correction of the camera imaging includes coordinate system conversion and distortion correction, specifically: The coordinate system of the calibration plate image is transformed, and the relationship expression from the camera coordinate system to the world coordinate system is: In the formula, (X w , Y w , Z w ) and (X c , Y c , Z c ) are points in the world coordinate system and the camera coordinate system, R = R x R y R z , T=[t x t y t z ], R x , R y , R z Respectively represent the rotation matrices around the x-axis, y-axis, and z-axis, t x ,t y ,t z are the translations along the x, y, and z axes respectively; The relationship expression from the world coordinate system to the pixel coordinate system is: Where (u, y) represents a point in the pixel coordinate system, (u0, v0) represents the origin of the image coordinate system, and f x =f / dx,f y =f / dy, where f represents the focal length of the camera, (x, y) is the point in the image coordinate system, and K is the camera intrinsic parameter matrix; The radial distortion is corrected by the following formula: Where (u, v) is the coordinate before radial distortion correction, (u c , v c ) is the coordinate after radial distortion correction, r 2 =u 2 +v 2 , k1, k2, and k3 are the first-order, second-order, and third-order coefficients of radial distortion, respectively; The tangential distortion is corrected by the following formula: Where (u, v) is the coordinate before tangential distortion correction, (u c , v c ) is the coordinate after tangential distortion correction, r 2 =u 2 +v 2 , p1 and p2 are the first-order and second-order coefficients of tangential distortion, respectively.

4. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S2, the process of determining the pixel equivalent is specifically as follows: The calibration plate image is preprocessed, and the edge detection algorithm is used to extract the edge information of the square grid in the calibration plate, and the pixel spacing d between the two relative edges is measured. p , the pixel equivalent is calculated according to the following formula: Where k represents the pixel equivalent and d0 represents the actual size between the two edges.

5. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S3, the preprocessing of the wire rod image includes grayscale processing using a weighted average method and median filtering.

6. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S3, the process of detecting and obtaining the pixel diameter of the wire specifically includes: Perform pixel edge detection on the wire image to determine the wire edge in the wire image; Perform sub-pixel edge detection on the wire image to determine the sub-pixel point coordinates of the wire edge in the wire image; The pixel diameter of the wire is calculated based on the sub-pixel coordinates of the wire edge.

7. A wire rod ovality detection method using a combined plane mirror as claimed in claim 6, characterized in that: The pixel edge detection adopts the canny operator, and the sub-pixel edge detection adopts the Zernike moment sub-pixel edge model.

8. A wire rod ovality detection method using a combined plane mirror as claimed in claim 6, characterized in that: The pixel diameter of the wire is calculated according to the sub-pixel coordinates of the edge of the wire, specifically: The coordinates of the sub-pixel points on the edge of the wire are fitted with the least square method to obtain the equations of the two edge lines of the wire: When k1=k2, the wire pixel diameter is When k1≠k2, the sub-pixel coordinate point (x i ,y i ) to another edge straight line, and then calculate their average values ​​d1 and d2. The average value of d1 and d2 is used as the wire pixel diameter, which is expressed as: Where m and n are the number of sub-pixel points of the two edge lines respectively.

9. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S3, the actual diameter of the wire is calculated by combining the pixel equivalent, specifically: D = kd; Where D represents the actual diameter of the wire, k represents the pixel equivalent, and d represents the pixel diameter of the wire.

10. A wire rod ovality detection method using a combined plane mirror as claimed in claim 1, characterized in that: In step S4, according to the 2N+1 actual diameters D1, D2, ..., D 2N+1 , calculate the ellipticity as follows: Where φ represents the ellipticity.