Cable outer diameter and ovality measurement method and system based on linear laser profile scanning

By using line laser profile scanning technology, combined with grayscale centroid and Gaussian filtering, Hessian matrix analysis and weighted ellipse fitting, the noise and outlier problems in cable outer diameter and ellipticity measurement are solved, achieving high-precision and stable non-contact measurement.

CN121025987BActive Publication Date: 2025-12-26WUXI NEW SUNSHINE CABLE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511577047.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2025-12-26
Estimated Expiration
2045-10-31

AI Technical Summary

Technical Problem

Traditional methods for measuring cable outer diameter and ellipticity are cumbersome to operate, have low measurement efficiency, are prone to scratching the cable surface, and have low measurement accuracy. In particular, the measurement error is large when asymmetric light stripes and outliers are present.

Method used

A line laser profile scanning method is adopted. The preliminary center line is calculated by the centroid of gray intensity. Combined with anisotropic Gaussian filtering and Hessian matrix analysis, the asymmetry of the sub-pixel center point is corrected. Weighted least squares ellipse fitting is performed to remove outliers and improve measurement accuracy.

Benefits of technology

It effectively suppresses noise and asymmetric deviations, robustly handles outliers, and improves the accuracy and stability of cable outer diameter and ellipticity measurement, meeting the high-speed, online, non-contact measurement needs of modern production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121025987B_ABST
    Figure CN121025987B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of scanning measurement, and particularly relates to a cable outer diameter and ovality measurement method and system based on line laser profile scanning, to solve the technical problem of low measurement accuracy caused by sensitivity of existing algorithms to noise, light strip asymmetry and profile discrete points. The measurement method comprises the following steps: S1, performing anisotropic Gaussian filtering on pixels according to the local tangent direction of the preliminary center line; S2, calculating the second derivative value and the third derivative value of the sub-pixel center point in the normal direction; S3, using the corrected profile point set and the corresponding fitting weight, performing initial weighted least squares ellipse fitting to obtain the parameters of the initial ellipse; S4, based on the length of the major axis and the minor axis of the fitted ellipse, calculating the outer diameter and the ovality of the cable. The measurement method eliminates the interference of abnormal data points introduced by cable surface oil stains, scratches and local defects, and improves the accuracy and stability of the fitting result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of scanning measurement, and particularly relates to a cable outer diameter and ovality measurement method and system based on linear laser profile scanning. BACKGROUND

[0002] In the production process of electric wires and cables, the outer diameter and ovality of the cable are two key quality control indicators, which directly affect the mechanical performance, electrical performance and subsequent installation and use of the cable. Traditional contact measurement methods, such as using a caliper to measure, have the disadvantages of complicated operation, low measurement efficiency, easy to scratch the surface of the cable, etc., and cannot meet the needs of high-speed, online and non-contact measurement on modern production lines.

[0003] Non-contact measurement technology based on machine vision can realize continuous and automatic data acquisition and analysis, and ensure the objectivity of the measurement results. Among them, linear laser profile scanning technology is applied in the measurement of the outer diameter and ovality of the cable due to its simple principle and reliable structure.

[0004] However, in the actual image acquisition and imaging link, multiple factors such as laser speckle noise, complex reflection characteristics of the cable surface and environmental light interference will reduce the signal-to-noise ratio of the laser stripe image and affect the stability and accuracy of the profile center line extraction. Specifically, traditional center line extraction algorithms, such as the gray centroid method or the Gaussian fitting method, are mostly based on the assumption of symmetric light bar intensity distribution. When they are applied to asymmetric light bars, systematic positioning deviation will be caused. In addition, if the cable surface is attached with oil stains, has scratches or dust defects, these defects will form false profile points or data outliers in the image. The standard least squares ellipse fitting method is very sensitive to these outliers, and even the existence of a few outliers may cause the final fitting result to deviate, thereby causing measurement errors.

[0005] Therefore, how to suppress noise in imaging, correct systematic deviation caused by asymmetry, and robustly handle outliers is a key technical problem for improving the accuracy of online measurement of the outer diameter and ovality of the cable. SUMMARY

[0006] The application provides a cable outer diameter and ovality measurement method and system based on linear laser profile scanning, to solve the technical problem of low measurement accuracy caused by the sensitivity of existing algorithms to noise, light bar asymmetry and profile discrete points.

[0007] In a first aspect, the application provides a cable outer diameter and ovality measurement method based on linear laser profile scanning, comprising the following steps:

