Cable surface defect detection method based on multi-scale feature fusion

By combining multi-angle illumination correction and two-dimensional image analysis with multi-scale feature fusion, accurate detection of surface defects in cables can be achieved, solving the problem of difficulty in distinguishing normal textures from defects in existing technologies and improving detection accuracy and efficiency.

CN122814610BActive Publication Date: 2026-11-06SUZHOU DAOWANG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611290864.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-11-06
Estimated Expiration
2046-08-25

AI Technical Summary

Technical Problem

Existing technologies for cable surface defect detection struggle to effectively distinguish between normal curvature textures and surface roughness anomalies caused by actual defects, and require additional 3D measurement hardware support.

Method used

A multi-scale feature fusion method is adopted. Through multi-angle non-uniform illumination correction and two-dimensional reflection image sequence analysis, local texture roughness components are extracted, the three-dimensional orientation angle of surface micro-regions is calculated, a preset defect reflection model library is matched, a multi-scale morphology matrix is ​​constructed, and the spatial distribution of defects is determined.

Benefits of technology

Without adding extra hardware, it can accurately separate normal curvature texture from defects, improve detection accuracy, reduce false detection rate, and provide a basis for cable quality grading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122814610B_ABST
    Figure CN122814610B_ABST
Patent Text Reader

Abstract

The application discloses a cable surface defect detection method based on multi-scale feature fusion and belongs to the technical field of machine vision defect detection. The method comprises the following steps: acquiring original reflection image sequences of a cable surface to be detected under multiple preset illumination angles and performing non-uniform illumination correction based on cable axial curvature distribution; extracting a gray level fluctuation profile along the cable axial direction in each corrected reflection image to determine a local texture roughness component; screening suspected defect feature points according to the distribution discrete degree of the local texture roughness component under all illumination angles at the same scanning position; calculating a surface micro-area three-dimensional orientation angle by using the pixel coordinate offset of the suspected defect feature points in different images, and matching a standard reflection distortion template in a preset defect reflection model library to mark a positioned defect point. The method can effectively identify the micro defects on the cable surface and acquire the three-dimensional distribution information of the micro defects without relying on ideal illumination conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision defect detection technology, specifically a method for detecting cable surface defects based on multi-scale feature fusion. Background Technology

[0002] As a crucial carrier for power transmission and signal communication, the surface quality of cables directly affects their insulation performance and service life. Current technologies for detecting surface defects in cables often rely on illumination from a single angle or fixed direction, acquiring single or a small number of images and extracting areas of surface grayscale anomalies to determine defects. This type of method, based on the assumption of uniform illumination, has significant limitations on surfaces with continuously varying curvature, such as the cylindrical surface of cables. Because cable surfaces exhibit gradual curvature changes along the axial direction, as well as normal processing textures like spiral patterns and extrusion marks, the reflected light intensity from a single light source is non-uniformly distributed both circumferentially and axially, leading to systematic grayscale distortion in the image. Conventional non-uniform illumination correction algorithms often employ global histogram equalization or homomorphic filtering, without specifically compensating for the actual axial curvature distribution of the cable. The corrected image still retains slowly varying brightness gradients in the axial direction, which can easily be misjudged as defect boundaries in subsequent analysis. Existing local texture analysis methods typically rely on fixed-scale gradient or texture operators to statistically analyze grayscale co-occurrence or gradient directions within local image regions. For cable surfaces with regular textures, these methods struggle to distinguish between normal processing textures and localized roughness variations caused by minor defects. Normal textured areas exhibit regular grayscale fluctuations under a single illumination angle, while minor defects also cause grayscale fluctuations. However, the two types of fluctuations show high similarity in representation under a single angle, making it highly susceptible to false positives when relying solely on local statistics from a single-angle image. Furthermore, inferring the 3D morphology of suspected defective areas often requires additional structured light equipment or multi-view camera systems, increasing hardware complexity.

[0003] The problems to be solved by this application are: how to effectively separate the reflection changes caused by the normal curvature texture of the cable surface from the surface roughness anomalies caused by real defects under multi-angle non-uniform lighting conditions, so as to avoid misjudging the axial residual brightness gradient as a defect; and how to achieve the analysis of the three-dimensional orientation of the surface micro-area of ​​the suspected defect point using only a multi-angle two-dimensional reflection image sequence without introducing additional three-dimensional measurement hardware, so as to eliminate noise points that do not match the defect reflection model. Summary of the Invention

[0004] The purpose of this invention is to provide a cable surface defect detection method based on multi-scale feature fusion. This method can effectively separate normal curvature texture from surface roughness anomalies under multi-angle non-uniform illumination conditions, and can analyze the three-dimensional orientation of surface micro-areas of suspected defect points using two-dimensional reflection image sequences without adding additional three-dimensional measurement hardware, thereby achieving accurate detection and spatial distribution determination of cable surface defects.

[0005] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a cable surface defect detection method based on multi-scale feature fusion. This method acquires a sequence of original reflection images of the cable surface under multiple preset illumination angles, and performs non-uniform illumination correction based on the cable axial curvature distribution on each original reflection image to obtain a corrected reflection image sequence. This non-uniform illumination correction performs reverse grayscale compensation for illumination attenuation based on changes in the cable surface curvature, resulting in a uniform reflection effect on the cable surface and eliminating interference from the surface's own halo on defect identification. The grayscale undulation contour along the cable axis is extracted from each corrected reflection image, and the local texture roughness component at each scanning position is determined based on the sign change frequency of the grayscale difference between adjacent pixels. This roughness component can sensitively reflect the microscopic undulation features of the cable surface. Based on the dispersion of the local texture roughness component distribution at the same scanning position under all preset illumination angles, suspected defect feature points are screened. The significant differences in the roughness response of the defect area under different illumination directions are used to highlight the candidate defect area from the uniform background. For each suspected defect feature point, the three-dimensional orientation angle of the corresponding surface micro-area is calculated using its pixel coordinate offset in different calibrated reflection images, enabling quantitative estimation of the spatial orientation of small-scale defect regions. Based on the three-dimensional orientation angle of the surface micro-area of ​​each suspected defect feature point, a standard reflection distortion template under the corresponding orientation angle in a preset defect reflection model library is matched, and the successfully matched suspected defect feature points are marked as located defect points. By using the matching of reflection distortion templates, it is possible to effectively distinguish between real defects and false responses such as surface stains and texture changes, improving the accuracy of defect detection. Based on the two-dimensional coordinate set of the located defect points in the calibrated reflection image sequence, a multi-scale morphological matrix reflecting the spatial arrangement of cable surface defects is constructed. Based on the continuous span values ​​of the non-zero element regions in the row and column directions of the multi-scale morphological matrix, the overall extension direction and aggregation density level of cable surface defects are determined, thereby obtaining the macroscopic distribution characteristics of defect groups and providing a reliable basis for cable quality grading and process optimization.