[0008] S1, acquire a line laser profile image irradiated on the surface of the cable, obtain a preliminary center line by gray intensity centroid calculation and define a region of interest according to the preliminary center line; in the region of interest, perform anisotropic Gaussian filtering on pixels according to the local tangent direction of the preliminary center line, so that the smoothing principal axis of the anisotropic Gaussian filtering is parallel to the local tangent direction;

[0009] S2, calculate the Hessian matrix of each pixel point in the filtered line laser profile image, determine the normal direction perpendicular to the laser stripe based on the eigenvalues and eigenvectors of the Hessian matrix; determine the sub-pixel center point by Taylor expansion along the normal direction, and calculate the second derivative value and the third derivative value of the sub-pixel center point in the normal direction;

[0010] S3, calculate the asymmetry based on the second derivative value and the third derivative value, and calculate the coordinate offset correction and the fitting weight of each sub-pixel center point based on the asymmetry; apply coordinate offset correction to all sub-pixel center points to obtain a corrected profile point set; perform initial weighted least squares ellipse fitting using the corrected profile point set and the corresponding fitting weight to obtain the parameters of the initial ellipse;

[0011] S4, calculate the distance of each profile point in the corrected profile point set to the initial ellipse, and remove outliers according to the distance threshold to obtain a remaining profile point set; perform weighted least squares ellipse fitting using the remaining profile point set and the corresponding fitting weight to obtain a fitted ellipse; calculate the outer diameter and the ovality of the cable based on the lengths of the major axis and the minor axis of the fitted ellipse.

[0012] Further, in S1, in the region of interest, the anisotropic Gaussian filtering on pixels according to the local tangent direction of the preliminary center line comprises:

[0013] constructing a 5x5 two-dimensional Gaussian filter kernel, the smoothing standard deviation parallel to the local tangent direction is 2.0 pixel units, and the smoothing standard deviation perpendicular to the local tangent direction is 0.5 pixel units.

[0014] Further, in S2, the determination of the sub-pixel center point by Taylor expansion along the normal direction comprises:

[0015] for the first integer pixel point in the normal direction, the sub-pixel offset is obtained by the formula , wherein is the coordinate of the first integer pixel point, is the first derivative value at the point along the normal direction, is the second derivative value at the point along the normal direction;

[0016] the sub-pixel center point coordinate is .

[0017] Further, in S3, the asymmetry is calculated based on the second derivative value and the third derivative value, and the coordinate offset correction quantity and the fitting weight of each sub-pixel center point are calculated based on the asymmetry, including:

[0018] the laser stripe feature width along the normal direction is taken as a scale factor;

[0019] the coordinate offset correction quantity is calculated by the formula , wherein is the second derivative value at the sub-pixel center point , is the third derivative value at the sub-pixel center point , is the asymmetry;

[0020] the fitting weight is calculated by the formula .

[0021] Further, in S4, the distances of each profile point in the corrected profile point set to the initial ellipse are calculated, and the outlier points are removed according to a distance threshold, including:

[0022] the distances of each profile point in the corrected profile point set to the initial ellipse are calculated, and a distance set is obtained;

[0023] the average value and the standard deviation of the distance set are calculated;

[0024] the distance threshold is ;

[0025] the profile points with distances greater than are determined as outlier points and are removed.

[0026] Further, in S4, the outer diameter and the ovality of the cable are calculated based on the major axis and the minor axis length of the fitted ellipse, including:

[0027] let the major axis length of the fitted ellipse be , and the minor axis length be ;

[0028] the cable outer diameter is calculated by the formula is calculated;

[0029] cable ovality by the formula is calculated.

[0030] In a second aspect, the present application provides a cable outer diameter and ovality measurement system based on line laser profile scanning, comprising:

[0031] a filtering module, configured to acquire a line laser profile image irradiated on a cable surface, obtain a preliminary center line through a gray intensity centroid calculation, and define a region of interest (ROI) based on the preliminary center line; in the ROI, perform an anisotropic Gaussian filtering on pixels according to a local tangent direction of the preliminary center line, so that a smoothing principal axis of the anisotropic Gaussian filtering is parallel to the local tangent direction;

[0032] a calculation module, configured to calculate a Hessian matrix of each pixel point in the filtered line laser profile image, determine a normal direction perpendicular to a laser stripe based on eigenvalues and eigenvectors of the Hessian matrix, determine a sub-pixel center point through Taylor expansion along the normal direction, and calculate a second derivative value and a third derivative value of the sub-pixel center point in the normal direction;

[0033] a correction module, configured to calculate an asymmetry degree based on the second derivative value and the third derivative value, calculate a coordinate offset correction amount and a fitting weight of each sub-pixel center point based on the asymmetry degree, apply the coordinate offset correction to all the sub-pixel center points to obtain a corrected profile point set, and perform a primary weighted least squares ellipse fitting using the corrected profile point set and the corresponding fitting weight to obtain parameters of an initial ellipse;

[0034] a fitting module, configured to calculate distances of each profile point in the corrected profile point set to the initial ellipse, remove outliers according to a distance threshold to obtain a remaining profile point set, perform a weighted least squares ellipse fitting using the remaining profile point set and the corresponding fitting weight to obtain a fitting ellipse, and calculate an outer diameter and an ovality of the cable based on lengths of a major axis and a minor axis of the fitting ellipse.

[0035] Further, in the filtering module, in the ROI, the anisotropic Gaussian filtering on the pixels according to the local tangent direction of the preliminary center line comprises:

[0036] constructing a 5x5 two-dimensional Gaussian filter kernel, wherein a smoothing standard deviation parallel to the local tangent direction is 2.0 pixel units, and a smoothing standard deviation perpendicular to the local tangent direction is 0.5 pixel units.

[0037] Further, in the calculation module, the determination of the sub-pixel center point through Taylor expansion along the normal direction comprises: ​​

[0038] For the first in the normal direction For each integer pixel, its subpixel offset Through formula The calculation yielded that, For the first The coordinates of an integer pixel for The value of the first derivative along the normal direction at the point. for The value of the second derivative along the normal direction at the point;

[0039] The coordinates of the sub-pixel center point are: .

[0040] Furthermore, in the correction module, the asymmetry is calculated based on the second and third derivative values, and the coordinate offset correction and fitting weight of each sub-pixel center point are calculated based on the asymmetry, including:

[0041] The characteristic width of the laser stripe along the normal direction As a scaling factor;

[0042] The coordinate offset correction amount From the formula Calculation, where Subpixel center point The second derivative value at that point, Subpixel center point The third derivative value at that point, It is asymmetric.

[0043] The fitting weight From the formula calculate.

[0044] The beneficial effects are as follows: This invention employs anisotropic Gaussian filtering along the local tangent direction of the laser stripes, which can suppress speckle random noise while preserving contour edge information perpendicular to the stripe direction. By constructing asymmetry based on the second and third derivatives of the normal direction, it not only quantitatively evaluates and corrects the systematic positioning deviation of sub-pixel center points caused by stripe asymmetry, but also generates fitting weights for each contour point that match its reliability. A two-step robust elliptic fitting strategy—initial weighted fitting, outlier removal, and re-weighted fitting—eliminates interference from abnormal data points introduced by local defects such as oil stains and scratches on the cable surface, improving the accuracy and stability of the fitting results. Attached Figure Description

[0045] Figure 1 This is a flowchart of a method for measuring the outer diameter and ellipticity of cables based on line laser profile scanning.

[0046] Figure 2 This is a schematic diagram of subpixel deviation;

[0047] Figure 3 This is a schematic diagram of the positioning deviation. Detailed Implementation

[0048] An embodiment of the cable outer diameter and ellipticity measurement method based on line laser profile scanning provided by this invention:

[0049] like Figure 1 As shown, the method for measuring the outer diameter and ellipticity of cables based on line laser profile scanning includes the following steps:

[0050] S1. Acquire the line laser contour image irradiated on the cable surface, obtain the preliminary center line by calculating the gray intensity centroid, and define the region of interest accordingly; within the region of interest, perform anisotropic Gaussian filtering on the pixels according to the local tangent direction of the preliminary center line, so that the smoothing principal axis of the anisotropic Gaussian filter is parallel to the local tangent direction.

[0051] Specifically, a line laser beam is projected vertically onto the cable under test using a line laser. The modulated laser stripe image of the cable surface is acquired from an angle of approximately 45° above and below, with a resolution of 1280×1024 pixels. Along each column of the laser stripe image, the vertical coordinate of each pixel is multiplied by its corresponding grayscale value, summed, and then divided by the sum of the grayscale values ​​of all pixels in that column to calculate the grayscale centroid coordinates of that column of laser stripes. This process is repeated for all columns of the laser stripe image, and the resulting centroids are connected to form a preliminary centerline, including noise.