[0006] As a preferred embodiment of the present invention, the specific process of non-uniform illumination correction is as follows: Multiple preset illumination angles are evenly distributed within a range of 30 to 150 degrees, according to the angle between the angle and the plane perpendicular to the cable axis. One original reflection image is acquired at each preset illumination angle, and these images are arranged in ascending order to form an original reflection image sequence. For any original reflection image in the original reflection image sequence, a horizontal grayscale profile is extracted pixel-by-pixel along the cable axis. The attenuation rate of grayscale values ​​in the horizontal grayscale profile from the center to both sides is calculated, resulting in a sequence of illumination attenuation coefficients at various positions along the cable axis. Based on the illumination attenuation coefficient sequence, reverse grayscale compensation is performed on the corresponding horizontal grayscale profile in the original reflection image. The resulting corrected reflection images are arranged in the original sequence order to form a corrected reflection image sequence. This processing method can adapt to curvature changes at different positions of the cable, achieving precise illumination balance.

[0007] Furthermore, the process of extracting grayscale undulation contours and determining local texture roughness components includes: for any corrected reflection image, taking the cable axis as a reference, extracting the grayscale values ​​of each row of pixels along the axis direction to obtain the original grayscale sequence of the row of pixels, and performing local mean detrending processing on the original grayscale sequence to obtain the grayscale undulation contour sequence corresponding to the row of pixels; starting from the second element of the grayscale undulation contour sequence, calculating the grayscale difference between the current element and the previous element sequentially, recording the positive and negative signs of each grayscale difference, and counting the number of alternating positive and negative signs within a unit length, using this number as the local texture roughness component of the row of pixels at that scanning position; traversing all rows of pixels along the cable axis to obtain the local texture roughness components at all scanning positions under the corrected reflection image, forming a single-image roughness distribution map. The local texture roughness component has high sensitivity to minute morphological changes on the cable surface and can capture subtle defects that are difficult for the human eye to perceive.

[0008] Preferably, the method for screening suspected defect feature points is as follows: At any scanning position, collect all local texture roughness components corresponding to that scanning position in the corrected reflection image, forming a roughness sample set at that scanning position; calculate the range of all roughness components in the roughness sample set, divide the range by the absolute value of the median of the roughness components in the set, and obtain the discrete response value at that scanning position; determine the scanning position with a discrete response value greater than a preset discrete threshold as a roughness anomaly position, and mark the corresponding pixels of the roughness anomaly position in all corrected reflection images as suspected defect feature points. Using the discrete response value of the ratio of range to median can reduce false triggering caused by isolated noise and ensure the stability of suspected defect feature point extraction.

[0009] As a further improvement of the present invention, when calculating the three-dimensional orientation angle of a surface micro-region, two corrected reflection images with the largest difference in illumination angle are selected from the corrected reflection image sequence as a reference image pair. The first pixel coordinates and second pixel coordinates of any suspected defect feature point in the two reference images are recorded respectively. The pixel displacement vector between the first pixel coordinates and the second pixel coordinates is calculated. Based on the components of the pixel displacement vector in the horizontal and vertical directions of the image, combined with the preset illumination angle difference corresponding to the two reference images and the geometric projection relationship of the cable surface, the pitch angle and azimuth angle of the normal vector of the surface micro-region where the suspected defect feature point is located are solved in three-dimensional space. The pitch angle and azimuth angle are used together as the three-dimensional orientation angle of the surface micro-region of the suspected defect feature point. This calculation process utilizes the parallax information of the large-angle difference image pair to obtain a high-precision orientation angle estimate.

[0010] Furthermore, the process of matching standard reflection distortion templates and marking located defect points is as follows: In a preset defect reflection model library, the standard reflection distortion templates are divided into multiple template subsets according to the pitch and azimuth intervals of the three-dimensional orientation angle of the surface micro-area. Each template subset corresponds to a combination of a pitch interval and an azimuth interval. For any suspected defect feature point, it is located to the corresponding template subset based on the pitch and azimuth angles of its surface micro-area. The similarity between the actual gray-scale undulation contour of the suspected defect feature point and the contour of each standard reflection distortion template in the template subset is calculated. The contour similarity is preferably the normalized cross-correlation value between the actual gray-scale undulation contour and the standard reflection distortion template. The defect category corresponding to the standard reflection distortion template with the highest contour similarity is selected as the discrimination category of the suspected defect feature point. When the contour similarity is higher than a preset matching threshold, the suspected defect feature point is marked as a located defect point; otherwise, the suspected defect feature point is included in the noise point set. Through the dual constraints of orientation angle index and similarity comparison, the defect recognition recall rate and noise resistance performance are significantly improved.

[0011] Furthermore, the process of constructing the multi-scale morphological matrix is ​​as follows: The two-dimensional coordinates of all located defect points in any corrected reflection image are mapped to the same spatial reference grid. The number of rows in the spatial reference grid is equal to the number of pixels in the height direction of the corrected reflection image, and the number of columns is equal to the number of pixels in the width direction of the corrected reflection image. In the spatial reference grid, a first eigenvalue is assigned to each grid cell containing a located defect point, and a second eigenvalue is assigned to grid cells not marked as located defect points, resulting in a reference morphological matrix. Morphological dilation operations with different window sizes are sequentially performed on the reference morphological matrix. The matrix obtained after each dilation operation is differiated from the matrix before dilation to obtain the incremental distribution of defect boundaries at each scale. The incremental distributions of defect boundaries at all scales are superimposed onto the reference morphological matrix to form the multi-scale morphological matrix. The multi-scale morphological matrix integrates defect boundary information at different observation scales, thereby enhancing the spatial connectivity of discrete defect points.

[0012] In another preferred embodiment of the present invention, when determining the overall extension direction and aggregation density level of cable surface defects, all non-zero elements in the multi-scale morphology matrix are traversed, and the minimum and maximum row numbers of the non-zero elements in the row direction are recorded to obtain the continuous span value in the row direction. The minimum and maximum column numbers of the non-zero elements in the column direction are also recorded to obtain the continuous span value in the column direction. The ratio of the continuous span value in the row direction to the continuous span value in the column direction is used as the overall extension direction feature value of the cable surface defects. Based on the preset angle range in which the overall extension direction feature value falls, the dominant extension direction of the cable surface defects along the axial or circumferential direction is determined. For example, when the overall extension direction feature value is greater than 2, it is determined to be axial extension dominant, and when the overall extension direction feature value is less than 0.5, it is determined to be circumferential extension dominant. The total number of non-zero elements in the multi-scale morphology matrix is ​​counted, and the total number is divided by the product of the continuous span value in the row direction and the continuous span value in the column direction to obtain the defect filling density value. Based on the preset density range in which the defect filling density value falls, the aggregation density level of the cable surface defects is determined. This classification method can quantitatively describe the overall morphology of defect groups, which facilitates subsequent automated quality assessment.

[0013] The technical effects and advantages provided by the present invention in the above technical solution are as follows: Suspected defect feature points are screened by analyzing the dispersion of local texture roughness components at the same scanning location under all preset illumination angles. For genuine surface defects, the micro-area undulations are geometrically irregular. When the illumination angle changes, the grayscale undulations at the same location undergo a fundamental change, leading to significant differences in the frequency of corresponding sign changes across different images, resulting in a marked divergence of roughness components. In contrast, for normal processed textures, the geometric undulations are more regular. Changes in illumination angle only cause an overall shift or contrast change in grayscale undulations, while the frequency of sign alternation remains relatively constant, and the roughness components at different angles are highly concentrated. By calculating the ratio of the absolute value of the range to the median of the roughness components at all angles, the contrast in roughness response caused by changes in illumination angle can be quantified. This keeps the ratio at normal texture locations in a low range, while significantly amplifying the ratio at defect locations. This processing method eliminates the need for pre-assumptions about the shape or size of defects and the requirement to set fixed grayscale thresholds. It directly eliminates the interference of slow grayscale changes caused by axial residual brightness gradients in a single image on roughness estimation, as slow gradients hardly produce frequent sign oscillations and do not form divergent roughness distributions at multiple angles. The three-dimensional orientation angle of the surface micro-area of ​​suspected defect feature points is calculated by correcting the pixel coordinate offset between reflected images and matched with a standard reflection distortion template for the corresponding orientation in a pre-defined defect reflection model library. Multi-angle illumination causes parallax shifts in the imaging position of the same surface micro-area in different images; the magnitude and direction of the shift are directly determined by the orientation of the local normal vector of the micro-area. Pixel displacement vectors are extracted from the two corrected images with the largest difference in illumination angles. Combined with the known difference in illumination angles and the geometric projection relationship of the cable cylinder surface, the pitch and azimuth angles of the micro-area in three-dimensional space can be solved. After obtaining the orientation angle, standard reflection distortion templates for the same angle interval are retrieved from a pre-defined defect reflection model library divided by orientation space. These templates describe the grayscale undulation contour shape that a micro-area with a specific orientation should present under corresponding illumination. The actual grayscale undulation contour is normalized and matched with the template. Only points with similarity higher than a threshold are retained as located defect points, and the rest are classified as noise points. This process does not require additional hardware such as structured light or binocular cameras. It recovers the three-dimensional orientation of the micro-area simply by analyzing the offset of conjugate points in the two-dimensional image sequence. Then, model matching under orientation constraints is used to eliminate a large number of points that are mislabeled due to accidental grayscale anomalies, significantly reducing the probability of false defect detection. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0015] Figure 1 This is a flowchart of a cable surface defect detection method based on multi-scale feature fusion; Figure 2 This is a flowchart of a non-uniform illumination correction method based on the axial curvature distribution of cables; Figure 3 It is the grayscale undulation contour and local texture roughness component curve in the corrected reflection image of the cable surface. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] See Figure 1 This invention provides a method for detecting cable surface defects based on multi-scale feature fusion, comprising: acquiring a sequence of original reflection images of the cable surface under multiple preset illumination angles, and performing non-uniform illumination correction based on the cable axial curvature distribution on each original reflection image to obtain a corrected reflection image sequence; extracting the gray-level undulation contour along the cable axis in each corrected reflection image, and determining the local texture roughness component at each scanning position based on the sign change frequency of the gray-level difference between adjacent pixels; filtering out suspected defect feature points based on the distribution dispersion of the local texture roughness components at the same scanning position under all preset illumination angles; and processing each suspected defect feature point... Using the pixel coordinate offset of the suspected defect feature point in different calibrated reflection images, the three-dimensional orientation angle of the surface micro-area corresponding to the suspected defect feature point is calculated. Based on the three-dimensional orientation angle of the surface micro-area of ​​each suspected defect feature point, a standard reflection distortion template under the corresponding orientation angle in the preset defect reflection model library is matched, and the successfully matched suspected defect feature points are marked as located defect points. Based on the two-dimensional coordinate set of the located defect points in the calibrated reflection image sequence, a multi-scale morphology matrix reflecting the spatial arrangement of cable surface defects is constructed. Based on the continuous span values ​​of the non-zero element regions in the row and column directions of the multi-scale morphology matrix, the overall extension direction and aggregation density level of the cable surface defects are determined.

[0018] Example 1: In specific implementation, please refer to Figure 2Multiple preset illumination angles are evenly distributed within the range of 30 to 150 degrees, with the angle between the illumination angle and the plane perpendicular to the cable axis being 30, 60, 90, 120, and 150 degrees. At each preset illumination angle, an image acquisition device captures a raw reflection image of the surface of the cable to be inspected. All the acquired raw reflection images are arranged in ascending order of illumination angle to form a raw reflection image sequence.

[0019] For each original reflective image in the original reflective image sequence, non-uniform illumination correction based on the cable axial curvature distribution is performed. In the original reflective image, the cable axial direction is defined as either the row or column direction of the image, determined according to the actual extension of the cable in the image. The cable axial direction is used as... The axis, the transverse direction perpendicular to the cable axis is Establish the image coordinate system along the axis. Axial direction, for each axial position Extract the horizontal grayscale profile , The horizontal axis is... Representing coordinates The original grayscale value at that location.

[0020] For the extracted horizontal grayscale profile Calculate the attenuation rate of grayscale values ​​from the center of the profile to both sides. Determine the transverse grayscale profile. central position central position Take as a horizontal grayscale profile The horizontal coordinate of the maximum grayscale value. At the center position. On both sides, select a preset offset from the center position symmetrically. Two lateral positions and Obtain the grayscale values ​​corresponding to these two horizontal positions. and Calculate the average of these two grayscale values. , Axial position Light attenuation coefficient at the location Defined as For all axial positions By performing the above calculations, the sequence of light attenuation coefficients at various positions along the cable axis is obtained. .

[0021] In practical implementation, a preset offset is used. Determined based on the horizontal pixel width of the cable in the original reflected image. Set to one-quarter of the horizontal pixel width of the cable. When the horizontal pixel width of the cable is... At pixel level, .