[0052] Using each centroid point on the initial center line as the center, extend upwards and downwards by 20 pixels each to form a strip region with a width of 41 pixels. This strip region is the region of interest.

[0053] For any pixel within the region of interest, find the nearest centroid on the initial center line. Take this centroid and its five adjacent centroids (one before and one after it), for a total of 11 centroids. Perform a linear fit on these 11 centroids using the least squares method to obtain a local straight line. The direction of this local straight line is the local tangent direction at that location.

[0054] A two-dimensional Gaussian filter kernel is constructed, with its standard deviation set to a larger value in the direction parallel to the local tangent and a smaller value in the direction perpendicular to the local tangent. The local tangent direction is the direction of the laser stripes. This two-dimensional Gaussian filter kernel is rotated to align with the local tangent direction, and a convolution operation is performed on the current pixel and its neighborhood, thereby smoothing noise while preserving edge details perpendicular to the laser stripes.

[0055] In S1, within the region of interest, anisotropic Gaussian filtering is performed on the pixels according to the local tangent direction of the preliminary centerline, including:

[0056] A 5x5 two-dimensional Gaussian filter kernel is constructed, with a smoothing standard deviation parallel to the local tangent direction of 2.0 pixel units, and a smoothing standard deviation perpendicular to the local tangent direction of 0.5 pixel units.

[0057] For a segment of local laser stripe in the line laser profile image, its extension direction is determined as the local tangent direction. At this time, a 5x5 two-dimensional Gaussian filter kernel is applied to each pixel in the region where the segment of local laser stripe is located (i.e. the corresponding part within the region of interest). In the two-dimensional Gaussian filter kernel, the smoothing degree along the local tangent direction is controlled by a larger smoothing standard deviation = 2.0 pixel units, which can suppress random noise or slight brightness unevenness along the direction of the laser stripe. While in the normal direction perpendicular to the local laser stripe, a smaller smoothing standard deviation = 0.5 pixel units is used to retain the gray gradient change of the local laser stripe, ensuring that the clarity of the local laser stripe edge is not blurred.

[0058] In S2, the Hessian matrix of each pixel point in the filtered line laser profile image is calculated, and the normal direction perpendicular to the laser stripe is determined based on the eigenvalues and eigenvectors of the Hessian matrix. The sub-pixel center point is determined along the normal direction by Taylor expansion, and the second-order derivative value and third-order derivative value of the sub-pixel center point in the normal direction are calculated.

[0059] Specifically, for each pixel point in the filtered line laser profile image, the second-order partial derivative in the x direction, the second-order partial derivative in the y direction, and the mixed partial derivative in the xy direction are calculated using second-order central difference or Sobel operator. A 2x2 Hessian matrix of the pixel point is thus constructed. Eigenvalue decomposition is performed on the Hessian matrix to obtain two eigenvalues and two corresponding eigenvectors. The direction of the eigenvector corresponding to the eigenvalue with larger absolute value represents the direction of rapid change of the gray value of the pixel point, i.e. the direction perpendicular to the laser stripe edge, which is determined as the normal direction of the pixel point.

[0060] In the normal direction, the center of the laser stripe corresponds to the position where the first derivative of the grayscale intensity is zero. For an integer pixel that approximates the center point, the first and second derivatives are calculated along the normal direction. According to a one-dimensional Taylor expansion, the sub-pixel offset is approximately equal to the negative first derivative value divided by the second derivative value. Multiplying the sub-pixel offset by the unit vector in the normal direction and adding it to the coordinates of the original integer pixel yields the sub-pixel precision center point coordinates, such as... Figure 2 At the obtained sub-pixel center point, interpolation is performed on neighboring pixels, and second-order central difference and other methods are used again to calculate the second and third derivative values ​​along the normal direction, which are then used for subsequent asymmetry correction.

[0061] In an optional embodiment, in S2, determining the sub-pixel center point along the normal direction using Taylor expansion includes:

[0062] For the first in the normal direction For each integer pixel, its subpixel offset Through formula The calculation yielded that, For the first The coordinates of an integer pixel for The value of the first derivative along the normal direction at the point. for The value of the second derivative along the normal direction at the point;

[0063] The coordinates of the sub-pixel center point are: .