[0022] Obtain the light attenuation coefficient sequence Then, reverse grayscale compensation is performed on the original reflection image to generate a corrected reflection image. During the reverse grayscale compensation process, a homogenization reference coefficient is set. , The value is a sequence of light attenuation coefficients. The median of all illumination attenuation coefficients in the original reflection image. The original gray value at the location Calculate the corresponding coordinates in the corrected reflection image using the following formula. Corrected grayscale value at the location : in, For the original reflection image in coordinates grayscale value at that location To correct the reflection image in coordinates grayscale value at that location Axial position The light attenuation coefficient at that location, This is the homogenization reference coefficient. By multiplying the original grayscale value by the ratio of the homogenization reference coefficient to the illumination attenuation coefficient at the corresponding axial position, the attenuation of reflected light caused by the axial curvature distribution of the cable is compensated, so that the cable surface presents a homogenized reflection effect in the corrected reflection image.

[0023] Traverse all pixel coordinates in the original reflective image, calculate the corrected grayscale value according to the above formula, and complete the inverse grayscale compensation of the original reflective image to obtain a corrected reflective image. Perform the above non-uniform illumination correction process on each original reflective image in the original reflective image sequence, and arrange all the obtained corrected reflective images in the order of the corresponding original reflective images in the original reflective image sequence to form a corrected reflective image sequence.

[0024] Example 2: In practice, for each corrected reflection image in the corrected reflection image sequence, the operation is performed using the cable axis as a reference. The cable axis is a straight line defined in the corrected reflection image, and its direction is consistent with the cable's extension direction in the corrected reflection image. Along the axis, the grayscale values ​​of each row of pixels are extracted line by line in the corrected reflection image. The direction of each row of pixels is parallel to the axis direction; therefore, each row of pixels corresponds to a specific lateral offset position along the cable axis. For any given... For each row of pixels, the gray values ​​of all pixels in that row are arranged sequentially along the axis to obtain the [number of pixels]. The original grayscale sequence of the row pixels, the length of which is equal to the total number of pixels in the corrected reflective image along the axial direction.

[0025] For the first The original grayscale sequence of rows and pixels undergoes local mean detrending processing. The specific method for local mean detrending is as follows: first, local mean smoothing is applied to the original grayscale sequence; then, the difference between the original grayscale sequence and the locally smoothed result is calculated. A sliding window is used to calculate the local mean, with a window length of nine pixels. For columns in the original grayscale sequence... The grayscale value is taken from the original grayscale sequence by column number. The center's four pixels before and after, and the column number. Each character has its own corresponding grayscale value, totaling nine grayscale values. The arithmetic mean of these nine grayscale values ​​is calculated, and this arithmetic mean is used as the column number. The local mean at each position. For the first four and last four pixels in the original grayscale sequence, a sliding window is filled with grayscale values ​​obtained by mirroring the original grayscale sequence at its boundaries. The grayscale value of each column in the original grayscale sequence is subtracted from the local mean at the corresponding column indices to obtain a difference sequence, which is used as the first... The grayscale undulation contour sequence corresponding to the row pixels.

[0026] Starting from the second element of the grayscale undulation contour sequence, calculate the grayscale difference between the current element and the previous element sequentially. For a grayscale undulation contour sequence with column number... Calculate the grayscale difference of the elements. Grayscale difference The column number in the grayscale undulation contour sequence is The gray value minus the column number is grayscale values, of which Record each grayscale difference. The sign of the symbol is positive or negative; a positive sign indicates the difference in gray levels. A value greater than zero, with a negative sign, indicates a difference in grayscale values. Less than zero, when the grayscale difference is less than zero. When the value is zero, the sign of the previous grayscale difference is retained.

[0027] Define a scanning position concept on the cable axis. Each scanning position corresponds to a continuous local region in the grayscale undulation contour sequence, and the length of this local region is a preset unit length. The unit length is set to thirty pixels. In specific settings, the value of the unit length corresponds to the scale resolution of the physical texture sampling of the cable surface; thirty pixels can obtain sufficient sign variation samples at the scale of texture changes caused by defects on the cable surface. For a scanning position on the grayscale undulation contour sequence... Scan location The starting column number is Scan location The covered column index range is At the scan location Within the covered column index range, count the number of times the positive and negative signs alternate. Alternating positive and negative signs refer to the alternation of adjacent grayscale differences within the column index range of the grayscale fluctuation contour sequence. and When the grayscale difference The sign of the positive or negative value and the difference in grayscale When the signs of positive and negative signs are different, it is counted as one alternation. The number of alternations obtained is taken as the number of alternations. row pixels at scan position The local texture roughness component at that location.

[0028] The scan position step size in the axial direction of the cable is set to ten pixels, that is, adjacent scan positions... and The starting column numbers are spaced ten pixels apart. By setting the step size to be smaller than the unit length, the column number intervals covered by adjacent scan positions partially overlap, which can generate a finer local texture roughness component distribution along the axis. For the first... Row pixels, moving the scan position along the axis in steps, calculating the local texture roughness component at each scan position, until the column number interval covered by the scan position exceeds the first row. The range of the grayscale undulation contour sequence of the row pixels.

[0029] Traverse the pixels of all rows along the cable axis, that is, for all The above operations are performed on all values ​​to obtain the local texture roughness components of all rows in the corrected reflection image at all scan positions. All local texture roughness components are arranged according to the horizontal position of their row and the axial position of their scan position to form a two-dimensional numerical matrix corresponding to the spatial position of the corrected reflection image. The two-dimensional numerical matrix is ​​used as the single-image roughness distribution map of the corrected reflection image.

[0030] See Figure 3 In the figure, the horizontal axis represents the pixel position along the cable axis, ranging from 0 to 2000 pixels, reflecting the spatial distribution of the cable surface along the axial direction. The left vertical axis is marked in green, representing the grayscale fluctuation value, with a value range of approximately -60 to 60. The right vertical axis is marked in orange, representing the local texture roughness component, i.e., the number of times the positive and negative signs alternate, with a value range of approximately 14 to 24 alternations.

[0031] The green curve represents the grayscale undulation profile, reflecting the local grayscale variation trend at continuous pixel positions along the axis. The curve exhibits periodic fluctuations with distinct peaks and valleys, reflecting the undulating characteristics of the cable surface texture. The orange curve represents the local texture roughness component, calculated based on the sign change frequency of the grayscale undulation profile. It shows a discrete fluctuation trend, with the curve varying between 14 and 24 alternations, indicating significant differences in local texture roughness at different axial positions.

[0032] Judging from the trend of the curve, the gray-level undulation contour and the local texture roughness component generally show a correlation and fluctuation relationship. In the gray-level undulation peak area, the local texture roughness component usually shows a higher value, reflecting that the texture symbol changes frequently in this area and the texture roughness is large. In the gray-level undulation valley area, the local texture roughness component is relatively low, indicating that the texture is gentle and the roughness is small.

[0033] Example 3: In practice, for any given scanning position, that position corresponds to a specific local texture roughness component in the single-image roughness distribution map of each corrected reflection image in the corrected reflection image sequence. Since the corrected reflection images in the sequence are spatially aligned, the same scanning position in different corrected reflection images points to the same physical location on the cable surface. The total number of images is denoted as... , This equals the number of preset illumination angles. At the scanning position. Place, collect all Each of the quadrature-corrected reflectance images at the scanning position The local texture roughness component at this location will... The local texture roughness component constitutes the scanning position. The roughness sample set at the location.

[0034] In one embodiment, the roughness sample set is represented as ,in Indicates the scan position In the Correct the local texture roughness component in the reflected image. The range of values ​​is from arrive integers, This is the index of the scan position.

[0035] For roughness sample set Calculations are performed to obtain the scan position. The discrete response value at the location. The calculation process is as follows: First, calculate the range of all local texture roughness components in the roughness sample set. The range is the difference between the maximum and minimum local texture roughness components in the roughness sample set, denoted as . Next, calculate the median of all local texture roughness components in the roughness sample set, denoted as . When the number of elements in the roughness sample set When it is an odd number, The value is the local texture roughness component located in the middle position after sorting; when the number of elements in the roughness sample set... When it is even, The value is the arithmetic mean of the two middle local texture roughness components after sorting. The median is used. The absolute value of is denoted as Scan location discrete response value at Calculate using the following formula: in, For scanning location Discrete response values ​​at the location, For scanning location The range of all local texture roughness components in the corresponding roughness sample set. For scanning location The absolute value of the median of all local texture roughness components in the corresponding roughness sample set. Discrete response value. Reflected in the scan position The relative distribution of local texture roughness components at different illumination angles. When the cable surface is at the scanning position... When a defect exists, the reflection behavior of the defect micro-region varies with different illumination angles, resulting in differences in the scanning position in different corrected reflection images. The local texture roughness component at that location exhibits significant fluctuations, resulting in discrete response values. The corresponding increase.

[0036] The preset discrete threshold is denoted as Preset discrete threshold The value is set to The setting is based on the following: For the normal area of ​​the cable surface, the fluctuation of the local texture roughness component under different lighting angles is mainly caused by measurement noise and the random orientation of the surface micro-morphology, with a range of... It usually does not exceed the absolute value of the median. 0.8 times; while when the range Exceeding the absolute value of the median When the value is 0.8 times the normal value, it indicates that the dispersion of local texture roughness components under different illumination angles has exceeded the normal fluctuation range. (Scanning position) An optical anisotropy anomaly exists at this location, consistent with the optical reflection characteristics of a defect micro-region. The calculated discrete response values... With preset discrete threshold Compare the discrete response values. Greater than the preset discrete threshold At that time, the scanning location will be The location was determined to be an abnormal roughness.

[0037] The above-described operations of collecting roughness sample sets and calculating discrete response values ​​are performed on all scan locations to obtain the discrete response value for each scan location, and then compared with a preset discrete threshold. Comparisons are made to identify all roughness anomaly locations. In the corrected reflection image sequence, each pixel in each corrected reflection image corresponds to a physical location and a scan position on the cable surface. The corresponding pixels for each roughness anomaly location in all corrected reflection images in the sequence are extracted, and all these corresponding pixels are marked as suspected defect feature points. A roughness anomaly location generates a marked pixel in each corrected reflection image of the sequence; therefore, the number of roughness anomaly locations multiplied by the number of corrected reflection images is [number missing]. It equals the total number of marked suspected defect feature points.

[0038] Example 4: In practice, two corrected reflection images with the largest difference in illumination angle are selected from the corrected reflection image sequence as a reference image pair. The preset illumination angles corresponding to each corrected reflection image in the corrected reflection image sequence are arranged in ascending order as 30 degrees, 60 degrees, 90 degrees, 120 degrees, and 150 degrees. The two corrected reflection images with the largest difference in illumination angle are the corrected reflection image with a preset illumination angle of 30 degrees and the corrected reflection image with a preset illumination angle of 150 degrees. These two corrected reflection images are used as the reference image pair, and the difference in preset illumination angle between the two reference images is 120 degrees.

[0039] For any suspected defect feature point, record its first pixel coordinates in a reference image with a preset illumination angle of 30 degrees and its second pixel coordinates in a reference image with a preset illumination angle of 150 degrees. The first pixel coordinates are denoted as... , Let be the position of the first pixel coordinates in the horizontal direction of the image. The first pixel coordinate is located in the vertical direction of the image. The second pixel coordinate is represented as... , The coordinates of the second pixel are located in the horizontal direction of the image. Let be the position of the second pixel coordinates in the vertical direction of the image. Calculate the pixel displacement vector between the first and second pixel coordinates; the component of the pixel displacement vector in the horizontal direction of the image is denoted as . The component in the vertical direction of the image is denoted as , , The pixel displacement vector describes the shift in the imaging position of the same physical location on the cable surface in the corrected reflection image under different illumination angles.

[0040] Based on the components of the pixel displacement vector in the horizontal and vertical directions of the image, combined with the difference in preset illumination angles between two reference images and the geometric projection relationship of the cable surface, the pitch and azimuth angles of the normal vector of the surface micro-region where the suspected defect feature point is located are calculated in three-dimensional space. The cable surface is macroscopically approximated as a cylindrical surface, and each surface micro-region has local planar properties. The normal vector of the surface micro-region represents its spatial orientation. A local three-dimensional coordinate system is established for the cable surface, with the cable axis as the coordinate system. The axis is defined by the circumferential tangent direction of the cable. The axis is the normal to the cable surface. The pitch angle is defined as the angle between the normal vector of a surface micro-region and the axis. The angle between the axes is denoted as The azimuth angle is defined as the normal vector of a surface micro-region in the... Projection on a plane and The angle between the axes is denoted as .

[0041] The relationship between the three-dimensional orientation of the surface micro-region and the pixel displacement vector is determined by the geometric projection relationship of the cable surface. The difference in preset illumination angles corresponding to two reference images is denoted as... , The spatial angular relationship between the optical axis of the image acquisition device and the normal reference direction of the cable surface is obtained through system calibration. After calibration, the projection transformation parameters of the image acquisition device are obtained. The component of the pixel displacement vector in the horizontal direction of the image is also considered. azimuth angle of surface micro-area Sensitive to changes in the pixel displacement vector component in the vertical direction of the image. Pitch angle of surface micro-area Sensitive to changes. Components of the pixel displacement vector. , With pitch angle Azimuth and preset lighting angle difference The mapping relationship between them is expressed by the following formula: in, This represents the component of the pixel displacement vector in the horizontal direction of the image. This represents the component of the pixel displacement vector in the vertical direction of the image; This is the projection scaling factor. The calibration is obtained through system calibration. The calibration method involves placing a standard plane mirror with a known three-dimensional orientation angle on the cable surface, acquiring the pixel displacement vector of the standard plane mirror in the reference image pair, and substituting the known three-dimensional orientation angle of the standard plane mirror and the pixel displacement vector into the above mapping relationship to obtain the result. The possible values ​​of ; Let be the azimuth angle of the normal vector of the surface micro-region in three-dimensional space; Let be the pitch angle of the normal vector of the surface micro-region in three-dimensional space; The difference in preset illumination angles between two reference images. By reversing the above formula, the components of the pixel displacement vector can be obtained. and The pitch angle was calculated. and azimuth pitch angle and azimuth The three-dimensional orientation angle of the surface micro-region that together serves as the feature point of the suspected defect.