[0064] Due to the discrete nature of line laser contour images, the true fringe center is usually located between two pixels. By analyzing the grayscale distribution on the fringe cross-section, its peak position can be estimated. For example, on a certain normal line, after preliminary detection, the integer pixel with the largest grayscale value... Located at coordinates =15. To obtain sub-pixel precision, calculate this integer pixel point. The first and second derivatives of the nearby grayscale curves. Assume that integer pixels are obtained through calculation. The first derivative value at =2.8, second derivative value =-8.0, then the subpixel offset =0.35. Therefore, the obtained sub-pixel center point coordinates are x=15.35. This indicates that the actual laser stripe center is closer to the coordinate 15.35, rather than the integer coordinate 15.

[0065] Calculating subpixel offset In order to avoid the denominator For 0, a preset threshold can be set, and when the absolute value of the denominator is less than the preset threshold, the point is considered as an invalid point or a noise point, and is not involved in subsequent calculation.

[0066] S3, based on the second derivative value and the third derivative value, calculate the asymmetry, and based on the asymmetry, calculate the coordinate offset correction amount and the fitting weight of each sub-pixel center point; apply the coordinate offset correction to all sub-pixel center points to obtain a corrected contour point set; using the corrected contour point set and the corresponding fitting weight, perform a first weighted least squares ellipse fitting to obtain the parameters of the initial ellipse.

[0067] For each sub-pixel center point, add its original coordinate vector to the coordinate offset correction vector of the sub-pixel center point calculated in the previous step to obtain a new coordinate vector. Collect the new coordinate points of all sub-pixel center points after this correction to form a corrected contour point set for ellipse fitting.

[0068] The general quadratic curve equation of the ellipse is taken as the fitting model. For each contour point in the corrected contour point set and its corresponding fitting weight , a weighted least squares problem is constructed, the goal of which is to minimize the weighted algebraic distance square sum of all points, that is, to minimize while satisfying the constraint condition . By solving the constrained optimization problem, a set of initial ellipse parameters A, B, C, D, E, F is obtained.

[0069] In S3, based on the second derivative value and the third derivative value, calculate the asymmetry, and based on the asymmetry, calculate the coordinate offset correction amount and the fitting weight of each sub-pixel center point, including:

[0070] The feature width of the laser stripe along the normal direction is taken as the scale factor;

[0071] The coordinate offset correction amount is calculated by the formula , where is the second derivative value at the sub-pixel center point , is the third derivative value at the sub-pixel center point , and is the asymmetry; The fitting weight is calculated by the formula

[0072] .

[0073] ​​Ideally, the fringe profile is symmetric Gaussian distribution, but in practice, it may be skewed due to stray light or surface characteristics of the object, the third derivative value This asymmetry can be measured. For a certain sub-pixel point calculated in the previous step, further calculate its second derivative =-8.0, the third derivative =-12.0, and measure the fringe feature width at this point 1.5 pixel units. At this time, the coordinate offset correction amount is calculated as -0.5625. The coordinate offset correction amount will be used to correct the previously obtained sub-pixel coordinates. At the same time, the fitting weight of this point =0.69. A weight close to 1 indicates that the sub-pixel point is symmetrical and the data is highly reliable; otherwise, a lower weight indicates that the data of the sub-pixel point may have a large deviation, and its contribution in fitting should be weakened, as shown in Figure 3 .

[0074] S4, calculate the distance of each contour point in the corrected contour point set to the initial ellipse, and remove outliers according to the distance threshold to obtain the remaining contour point set; use the remaining contour point set and its corresponding fitting weight to perform weighted least squares ellipse fitting to obtain the fitted ellipse; based on the length of the major axis and the minor axis of the fitted ellipse, the outer diameter and the ovality of the cable are calculated.

[0075] Specifically, for each contour point in the corrected contour point set, calculate its geometric distance to the initial ellipse. To simplify the calculation, the Sampson distance can be used as an approximation. After calculating the distances of all contour points, the average and standard deviation of these distance values are calculated. Set a distance threshold, and traverse all contour points again. If the distance of a contour point to the initial ellipse is greater than the distance threshold, it is determined that the contour point is an outlier caused by surface defects, and it is removed from the contour point set. All contour points that are not removed constitute the remaining contour point set.

[0076] Use the remaining contour point set obtained after removing outliers, and the fitting weight initially calculated for these contour points, to repeat the weighted least squares ellipse fitting process once. The mathematical principles and implementation methods of this process are exactly the same as the initial fitting, and a set of ellipse parameters 、 、 、 、 、 are obtained.