[0042] For each suspected defect feature point, the above pixel displacement vector calculation and surface micro-area three-dimensional orientation angle solution process are performed to obtain the surface micro-area three-dimensional orientation angle corresponding to each suspected defect feature point.

[0043] In practical implementation, when constructing the pre-defined defect reflection model library, the standard reflection distortion template is divided into multiple template subsets according to the pitch and azimuth angle ranges of the three-dimensional orientation angle of the surface micro-area. Pitch angle The value ranges from 0 degrees to 180 degrees, divided into twelve pitch angle intervals of 15 degrees each, which are respectively... , ... Azimuth The value ranges from 0 degrees to 360 degrees, divided into 24 azimuth intervals at 15-degree intervals, which are respectively... , ... A combination of a pitch angle interval and an azimuth angle interval corresponds to a template subset. The preset defect reflection model library contains a total of 12 x 24 = 288 template subsets. Each template subset stores several standard reflection distortion templates, which are grayscale undulation profile curves of a specific defect category at a specific orientation angle. Defect categories include common cable surface defect types such as scratches, pits, bumps, bubbles, and inclusions. The standard reflection distortion templates are generated as follows: for each defect category and each orientation angle combination, the actual grayscale undulation profile is obtained using a standard defect sample under calibrated reflection image acquisition conditions. The grayscale undulation profiles acquired multiple times are averaged and normalized before being stored as standard reflection distortion templates.

[0044] For any suspected defect feature point, obtain the three-dimensional orientation angle of the surface micro-area of ​​that suspected defect feature point, i.e., the pitch angle. and azimuth According to the pitch angle Determine the pitch angle range, based on the azimuth angle. Determine the azimuth interval where the suspected defect feature point is located, and locate the template subset corresponding to the combination of the elevation and azimuth intervals. Extract the actual grayscale undulation contour of the suspected defect feature point in the corrected reflection image sequence at a preset illumination angle of 90 degrees. The extraction method for the actual grayscale undulation contour is to cut a grayscale profile of a preset length along two orthogonal directions (circumferential and axial) centered on the suspected defect feature point, and then perform detrending processing on the grayscale profile to obtain the actual grayscale undulation contour. Calculate the contour similarity between the actual grayscale undulation contour and the contour of each standard reflection distortion template in the located template subset.

[0045] Contour similarity is defined as the normalized cross-correlation value between the actual gray-level undulating contour and the standard reflection distortion template. The actual gray-level undulating contour is denoted as a sequence. , The length is denoted as The standard reflection distortion template is denoted as a sequence. , The length is denoted as Normalized cross-correlation value The calculation method is as follows: in the sequence Upward sliding sequence Calculate the Pearson correlation coefficient at each sliding position, and take the maximum Pearson correlation coefficient among all sliding positions as the normalized cross-correlation value. The normalized cross-correlation value ranges from -1 to 1. The series mean, series standard deviation, and other statistics involved in the calculation formula are calculated according to the conventional statistical definitions.

[0046] The defect category corresponding to the standard reflection distortion template with the highest contour similarity is selected as the discrimination category of the suspected defect feature point. The highest contour similarity is compared with a preset matching threshold, which is set to 0.75. When the highest contour similarity is higher than the preset matching threshold, the suspected defect feature point is marked as a located defect point, and the defect category of the located defect point is the discrimination category. When the highest contour similarity is not higher than the preset matching threshold, the suspected defect feature point is included in the noise point set, and suspected defect feature points included in the noise point set do not participate in subsequent processing steps.

[0047] The template matching process described above is performed on all suspected defect feature points to complete the division of suspected defect feature points into the set of located defect points or noise points.

[0048] Example 5: In practice, the two-dimensional coordinates of all located defect points in any corrected reflection image are mapped to the same spatial reference grid. A corrected reflection image with a preset illumination angle of 90 degrees is selected as the coordinate source image from the corrected reflection image sequence. The coordinates of the located defect points in other corrected reflection images are transformed to the coordinate system of this coordinate source image through image registration relationships. The number of rows in the spatial reference grid is set to the number of pixels in the height direction of the coordinate source image, denoted as . The column number is set to the number of pixels in the width direction of the source image, denoted as . Each grid cell in the spatial reference grid corresponds to a pixel location in the coordinate source image, and the row number of the grid cell is... from arrive Column number from arrive .

[0049] In the spatial reference grid, each grid cell is assigned a value. For any given grid cell, if the row number of that grid cell is... and column number If at least one located defect point exists at the corresponding coordinate position, then the mesh element will be... The value is assigned to the first eigenvalue, and the first eigenvalue is set to... If the row number of the grid cell and column number If no located defect points are found at the corresponding coordinate positions, then the mesh elements will be... The value is assigned to the second eigenvalue, and the second eigenvalue is set to... After traversing all grid cells in the spatial reference grid and assigning values, a [database name] is generated. OK The baseline shape matrix of the column, the values ​​of the elements in the baseline shape matrix are non-standard. Right now The value is The element corresponds to the location of the identified defect point.

[0050] Morphological dilation operations with different window sizes are performed sequentially on the baseline morphological matrix. The structuring element used in the morphological dilation operation is a rectangular fully-filled structuring element, where all elements within the window range of the rectangular fully-filled structuring element take values ​​of 0. The window size sequence is set to... , , Three sizes. The basis for selecting the three window sizes is as follows: The window corresponds to the fine-scale defect boundary expansion, and can capture the morphological extension features of the nearest neighbors around a single located defect point; The window corresponds to the expansion of the defect boundary at a medium scale, which can reflect the connectivity trend between multiple localized defect points; The window corresponds to a larger-scale defect boundary expansion, which can reflect the spatial aggregation morphology of defect clusters over a wider area. The three window sizes cover multi-scale morphological features from point to local to regional.