[0077] According to the ellipse parameters 、 、 、 、 , The center coordinates, rotation angle, major axis length a and minor axis length b of the ellipse are calculated by solving the geometric formula. The outer diameter of the cable is defined as the major axis length of the ellipse, i.e. 2a.

[0078] In S4, the distances of each profile point in the corrected profile point set to the initial ellipse are calculated, and outliers are removed according to a distance threshold, including:

[0079] The distances of each profile point in the corrected profile point set to the initial ellipse are calculated to obtain a distance set ;

[0080] The mean value and the standard deviation of the distance set are calculated;

[0081] The distance threshold is ;

[0082] The profile point with a distance greater than is determined as an outlier and removed.

[0083] After the initial ellipse fitting on all the corrected sub-pixel profile points, the compliance of each point to the ellipse model can be evaluated. Assuming that 200 profile points are obtained and an initial ellipse is fitted. The shortest geometric distance of each profile point to the circumference of the initial ellipse is calculated to form a set containing 200 distance values. Through calculation, the mean value = 0.08 pixel units and the standard deviation = 0.15 pixel units of the distance set are obtained. The distance threshold = 0.53 pixel units is set. All 200 profile points are traversed, and if the distance of a certain profile point is greater than 0.53, for example, the distance of a certain profile point is 0.7, the profile point is considered as an outlier and removed from the profile point set. After removing all outliers, the remaining profile points are used for ellipse fitting to obtain an ellipse reflecting the real profile of the cable.

[0084] In an optional embodiment, in S4, the outer diameter and the ovality of the cable are calculated based on the major axis and minor axis lengths of the fitted ellipse, including:

[0085] Let the major semi-axis length of the fitted ellipse be , and the minor semi-axis length be ;

[0086] The outer diameter of the cable is calculated by the formula ;

[0087] cable ovality by the formula calculated.

[0088] After all the processing steps, the fitted ellipse describes the two-dimensional profile of the cable under the camera view. The major axis and the minor axis of the fitted ellipse correspond to the maximum and minimum diameters of the cable in space.

[0089] Exemplarily, after fitting and calibration conversion from pixels to millimeters, the major axis length a = 5.20 mm and the minor axis length b = 5.15 mm of the ellipse are obtained. According to the definition, the outer diameter of the cable generally refers to its maximum diameter, so the outer diameter D is calculated by the major axis length, i.e. = 10.40 mm. The ovality represents the non-circularity of the cable cross-section, which is calculated by the formula as 0.96%. The outer diameter of 10.40 mm and the ovality of 0.96% are the core data for evaluating whether the cable meets the production specifications.

[0090] Embodiments of the cable outer diameter and ovality measurement system based on line laser profile scanning provided by the present application:

[0091] A cable outer diameter and ovality measurement system based on line laser profile scanning, comprising:

[0092] A filtering module acquires a line laser profile image irradiated on the surface of the cable, obtains a preliminary center line through centroid calculation of gray intensity, and defines a region of interest according to the preliminary center line; in the region of interest, an anisotropic Gaussian filter is performed on the pixels according to the local tangent direction of the preliminary center line, so that the smoothing principal axis of the anisotropic Gaussian filter is parallel to the local tangent direction;

[0093] A calculation module calculates the Hessian matrix of each pixel point in the filtered line laser profile image, determines the normal direction perpendicular to the laser stripe based on the eigenvalues and eigenvectors of the Hessian matrix; determines the sub-pixel center point through Taylor expansion along the normal direction, and calculates the second derivative value and the third derivative value of the sub-pixel center point in the normal direction;

[0094] A correction module calculates the asymmetry degree based on the second derivative value and the third derivative value, and calculates the coordinate offset correction amount and the fitting weight of each sub-pixel center point based on the asymmetry degree; applies coordinate offset correction to all sub-pixel center points to obtain a corrected profile point set; performs a first weighted least squares ellipse fitting using the corrected profile point set and the corresponding fitting weight to obtain the parameters of the initial ellipse;

[0095] The fitting module calculates the distance from each contour point in the corrected contour point set to the initial ellipse, and removes outliers based on the distance threshold to obtain the remaining contour point set. Using the remaining contour point set and its corresponding fitting weights, a weighted least squares ellipse fitting is performed to obtain the fitted ellipse. Based on the lengths of the major and minor axes of the fitted ellipse, the outer diameter and ellipticity of the cable are calculated.