[0051] The process of performing morphological dilation is as follows: based on the window size For example, taking the baseline shape matrix as the matrix before expansion, and using... A rectangular fully filled structuring element performs morphological dilation on the matrix before dilation. The dilation operation is defined as sliding the structuring element pixel by pixel on the matrix before dilation, where at least one value within the structuring element's coverage area is a valid value. When the element is , the element at the center position of the corresponding structuring element in the expanded matrix takes the value . Otherwise, the value is This yields the matrix after the first dilation operation. The matrix after the first dilation operation is then differenced from the matrix before dilation by subtracting corresponding elements from each element. Subtracting the elements of the undilated matrix from the elements of the dilated matrix yields the defect boundary increment distribution matrix at the first scale. Similarly, using... The rectangular fully filled structuring element is used to perform morphological dilation on the matrix after the first dilation operation, resulting in the matrix after the second dilation operation. The difference between the matrix after the second dilation operation and the matrix after the first dilation operation is then performed to obtain the defect boundary increment distribution matrix at the second scale. The rectangular fully filled structuring element is used to perform morphological dilation on the matrix after the second dilation operation to obtain the matrix after the third dilation operation. The matrix after the third dilation operation is then divided with the matrix after the second dilation operation to obtain the defect boundary increment distribution matrix at the third scale.

[0052] The defect boundary increment distribution matrices at all scales are superimposed with the baseline morphology matrix. The superposition method involves adding the element values ​​at corresponding positions in the baseline morphology matrix, the defect boundary increment distribution matrix at the first scale, the defect boundary increment distribution matrix at the second scale, and the defect boundary increment distribution matrix at the third scale, resulting in a multi-scale morphology matrix. The value of each element in the multi-scale morphology matrix represents the comprehensive intensity of that location within the defect core region or extension region in the multi-scale analysis. Non-zero elements correspond to the located defect points and the areas covered by extensions at different scales.

[0053] Iterate through all non-zero elements in the multi-scale morphological matrix. Non-zero elements are those whose values ​​are not equal to... The elements are recorded. The row indices of all non-zero elements in the multi-scale morphological matrix are recorded, and the smallest row indice is extracted and denoted as . Extract the maximum row number, and denote it as... Continuous span value in the row direction The calculation method is as follows Continuous span value in the row direction This represents the number of rows spanned by the continuous coverage of the non-zero element region in the row direction. It records the column indices of all non-zero elements in the multi-scale morphological matrix, extracts the smallest column indice, and denotes it as . Extract the column index with the largest value, and denote it as... Continuous span value in column direction The calculation method is as follows Continuous span value in column direction This indicates the number of columns spanned by the continuous coverage of a non-zero element region in the column direction.

[0054] Calculate the continuous span value in the row direction Continuous span value in column direction The ratio of the calculated ratio is used as the characteristic value of the overall extension direction of the cable surface defect, denoted as . The calculation method is as follows: in, The characteristic value represents the overall extension direction of surface defects in the cable. For continuous span values ​​in the row direction, This represents the continuous span value along the column direction. The row direction corresponds to the axial direction of the cable in the multi-scale morphology matrix, and the column direction corresponds to the circumferential direction. Overall extension direction characteristic value. The numerical value reflects the extent to which the defect arrangement extends in the axial direction relative to the circumferential direction.

[0055] Based on the overall extension direction characteristic value The preset angle range is used to determine the dominant axial or circumferential direction of cable surface defects. The preset angle range is divided as follows: when the overall extension direction characteristic value... Greater than At that time, that is The overall extension direction of the cable surface defect is determined to be dominated by axial extension, indicating that the span of the defect along the axial direction is significantly greater than that along the circumferential direction. When the overall extension direction characteristic value... Less than At that time, that is The overall extension direction of the cable surface defect is determined to be predominantly circumferential, indicating that the span of the defect along the circumferential direction is significantly greater than that along the axial direction. When the overall extension direction characteristic value... exist arrive In between, that is The overall extension direction of the cable surface defects was determined to be a mixed extension without a clear dominant direction.

[0056] Count the total number of non-zero elements in a multi-scale morphological matrix. The total number is denoted as . The total number of non-zero elements. Divide by the continuous span value in the row direction Continuous span value in column direction The product of these two values ​​yields the defect filling density value, which is denoted as [missing value]. , Defect fill density value This represents the proportion of defect-related pixels within the rectangular area covered by the non-zero element region.

[0057] Based on defect fill density value The density range is determined by the density of defects on the cable surface. The preset density range is divided into three levels: when the defect filling density value... Greater than or equal to At that time, that is The density level of surface defects on the cable is determined to be high density; when the defect filling density value Greater than or equal to and less than At that time, that is The density level of surface defects on the cable was determined to be medium; when the defect filling density value Less than At that time, that is The density level of surface defects on the cable is determined to be low. The preset density range is based on the degree of spatial concentration of defects and its impact on cable performance. A high density level indicates a high degree of defect density and a significant impact on the integrity of the cable surface; a low density level indicates a sparse distribution of defects and a relatively small impact.

[0058] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for detecting surface defects in cables based on multi-scale feature fusion, characterized in that, include: The original reflection image sequence of the cable surface under multiple preset illumination angles is obtained, and non-uniform illumination correction based on the axial curvature distribution of the cable is performed on each original reflection image to obtain the corrected reflection image sequence. Extract the grayscale undulation contour along the cable axis in each corrected reflection image, and determine the local texture roughness component at each scanning position based on the sign change frequency of the grayscale difference between adjacent pixels. Specifically, this includes: for any corrected reflection image, taking the cable axis as a reference, extracting the grayscale value of each row of pixels along the axis direction to obtain the original grayscale sequence of the pixels in that row, and performing local mean detrending processing on the original grayscale sequence to obtain the grayscale undulation contour sequence corresponding to the pixels in that row; starting from the second element of the grayscale undulation contour sequence, calculating the grayscale difference between the current element and the previous element in turn, recording the positive and negative signs of each grayscale difference, counting the number of alternating positive and negative signs within a unit length, and using this number as the local texture roughness component of the pixels in that row at that scanning position; traversing all rows of pixels along the cable axis to obtain the local texture roughness components at all scanning positions under the corrected reflection image, thus constructing a single image roughness distribution map. Based on the degree of dispersion of the local texture roughness components at the same scanning position under all preset lighting angles, suspected defect feature points are screened out; For each suspected defect feature point, the three-dimensional orientation angle of the surface micro-region corresponding to the suspected defect feature point is calculated by using its pixel coordinate offset in different corrected reflection images. Based on the three-dimensional orientation angle of the surface micro-area of ​​each suspected defect feature point, a standard reflection distortion template under the corresponding orientation angle in the preset defect reflection model library is matched, and the successfully matched suspected defect feature points are marked as located defect points. Based on the set of two-dimensional coordinates of the located defect points in the corrected reflection image sequence, a multi-scale morphological matrix reflecting the spatial arrangement of defects on the cable surface is constructed. Based on the continuous span values ​​of the non-zero element regions in the multi-scale morphology matrix along the row and column directions, the overall extension direction and cluster density level of cable surface defects are determined. Specifically, this includes: traversing all non-zero elements in the multi-scale morphology matrix, recording the minimum and maximum row numbers of the non-zero elements along the row direction, and adding one to the difference between the maximum and minimum row numbers as the continuous span value along the row direction; recording the minimum and maximum column numbers of the non-zero elements along the column direction, and adding one to the difference between the maximum and minimum column numbers as the continuous span value along the column direction. The ratio of the continuous span value in the row direction to the continuous span value in the column direction is used as the overall extension direction characteristic value of the cable surface defect. Based on the preset angle range into which the overall extension direction characteristic value falls, the dominant extension direction of the cable surface defect along the axial or circumferential direction is determined. The total number of non-zero elements in the multi-scale morphology matrix is ​​counted, and the total number is divided by the product of the continuous span value in the row direction and the continuous span value in the column direction to obtain the defect filling density value. Based on the preset density range into which the defect filling density value falls, the aggregation density level of the cable surface defect is determined.

2. The cable surface defect detection method based on multi-scale feature fusion according to claim 1, characterized in that, The process of acquiring a sequence of original reflection images of the cable surface under multiple preset illumination angles, and performing non-uniform illumination correction based on the cable axial curvature distribution on each original reflection image to obtain a corrected reflection image sequence, specifically includes: Multiple preset lighting angles are evenly distributed within a range of 30 to 150 degrees according to the angle between the angle and the plane perpendicular to the cable axis. One original reflection image is acquired under each preset lighting angle, and the images are arranged in ascending order of angle to form a sequence of original reflection images. For any original reflection image in the original reflection image sequence, extract the horizontal grayscale profile pixel by pixel along the cable axis in the image, calculate the attenuation rate of grayscale values ​​from the center to both sides in the horizontal grayscale profile, and obtain the light attenuation coefficient sequence at each position along the cable axis. According to the light attenuation coefficient sequence, the lateral grayscale profile at the corresponding position in the original reflection image is reversed and compensated to make the cable surface present a uniform reflection effect in the image, thereby generating a corrected reflection image. All corrected reflection images are arranged in the original sequence order to form a corrected reflection image sequence.

3. The cable surface defect detection method based on multi-scale feature fusion according to claim 2, characterized in that, The step of filtering out suspected defect feature points based on the dispersion of the local texture roughness components at the same scanning position under all preset illumination angles specifically includes: At any given scanning position, all corrected reflection images are collected to identify the local texture roughness components corresponding to that scanning position, forming a roughness sample set at that scanning position. Calculate the range of all roughness components in the roughness sample set, and divide the range by the absolute value of the median of the roughness components in the set to obtain the discrete response value at the scanning position. Scanning locations with discrete response values ​​greater than a preset discrete threshold are identified as roughness anomaly locations, and the corresponding pixels of these roughness anomaly locations in all corrected reflection images are marked as suspected defect feature points.

4. The cable surface defect detection method based on multi-scale feature fusion according to claim 3, characterized in that, For each suspected defect feature point, the three-dimensional orientation angle of the surface micro-region corresponding to the suspected defect feature point is calculated using its pixel coordinate offset in different corrected reflection images. This specifically includes: Select the two corrected reflection images with the largest difference in illumination angle from the corrected reflection image sequence as a reference image pair, record the first pixel coordinates and second pixel coordinates of any suspected defect feature point in the two reference images respectively, and calculate the pixel displacement vector between the first pixel coordinates and the second pixel coordinates. Based on the components of the pixel displacement vector in the horizontal and vertical directions of the image, combined with the preset illumination angle difference between the two reference images and the geometric projection relationship of the cable surface, the pitch angle and azimuth angle of the normal vector of the surface micro-region where the suspected defect feature point is located are calculated in three-dimensional space. The pitch angle and azimuth angle are used together as the three-dimensional orientation angle of the surface micro-region of the suspected defect feature point.

5. The cable surface defect detection method based on multi-scale feature fusion according to claim 4, characterized in that, The step of matching the standard reflection distortion template at the corresponding orientation angle in the preset defect reflection model library with the three-dimensional orientation angle of the surface micro-area of ​​each suspected defect feature point, and marking the successfully matched suspected defect feature points as located defect points, specifically includes: In the preset defect reflection model library, the standard reflection distortion template is divided into multiple template subsets according to the pitch angle interval and azimuth angle interval of the three-dimensional orientation angle of the surface micro-area. Each template subset corresponds to a combination of a pitch angle interval and an azimuth angle interval. For any suspected defect feature point, locate the corresponding template subset based on the pitch and azimuth angles of the three-dimensional orientation angle of its surface micro-area, and calculate the similarity between the actual gray-scale undulation contour of the suspected defect feature point and the contour of each standard reflection distortion template in the template subset. The defect category corresponding to the standard reflection distortion template with the highest contour similarity is selected as the discrimination category of the suspected defect feature point. When the contour similarity is higher than the preset matching threshold, the suspected defect feature point is marked as a located defect point; otherwise, the suspected defect feature point is included in the noise point set.

6. The cable surface defect detection method based on multi-scale feature fusion according to claim 5, characterized in that, The construction of a multi-scale morphological matrix reflecting the spatial arrangement of defects on the cable surface, based on the set of two-dimensional coordinates of the located defect points in the corrected reflection image sequence, specifically includes: All located defect points are mapped to the same spatial reference grid in any corrected reflection image. The number of rows of the spatial reference grid is equal to the number of pixels in the height direction of the corrected reflection image, and the number of columns is equal to the number of pixels in the width direction of the corrected reflection image. In the spatial reference grid, a first eigenvalue is assigned to each grid cell containing a located defect point, and a second eigenvalue is assigned to grid cells not marked as located defect points, thus obtaining a reference shape matrix; The morphological dilation operation with different window sizes is performed sequentially on the reference morphological matrix. The matrix obtained after each dilation operation is differiated from the matrix before dilation to obtain the defect boundary increment distribution at each scale. The defect boundary increment distribution at all scales is superimposed on the reference morphological matrix to form the multi-scale morphological matrix.

7. The cable surface defect detection method based on multi-scale feature fusion according to claim 6, characterized in that, The contour similarity is the normalized cross-correlation value between the actual gray-scale undulating contour and the standard reflection distortion template.

8. The cable surface defect detection method based on multi-scale feature fusion according to claim 7, characterized in that, The preset angle range includes: when the overall extension direction characteristic value is greater than 2, it is determined that the axial extension is dominant; when the overall extension direction characteristic value is less than 0.5, it is determined that the circumferential extension is dominant.

Citation Information

Patent Citations

  • Intelligent detection system and method for surface defects of industrial parts

    CN122089652A

  • Method and system for intelligently monitoring surface defects of aluminized zinc plate based on machine vision

    CN122243969A