[0096] Furthermore, in the filtering module, within the region of interest, anisotropic Gaussian filtering is performed on the pixels according to the local tangent direction of the preliminary centerline, including:

[0097] Construct a 5×5 two-dimensional Gaussian filter kernel, whose smoothing standard deviation is parallel to the local tangent direction. The smoothing standard deviation is 2.0 pixels, perpendicular to the local tangent direction. It is 0.5 pixels.

[0098] Furthermore, in the calculation module, the sub-pixel center point is determined by Taylor expansion along the normal direction, including:

[0099] For the first in the normal direction For each integer pixel, its subpixel offset Through formula The calculation yielded that, For the first The coordinates of an integer pixel for The value of the first derivative along the normal direction at the point. for The value of the second derivative along the normal direction at the point;

[0100] The coordinates of the sub-pixel center point are: .

[0101] Furthermore, in the correction module, the asymmetry is calculated based on the second and third derivative values, and the coordinate offset correction and fitting weight of each sub-pixel center point are calculated based on the asymmetry, including:

[0102] The characteristic width of the laser stripe along the normal direction As a scaling factor;

[0103] The coordinate offset correction amount From the formula Calculation, where Subpixel center point The second derivative value at that point, Subpixel center point The third derivative value at that point, It is asymmetric.

[0104] The fitting weight is calculated by the formula

[0105] Also in the description of the present specification, the meaning of "a plurality of" is at least two, for example, two, three or more, etc., unless explicitly specifically limited otherwise.​

Claims

1. A method for measuring the outer diameter and ovality of a cable based on linear laser profile scanning, characterized in that, The method comprises the following steps: S1, obtaining a linear laser profile image irradiated on the surface of the cable, obtaining a preliminary center line through gray intensity centroid calculation, and defining a region of interest according to the preliminary center line; in the region of interest, performing anisotropic Gaussian filtering on pixels according to the local tangent direction of the preliminary center line, so that the smoothing principal axis of the anisotropic Gaussian filtering is parallel to the local tangent direction; S2, calculating the Hessian matrix of each pixel point in the filtered linear laser profile image, determining the normal direction perpendicular to the laser stripe based on the eigenvalues and eigenvectors of the Hessian matrix, determining the sub-pixel center point through Taylor expansion along the normal direction, and calculating the second derivative value and the third derivative value of the sub-pixel center point in the normal direction; S3, calculating the asymmetry degree based on the second derivative value and the third derivative value, and calculating the coordinate offset correction amount and the fitting weight of each sub-pixel center point based on the asymmetry degree; applying the coordinate offset correction to all sub-pixel center points to obtain a corrected profile point set; using the corrected profile point set and the corresponding fitting weight, performing a first weighted least squares ellipse fitting to obtain the parameters of an initial ellipse; S4, calculating the distance of each profile point in the corrected profile point set to the initial ellipse, and removing outliers according to a distance threshold to obtain a remaining profile point set; using the remaining profile point set and the corresponding fitting weight, performing a weighted least squares ellipse fitting to obtain a fitting ellipse; and calculating the outer diameter and the ovality of the cable based on the lengths of the major axis and the minor axis of the fitting ellipse.

2. The cable outer diameter and ovality measurement method based on linear laser profile scanning according to claim 1, characterized in that, In S1, the anisotropic Gaussian filtering on the pixels according to the local tangent direction of the preliminary center line comprises: constructing a 5x5 two-dimensional Gaussian filter kernel with a smoothing standard deviation parallel to the local tangent direction is 2.0 pixel units, a smoothing standard deviation perpendicular to the local tangent direction is 0.5 pixel units.

3. The cable outer diameter and ovality measurement method based on linear laser profile scanning according to claim 1, characterized in that, In S2, the determination of the sub-pixel center point through Taylor expansion along the normal direction comprises: For the first in the normal direction For each integer pixel, its subpixel offset Through formula The calculation yielded that, For the first The coordinates of an integer pixel for The value of the first derivative along the normal direction at the point. for The value of the second derivative along the normal direction at the point; The sub-pixel center point coordinates are .

4. The cable outer diameter and ovality measurement method based on line laser profile scanning according to claim 3, characterized in that, In S3, the calculation of the asymmetry degree based on the second derivative value and the third derivative value, and the calculation of the coordinate offset correction amount and the fitting weight of each sub-pixel center point based on the asymmetry degree comprise: the width of the laser stripe feature in the normal direction as a scale factor; The coordinate offset correction amount is calculated by the formula wherein is the second derivative value at the sub-pixel center point , is the third derivative value at the sub-pixel center point , is the asymmetry degree; The fitting weights are calculated by the formula .

5. The cable outer diameter and ovality measurement method based on line laser profile scanning according to any one of claims 1-4, characterized in that, In S4, the calculation of the distance of each profile point in the corrected profile point set to the initial ellipse, and the removal of outliers according to a distance threshold comprise: calculate distances of each contour point in the corrected contour point set to the initial ellipse to obtain a distance set ; calculating the mean of the set of distances and the standard deviation ;​ the distance threshold to ; The distance greater than of the profile points is determined as an outlier and is rejected.

6. The cable outer diameter and ovality measurement method based on line laser profile scanning according to claim 5, characterized in that, In S4, the calculation of the outer diameter and the ovality of the cable based on the lengths of the major axis and the minor axis of the fitting ellipse comprises: The length of the major axis of the fitted ellipse is , and the length of the minor axis is ; Cable outer diameter By formula Calculated Cable ovality is calculated by the formula is calculated by the formula 7. A cable outer diameter and ovality measurement system based on line laser profile scanning, characterized in that, It comprises: a filtering module, which obtains a linear laser profile image irradiated on the surface of the cable, obtains a preliminary center line through gray intensity centroid calculation, and defines a region of interest according to the preliminary center line; in the region of interest, performing anisotropic Gaussian filtering on pixels according to the local tangent direction of the preliminary center line, so that the smoothing principal axis of the anisotropic Gaussian filtering is parallel to the local tangent direction; a calculation module, which calculates the Hessian matrix of each pixel point in the filtered linear laser profile image, determines the normal direction perpendicular to the laser stripe based on the eigenvalues and eigenvectors of the Hessian matrix, determines the sub-pixel center point through Taylor expansion along the normal direction, and calculates the second derivative value and the third derivative value of the sub-pixel center point in the normal direction; a correction module, which calculates the asymmetry degree based on the second derivative value and the third derivative value, and calculates the coordinate offset correction amount and the fitting weight of each sub-pixel center point based on the asymmetry degree; The coordinate offset correction is applied to all sub-pixel center points to obtain a corrected contour point set; the initial weighted least square ellipse fitting is performed by using the corrected contour point set and the corresponding fitting weight to obtain parameters of an initial ellipse; The fitting module calculates distances of each contour point in the corrected contour point set to the initial ellipse, and removes outliers according to a distance threshold to obtain a remaining contour point set; The weighted least square ellipse fitting is performed by using the remaining contour point set and the corresponding fitting weight to obtain a fitting ellipse; and the outer diameter and the ovality of the cable are calculated based on lengths of a major axis and a minor axis of the fitting ellipse.

8. The cable outer diameter and ovality measurement system based on line laser profile scanning of claim 7, wherein, In S1, anisotropic Gaussian filtering is performed on pixels in the region of interest according to a local tangent direction of the preliminary center line, including: constructing a 5x5 two-dimensional Gaussian filter kernel with a smoothing standard deviation parallel to the local tangent direction is 2.0 pixel units, a smoothing standard deviation perpendicular to the local tangent direction is 0.5 pixel units.

9. The cable outer diameter and ovality measurement system based on line laser profile scanning of claim 7, wherein, In the calculation module, a sub-pixel center point is determined through Taylor expansion along the normal direction, including: For the first in the normal direction For each integer pixel, its subpixel offset Through formula The calculation yielded that, For the first The coordinates of an integer pixel for The value of the first derivative along the normal direction at the point. for The value of the second derivative along the normal direction at the point; The sub-pixel center point coordinates are .

10. The cable outer diameter and ovality measurement system based on line laser profile scanning of claim 9, wherein, In the correction module, an asymmetry is calculated based on the second derivative value and the third derivative value, and a coordinate offset correction amount and a fitting weight of each sub-pixel center point are calculated based on the asymmetry, including: the width of the laser stripe feature in the normal direction as a scale factor; The coordinate offset correction amount is calculated by the formula wherein is a second derivative value at a sub-pixel center point , is a third derivative value at a sub-pixel center point , is an asymmetry degree; The fitting weights are calculated by the formula .

Citation Information

Patent Citations

  • Cable protective jacket surface defect detector and detection method thereof

    CN105911067A

  • Circumferential reciprocating wire diameter continuous measuring apparatus and application method thereof

    CN107677213A