A torus defect visual inspection method and system for drawing steel wire

CN122962005APending Publication Date: 2026-10-23HANGZHOU RUIHUA MOULD SPRING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611454074.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0007]针对覆盖天然非均匀磷化及润滑膜层的高曲率细钢丝在牵引中自发捻转、导致缺陷与背景同源且背景时空非平稳、难以实现360°全周向在线可靠检测的技术问题,本发明提供一种用于拉拔钢丝的环面缺陷视觉检测方法及系统

Benefits of technology

[0023]通过上述方案,本发明将高曲率固有的镜面高光带由被动干扰转化为主动利用的物理相位基准,把捻转抖动造成的时空非平稳漂移解算并补偿为统一坐标场;在与位置绑定的正常膜层统计基准上以残差方式辨识缺陷,从而在缺陷与背景同源的条件下保持可分性;通过双分支网络与专门判别将磷化层脱落作为独立缺陷类别并与正常膜厚波动区分;再以多视多帧时空一致性确证抑制高光与捻转引入的虚警。四者协同,解决了直径0.3~14mm、高线速、覆盖天然非均匀磷化及润滑膜层且在牵引中自发捻转的拉拔钢丝表面缺陷难以实现360°全周向在线可靠检测的技术问题,将时空非平稳且与缺陷同源的复杂背景转化为可比对的稳定坐标场,显著降低漏检率与虚警率,并借助编码器定位与收线反馈实现缺陷段的在线追溯与处置,提升拉拔钢丝的表面质量一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122962005A_ABST
    Figure CN122962005A_ABST
Patent Text Reader

Abstract

The application discloses a kind of annular surface defect visual inspection method and system for drawing steel wire, annular surface local image covering 360 ° surface of steel wire is synchronously collected by multiple groups of line scanning camera line arrangement, and mapping relationship of pixel column coordinates is calibrated to circumferential angle;The circumferential angle corresponding to the center line of mirror high light band is extracted as a reference phase to solve the twist angle of steel wire;With twist angle as reference, each image is converted to uniform annular surface development coordinate system to obtain annular surface development image by registration and fusion;With circumferential angle partition and axial sliding window as condition, normal film layer local texture statistical reference is maintained online, residual feature map is obtained by comparing local features, and the position and category of steel wire surface defect are identified accordingly.The scheme calculates twist drift as alignable phase, identifies defects in residual manner on the normal film layer reference bound with position, realizes 360 ° online reliable detection of steel wire.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision inspection technology, specifically to a visual inspection method and system for toroidal defects in steel wire drawing. Background Technology

[0002] Drawing steel wire is a cylindrical fine wire produced by cold drawing wire rod through multiple dies to reduce its diameter. The diameter typically ranges from 0.3 mm to 14 mm, and the wire exit speed is high. To reduce friction between the wire and the drawing die during cold drawing and to prevent seizing and wire breakage, a phosphate layer is generally deposited on the surface of the wire rod before drawing, and it is then impregnated with a soap-based lubricant. Therefore, the surface of the steel wire entering the inspection station is not a smooth metallic mirror, but rather covered with a naturally granular, rough, and unevenly colored phosphate and lubricating film. Furthermore, the thickness and density of this film naturally fluctuate along the wire length. Defects to be detected in drawn steel wire include scratches, cracks, and phosphate layer peeling itself—that is, localized peeling, exposed areas, and uneven coverage. Consequently, the inspected target and the inspected background are highly homogeneous and intertwined in terms of local grayscale and texture. Meanwhile, the steel wire is a cylinder with an extremely small diameter and extremely high curvature. When multiple cameras arranged in a ring shape image it 360 degrees around the circumference, the high-curvature metal surface will form a bright specular highlight band on one side of the wire's central axis, which will rapidly decay into dark areas towards the edges on both sides. Under high-speed pulling and winding, the steel wire will also undergo random twisting and lateral shaking around its own axis. This causes the highlight band and the correspondence between which camera captures each segment of the circumferential surface, to constantly drift between frames. The background presented to the detection algorithm by the steel wire ring surface is non-stationary in both space and time.

[0003] Visual inspection solutions for products such as strip steel, plates, and cable sheaths are generally based on the premise that the product surface is quasi-uniform and quasi-stable. Defects are treated as obvious anomalies superimposed on a stable background and detected as outliers. However, when the normal surface of the inspected object is a functional film layer that closely resembles a defect in appearance, and film peeling is also one of the defects that must be detected, the target and the background become entangled in terms of physical causes. This detection paradigm, which is based on the core assumption of outliers, struggles to distinguish between the normal fluctuations of the phosphating film layer and real defects, easily leading to normal film layers being misjudged as defects or real defects being submerged in texture fluctuations.

[0004] While publicly available 360-degree line scan visual inspection schemes for steel wires or cables have proposed a collection architecture that uses multiple line scan cameras arranged in a ring, synchronously triggered by encoder signals, and combined to cover the 360-degree circumferential surface, and have recognized the difficulties in wire imaging such as bright centers and dark sides, and uneven illumination caused by oxide scale, the core methodology of such schemes still treats defects as outliers on a homogeneous background. They do not utilize the inherent specular highlight bands in the imaging process as a solvable physical quantity, nor do they calculate and compensate for the circumferential correspondence drift caused by the spontaneous twisting of the steel wire during high-speed drawing. Under the condition of continuous twisting of the steel wire, the same physical surface position is constantly misaligned between different frames and different cameras, making the existing background assumptions untenable. Current detection schemes for steel wire rope surface defects have attempted to construct dynamic grayscale background sample sets by utilizing temporal grayscale similarity and spatial neighborhood information at the same location. However, such schemes are geared towards twisted textures formed by the regular twisting of multiple steel wires. Their background modeling is based on the statistical accumulation of grayscale samples and does not involve the phase calculation of specular highlights on the surface of high-curvature single filaments. Nor has a unified compensation coordinate system been established for the spiral drift caused by twisting and shaking. It is difficult to transplant this to the scenario where the background and defects originate from the same source, such as the high-curvature filament annular surface covered by a phosphate film.

[0005] In the field of high-reflectivity surface measurement, existing research has proposed phase measurement, phase unwrapping, and high-gloss removal methods based on deep learning for specularly highly reflective surfaces. However, these techniques treat specular highlights as interfering components that hinder surface morphology recovery and attempt to eliminate or avoid them, rather than utilizing them as phase references with precise physical meaning. Consequently, they cannot provide a sustainable attitude reference for the filament during high-speed twisting, and therefore cannot be used to calculate and compensate for the real-time twist angle of the wire. On the other hand, existing normal reference or background residual defect detection schemes use normal samples as references and suppress background textures through residual or prototype comparison. However, the established normal references are usually global or image-level unified benchmarks, which are not bound to the physical coordinates such as the absolute circumferential angle and axial position of the inspected surface. For phosphating textures that are non-stationary overall but approximately stationary in the local circumferential and axial neighborhoods, the global unified benchmark cannot accurately characterize the normal fluctuation range of its positional changes, which can easily lead to misjudgment. Furthermore, publicly available inspection schemes for the unfolding and splicing of cylindrical surfaces such as pipes and cables primarily target large-diameter, smooth, and uniform plastic or coated surfaces. These schemes assume that the inspected background remains stable after unfolding, failing to consider the inter-frame spiral drift caused by the spontaneous twisting of the filaments during traction, or the identification challenges of physical origins between the target and background, such as film peeling. The aforementioned existing technologies also generally lack a dedicated discrimination mechanism to distinguish between the specific defect category of phosphating layer peeling and normal film thickness fluctuations. Since the coverage thickness of the phosphating and lubricating film itself exhibits normal fluctuations along the filament length, judging solely based on absolute deviations in local reflectivity or grayscale can easily misreport normal film thickness changes as peeling defects, or lead to missed detections of actual peeling due to relaxed thresholds to reduce false alarms.

[0006] This problem specifically arises in the online inspection of fine steel wires covered with a phosphated carrier layer, rather than in the inspection of conventional flat strips or smooth cables. Its uniqueness lies in the superposition of three factors: the normal surface being inspected is itself a functional film layer that visually resembles a defect, and film peeling is also one of the defects that must be detected, making the target and background physically intertwined; the inspected object has a small diameter and high curvature, resulting in a narrow, sharp band of clear imaging with abrupt edge attenuation, creating unavoidable specular highlights and dark areas; the steel wire spontaneously twists under pulling traction, causing the same physical surface position to spirally drift between different cameras and at different times. These three factors combined in the fine steel wire pulling scenario mean that defects may be obscured by bright highlights, misinterpreted as texture fluctuations and missed, or conversely, normal textures may be misjudged as defects. Existing surface inspection solutions, background modeling solutions, and high-reflectivity measurement solutions have not provided a usable solution to this combined problem. Therefore, how to achieve reliable, real-time, online defect identification on the surface of a high-curvature filament covered with a natural non-uniform phosphating and lubricating film has become a technical problem that needs to be solved in this field. Summary of the Invention

[0007] To address the technical problem of high-curvature thin steel wires covered with naturally non-uniform phosphate and lubricating films spontaneously twisting during traction, resulting in defects originating from the background and a spatiotemporally non-stationary background, making reliable 360° circumferential online detection difficult, this invention provides a visual inspection method and system for toroidal defects in drawn steel wires. The core concept of this invention is to depart from the existing paradigm of treating defects as outliers on a homogeneous and stable background. Instead, it uses the inherent specular highlight band of the high-curvature metal surface as a calculable physical phase reference. First, the spatiotemporal non-stationary drift caused by twisting and jitter is calculated into an alignable phase quantity. Then, defects are identified using a residual method on a normal film statistical reference bound to angular and axial positions. Spatiotemporal consistency is confirmed by the natural redundancy of multiple cameras and repeated observations of the same physical surface sheet across multiple frames, thereby achieving reliable identification under the conditions of defects originating from the background and a spatiotemporally non-stationary background.

[0008] In one aspect, the present invention provides a visual inspection method for toroidal defects in steel wire, comprising the following steps.

[0009] Step S1 involves arranging multiple sets of line scan cameras in a ring along the direction of the steel wire's movement. The encoder triggers synchronous exposure to acquire local images covering the 360° surface of the steel wire, and the mapping relationship between the pixel column coordinates of each camera and the circumferential angle of the steel wire is calibrated. Specifically, the ring-arranged multiple sets of line scan cameras collectively form a field of view covering the entire circumferential surface of the steel wire. Each camera is triggered by the steel wire's movement encoder signal for synchronous exposure, ensuring that each image at the same acquisition moment corresponds to the same axial position, thereby seamlessly acquiring the surface of the high-speed steel wire line row by row. The calibration establishes a one-to-one mapping between the pixel column coordinates on the imaging surface of each camera and the actual circumferential angle of the steel wire surface, providing a geometric basis for subsequently repositioning each local image to a unified toroidal coordinate system.

[0010] Step S2: For each local image of the toroidal surface, extract the peak brightness position of the specular highlight band along the scan line perpendicular to the wire axis to obtain the highlight band centerline. The circumferential angle corresponding to this centerline, uniquely determined by imaging geometry, is used as the reference phase. Combined with the mapping relationship, the twist angle of the wire around its own axis is calculated. Specifically, based on the natural law of specular reflection, on the surface of a high-curvature metal cylinder, the circumferential position where the surface normal points to the bisector of the angle between the camera and the illumination appears at its maximum brightness. Therefore, the peak brightness position extracted along each scan line perpendicular to the wire axis constitutes the highlight band centerline extending axially, and its corresponding circumferential angle is a physical reference position uniquely determined by imaging geometry. Further, by using this reference position as the reference phase and combining it with the mapping relationship, the actual circumferential phase shift of the wire around its own axis relative to the nominal attitude at the current frame and current axial section can be calculated, i.e., the twist angle. Preferably, the highlight phases extracted by multiple cameras are weighted, fused, and axially smoothed to suppress single-channel extraction noise, and the twist phase curves of adjacent frames are time-domain filtered to estimate the twist angular velocity and lateral jitter for prediction of subsequent inter-frame registration.

[0011] Step S3: Using the twist angle as the circumferential reference, the local images of each toroidal plane are converted to a unified toroidal unfolding coordinate system with absolute circumferential angle and absolute axial position as coordinate axes, and then registered and fused to obtain a toroidal unfolded image. Specifically, the pixel column coordinates are converted to absolute circumferential angle coordinates according to the calibration mapping relationship and the current twist phase, and the pixel row coordinates are converted to absolute axial position coordinates according to the encoder signal, thereby positioning each pixel according to the steel wire cylindrical surface into the unified toroidal unfolding coordinate system; the unfolded pixels in the overlapping field of view of adjacent cameras are registered and fused according to their absolute circumferential angles to obtain a complete toroidal unfolded image that eliminates twist drift. Thus, the images of the same physical surface position at different cameras and at different times are positioned to the same coordinates in the unfolding coordinate system, transforming the spatiotemporally non-stationary spiral drift background into a comparable stable coordinate field.

[0012] Step S4: In the unified toroidal unfolded coordinate system, using circumferential angle partitioning and axial sliding windows as conditions, a local texture statistical benchmark for the normal film layer is maintained online. The local features of the toroidal unfolded image are compared with the corresponding local texture statistical benchmark to obtain a residual feature map. Specifically, utilizing the property that although the normal phosphating texture is not stationary overall, its local statistical features are approximately stationary within a given circumferential angle and axial neighborhood, a local texture statistical benchmark for the normal film layer is maintained online using circumferential angle partitioning and axial sliding windows as conditions. The local features of the newly arrived unfolded image at the corresponding circumferential and axial positions are compared with the conditional benchmark at that position to obtain a residual feature map. This ensures that defect identification is based on the deviation from the normal film layer benchmark at that position, rather than absolute grayscale or global outliers. Therefore, even if the normal film layer and the defect are homologous in local features, their deviation direction and deviation scale relative to the conditional benchmark remain separable.

[0013] Step S5: Identify the location and type of surface defects on the steel wire based on the residual feature map. Specifically, using the residual feature map as the main criterion, locate surface anomalies in the unfolded coordinate system and classify them into defect categories such as scratches, cracks, and phosphate layer peeling. Output the absolute circumferential angle and absolute axial position of the defect and its category label, thereby completing the identification of surface defects on the entire circumferential surface of the steel wire.

[0014] In a further embodiment of the present invention, in step S1, the principal optical axes of each camera point to the nominal central axis of the steel wire and are uniformly offset in the circumferential direction, and the fields of view of adjacent cameras maintain a preset overlap angle; a coaxial halo illumination module is configured for the high curvature surface of the steel wire to make the incident illumination approximately axially symmetrical along the circumferential direction; the calibration also includes the azimuth angle of the optical center of each camera relative to the nominal central axis of the steel wire, the imaging magnification, and the circumferential field of view coverage. Specifically, the arrangement of the principal optical axes pointing to the central axis and being uniformly offset in the circumferential direction allows each camera to be responsible for a section of the circumferential arc surface, thus aligning them together for 360°, and the preset overlap angle ensures that there is redundant overlap between the arc surfaces of adjacent cameras for registration; the coaxial halo illumination makes the illumination approximately axially symmetrical along the circumferential direction, thereby constraining the shape of the specular highlight band and avoiding highlight band distortion caused by asymmetrical illumination; the azimuth angle, imaging magnification, and circumferential field of view coverage obtained from the calibration provide complete geometric parameters for the phase calculation in step S2 and the unfolding conversion in step S3.

[0015] In a further embodiment of the present invention, in step S2, the circumferential angles of the highlight bands extracted by multiple sets of line scan cameras arranged in a ring on the same axial section of the same steel wire cylindrical surface satisfy a fixed angle difference relationship determined by the calibration azimuth angle. The multiple highlight phases are combined into an overdetermined equation system. The residuals of this overdetermined equation system are used to calibrate the azimuth angle drift of each camera online, eliminate false highlight phases contaminated by defects or local reflections, and output the confidence level of the twist angle. Specifically, since the azimuth angle of each camera is known during calibration, the true circumferential angles corresponding to the highlight bands observed by each camera on the same axial section should maintain a fixed difference. Therefore, combining the multiple highlight phases immediately constitutes an overdetermined equation system with more equations than unknowns. Furthermore, an abnormal increase in the residuals of this overdetermined equation system indicates that the azimuth angle of a certain camera has drifted or that a certain highlight phase has been distorted by defects or local reflections. Based on this, the azimuth angle is calibrated online, false highlight phases are eliminated, and the confidence level of the twist angle is derived from the overall residuals for subsequent weighted use.

[0016] In a further embodiment of the present invention, after step S3, the method further includes: establishing a brightness attenuation response model based on the phase of the center line of the highlight band and the angular distance of each pixel's circumferential angle relative to the center of the highlight band in the toroidal unfolded image; performing gain compensation pixel-by-pixel on the toroidal unfolded image using this brightness attenuation response model; and adaptively updating the parameters of the brightness attenuation response model by fitting it online with defect-free samples. Specifically, the brightness attenuation response model describes the law of brightness attenuation with the angular distance of the pixel's circumferential angle relative to the center of the highlight band, reflecting the natural characteristic that the specular reflection component of a high-curvature metal surface attenuates sharply as the observation angle deviates from the specular direction and transitions to a weak diffuse reflection signal towards the edge; by performing gain compensation pixel-by-pixel on the unfolded image using this model, the dynamic range difference between the overexposed area of ​​the highlight band and the dark area of ​​the edge can be compressed, so that the imaging brightness of the same physical surface tends to be consistent at different circumferential angles and in different frames without losing texture details. Preferably, the model parameters are fitted online with defect-free samples and adaptively updated with illumination drift and overall tonal changes of the film layer.

[0017] In a further embodiment of the present invention, in step S4, the local texture statistical benchmark includes local grayscale distribution features, multi-scale texture direction energy, and local reflectivity level. The local texture statistical benchmark is updated using a recursive method with a forgetting factor, and only areas determined to be normal participate in the update. Specifically, the local grayscale distribution features characterize the brightness and particle statistics of the film layer, the multi-scale texture direction energy characterizes the intensity of the phosphating texture at different scales and directions, and the local reflectivity level characterizes the density of the film layer coverage. The three together constitute a complete description of the appearance of a normal film layer. The recursive update with the forgetting factor allows the benchmark to slowly track the normal drift of the working conditions and the film layer, while only areas determined to be normal participate in the update to avoid contaminating the benchmark with defective areas and prevent the accumulation of missed detections.

[0018] In a further embodiment of the present invention, step S5 includes: stitching the toroidal unfolded image and the residual feature map together in the channel dimension and inputting them into a defect identification network. The defect identification network is configured with two parallel feature branches: a geometric discontinuity branch and a reflection and coverage anomaly branch. The geometric discontinuity branch extracts edge breaks and gradient abrupt changes extending along a certain direction to identify scratches and cracks. The reflection and coverage anomaly branch extracts sudden changes in local reflectivity and energy collapse in the texture direction to identify phosphating layer peeling. After the features of the two branches are fused, the location, contour segmentation mask and category of the defect are output, and the residual feature map is used as the dominant input channel of the defect identification network. Specifically, the geometric discontinuity branch targets scratches and cracks, which are primarily evidenced by geometric morphology; the reflection and coverage anomaly branch targets phosphating layer peeling, undercoat leakage, and uneven coverage defects, which are primarily evidenced by changes in reflection and coverage properties. The two branches are extracted in parallel and then fused to accommodate two types of defects with vastly different physical causes. Furthermore, using residual feature maps as the dominant input channel ensures that the network learns a deviation pattern relative to a position-conditional normal baseline, rather than the absolute appearance of the phosphating texture, thereby suppressing the misclassification of normal film layers as defects. Preferably, the network employs an anisotropic receptive field structure adapted to narrow annular bands and long axes to match the elongated geometric shape of the unfolded filament image.

[0019] In a further embodiment of the present invention, the candidate regions given by the reflection and coverage anomaly branches are judged based on their deviation from the local reflectivity level in the local texture statistical benchmark, the sharpness of the region boundary, and the degree of collapse of the texture direction energy within the region. When the reflectivity deviation exceeds the adaptive threshold, the boundary shows a sharp jump, and the texture direction energy collapses significantly, it is determined to be phosphating layer delamination and leakage; otherwise, it is determined to be normal film thickness fluctuation. The adaptive threshold is derived from the dispersion of the local texture statistical benchmark in step S4 and dynamically takes values ​​with the circumferential angle and axial position. Specifically, the essential difference between real delamination and leakage and normal film thickness fluctuation lies in the large jump in reflectivity, sharp boundary, and collapse of the original phosphating texture direction energy. Based on these three conditions, the normal spatial fluctuation of the functional film layer itself can be distinguished from real defects, avoiding misreporting normal fluctuations as defects. Furthermore, the adaptive threshold is derived from the dispersion of the local texture statistical benchmark at this position and dynamically takes values ​​with the circumferential and axial positions, so that the judgment threshold automatically adapts to the spatial fluctuation amplitude of the film layer itself.

[0020] A further aspect of the present invention includes: using the unified toroidal unfolded coordinate system, correlating and voting the judgment results of candidate defects pointing to the same absolute circumferential angle and absolute axial position in the overlapping fields of view of adjacent cameras and in multiple consecutive frames; confirming candidates that consistently and stably appear at the same physical coordinate in multiple views and multiple frames as real defects; and eliminating candidates that only appear in a single view or single frame and do not persist with the physical coordinate as reflection artifacts; during the correlating and voting, each observation is assigned a confidence weight related to its imaging angle distance from the center line of the highlight band. Specifically, the same physical surface patch will be repeatedly observed in multiple consecutive frames during the overlapping fields of view of adjacent cameras and the movement of the wire. By using the unified unfolded coordinate system, these judgment results pointing to the same absolute coordinate can be correlated and voted on; real defects are attached to the physical surface and will consistently and stably appear at the same coordinate in multiple views and multiple frames, while artifacts such as specular highlight flicker and instantaneous reflection do not persist with the physical coordinate, thereby effectively suppressing false alarms introduced by moving highlight bands and twisting jitter. Preferably, during voting, observations at good observation angles and with imaging angles close to the highlight band are given higher confidence weights, so that high-quality observations dominate the judgment.

[0021] A further embodiment of the present invention includes: combining the encoder signal to convert the axial position of the confirmed defect in the unified toroidal unfolding coordinate system into an absolute mileage on the wire length; recording the circumferential angle, category, size, and confidence level of the confirmed defect to form a defect traceability file; and feeding the detection results back to the take-up controller to perform inkjet marking, speed reduction, or triggering cut-off on wire segments containing phosphate layer peeling or cracks. Specifically, the encoder signal provides the precise displacement of the wire travel, thereby converting the axial position in the unfolding coordinate system into an absolute mileage on the wire length, so that each confirmed defect has a unique and traceable location on the entire roll of wire; the traceability file formed by recording the circumferential angle, category, size, and confidence level supports quality backtracking and process analysis, while feeding the results back to the take-up controller enables online inkjet marking, speed reduction, or cut-off of severely defective wire segments, thereby improving the surface quality consistency of the drawn wire in a closed loop.

[0022] In another aspect, the present invention provides a visual inspection system for toroidal defects in drawn steel wire, comprising: a toroidal acquisition unit, including multiple sets of line scanning cameras and a coaxial halo illumination module arranged in a ring along the running direction of the steel wire, forming an acquisition field of view covering a 360° surface of the steel wire, wherein the mapping relationship between the pixel column coordinates and the circumferential angle of the steel wire is pre-calibrated for each camera; a synchronous triggering unit, connected to the steel wire running encoder, for triggering each camera to synchronously expose and acquire local images of the toroidal surface; and a phase calculation module, for extracting the peak position of the specular highlight band brightness from each local image of the toroidal surface along the scanning line perpendicular to the axial direction of the steel wire to obtain the center line of the highlight band, and using the circumferential angle corresponding to the center line, which is uniquely determined by the imaging geometry, as a reference phase. The system calculates the twist angle of the steel wire around its own axis based on the mapping relationship; the twist compensation unfolding and splicing module is used to convert each toroidal local image to a unified toroidal unfolding coordinate system with absolute circumferential angle and absolute axial position as coordinate axes and register and fuse them to obtain a toroidal unfolded image; the background reference modeling module is used to maintain the local texture statistical reference of the normal film layer online in the unified toroidal unfolding coordinate system with circumferential angle partitioning and axial sliding window as conditions, and compares the local features of the toroidal unfolded image with the local texture statistical reference at the corresponding position to obtain a residual feature map; the defect identification module is used to identify the location and type of defects on the steel wire surface based on the residual feature map. Specifically, the toroidal acquisition unit and the synchronous triggering unit jointly complete the row-by-row synchronous acquisition of the 360° surface of the steel wire. The phase calculation module, twist compensation unfolding and splicing module, background reference modeling module and defect identification module correspond to steps S2 to S5 of the above method in sequence. The data processed by each module correspond to physical quantities and equipment status such as optical imaging, imaging geometric phase, surface reflectivity, texture statistics and defect categories of the steel wire surface. The whole system serves to solve the specific technical problem of online reliable identification of toroidal defects of drawn wire. The above system may further include corresponding modules for brightness normalization, special discrimination of phosphating layer peeling, multi-view multi-frame spatiotemporal consistency confirmation and axial positioning traceability feedback.

[0023] Through the above scheme, this invention transforms the inherent specular highlight band of high curvature from passive interference into an actively utilized physical phase reference, and calculates and compensates for the spatiotemporal non-stationary drift caused by twisting jitter into a unified coordinate field; it identifies defects using a residual method on a normal film layer statistical reference bound to position, thereby maintaining separability under the condition that defects and background originate from the same source; it distinguishes phosphate layer peeling as an independent defect category and normal film thickness fluctuations through a dual-branch network and specialized discrimination; and it suppresses false alarms introduced by highlights and twisting by confirming spatiotemporal consistency through multi-view and multi-frame. The four elements work together to solve the technical problem of making it difficult to achieve reliable 360° full-circumference online detection of surface defects of drawn steel wires with diameters of 0.3~14mm, high line speed, covered with natural non-uniform phosphate and lubricating film layers, and spontaneously twisting during traction. It transforms the complex background that is spatiotemporally non-stationary and originates from the same source as the defects into a comparable stable coordinate field, significantly reducing the missed detection rate and false alarm rate, and realizes online traceability and handling of defect segments with the help of encoder positioning and wire take-up feedback, thereby improving the surface quality consistency of the drawn steel wire. Attached Figure Description

[0024] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0025] Figure 1 This is an overall flowchart of the visual inspection method for toroidal defects in steel wire according to an embodiment of the present invention.

[0026] Figure 2 This is a schematic diagram of the structural arrangement of the toroidal acquisition unit according to an embodiment of the present invention.

[0027] Figure 3 This is a schematic diagram illustrating the principle of phase calculation and toroidal unfolding of the specular highlight band according to an embodiment of the present invention.

[0028] Figure 4 This is a structural block diagram of the dual-branch defect identification network according to an embodiment of the present invention.

[0029] Figure 5 This is a schematic diagram illustrating the mechanism by which spatiotemporal non-stationary spiral drift is transformed into a stable coordinate field according to an embodiment of the present invention.

[0030] Figure 6 This is a physical morphology diagram of a high-curvature toroidal imaging of a steel wire according to an embodiment of the present invention. It shows the reflection morphology of the phosphate and lubricating film layer on the surface of the steel wire, the specular highlight band and the dark area on the edge, as well as three types of inspected targets: scratches, cracks, and phosphate layer peeling.

[0031] Figure 7 This is a bar chart comparing the detection rates of three types of defects—scratches, cracks, and phosphate layer peeling—in this invention with conventional methods.

[0032] Figure 8This is a composite biaxial graph showing how the combined false alarm rate and detection rate change with the removal of key steps in the ablation experiment of this invention. Detailed Implementation

[0033] To make the objectives and technical solutions of this invention clearer, the embodiments of this invention will be further described in detail below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of this invention and should not be construed as limiting the scope of protection of this invention.

[0034] Example 1

[0035] This embodiment provides a visual inspection method for toroidal defects in drawn steel wire, applicable to drawn steel wires with diameters of 0.3~14mm, lead-out speeds of 3~30m / s, surfaces covered with a natural non-uniform phosphate and soap-based lubricating film, and spontaneously twisting during traction. For example... Figure 1 As shown, this method starts from the detection station downstream of the wire exit station and proceeds through nine steps: multi-channel synchronous acquisition and geometric calibration of local toroidal images, extraction of specular highlight bands and twist phase calculation, toroidal unfolding and stitching with twist compensation, physically guided brightness normalization, online modeling of normal film background benchmarks with positional conditions, detection and classification by a dual-branch defect identification network, specialized discrimination of phosphating layer peeling, multi-view, multi-frame spatiotemporal consistency verification, and axial positioning tracing and take-up feedback. Finally, it outputs a defect tracing file calibrated with the absolute mileage of the wire length and drives the take-up controller to perform processing. The implementation of this embodiment is described in detail below.

[0036] Step 1: Multi-channel synchronous acquisition and geometric calibration of local images of the toroidal surface. For example... Figure 2 As shown, multiple sets of line scan cameras are arranged in a ring along the direction of the steel wire at the inspection station. In this embodiment, six sets of line scan cameras are preferably arranged. The main optical axis of each camera points to the nominal central axis of the steel wire and is evenly offset by about 60 degrees in the circumferential direction. Each set of cameras is responsible for a circumferential arc surface of about 70 degrees. The fields of view of adjacent cameras maintain a preset overlap angle of about 10 degrees in the circumferential direction. The six sets of arc surfaces are pieced together and redundantly cover the entire 360-degree circumferential surface of the steel wire. Each line scan camera uses a high line frequency single-line or multi-line sensor. The line frequency is determined according to the output line speed and the required axial resolution, with a typical value of 40~120kHz, to ensure that the sampling density of the steel wire along the axial direction is not less than several lines per millimeter.

[0037] To address the characteristics of strong specular reflection and a large dynamic range of the high-curvature surface of the filament, a coaxial ring illumination module is configured for each camera. A ring of uniformly distributed high-brightness light sources is coaxially positioned with the camera's principal optical axis, ensuring that the incident illumination is approximately axially symmetrical along the circumference of the wire. Specifically, the coaxial ring illumination ensures that each camera obtains a stable highlight band formed by specular reflection in its observation direction, without distortion or stretching of the highlight band's position due to asymmetry in illumination. This provides a regular and well-defined physical characteristic for phase extraction in step two. Preferably, the brightness and exposure time of the ring illumination are automatically adjusted based on feedback from the histogram of the defect-free calibration wire segment, ensuring that the highlight band peak falls within the upper part of the sensor's dynamic range without saturation overflow, thus balancing the distinguishability of the highlight area and the edge dark area.

[0038] The line exposures of each camera are not free-flowing, but rather triggered by encoder signals installed along the steel wire's running path for synchronized line exposure. Specifically, each time the encoder outputs a preset displacement pulse, it triggers all six cameras to simultaneously acquire one line, ensuring that each image at the same acquisition moment strictly corresponds to the same axial position on the steel wire. This allows for seamless, line-by-line acquisition of the surface of the high-speed steel wire, avoiding axial misalignment caused by independent timing of each camera. Consequently, the six toroidal local images are naturally aligned axially, laying the foundation for subsequent multi-phase image assembly and unfolding stitching on the same axial cross-section.

[0039] Before formal testing, each camera undergoes geometric calibration. Specifically, a standard cylindrical calibration piece with known circumferential angle reference lines engraved on its outer surface is placed at the testing station. Reference marks are arranged on the calibration piece at known angular intervals. Data is collected and calculated one by one to obtain the azimuth angle of each camera's optical center relative to the nominal central axis of the steel wire, the imaging magnification of each camera, and the circumferential field of view coverage of each camera. Then, a one-to-one mapping relationship between the pixel column coordinates on the imaging surface of each camera and the actual circumferential angle on the steel wire surface is fitted. This mapping relationship is generally a nonlinear function considering cylindrical perspective and lens distortion, and can be stored in the form of a lookup table or polynomial coefficients. The azimuth angle, magnification, and circumferential field of view coverage obtained from the calibration provide complete geometric parameters for the phase calculation in step two and the expansion conversion in step three.

[0040] Step two: Extraction of the specular highlight band and twist phase calculation. For example... Figure 6As shown, under coaxial ring illumination, the circumferential surface of the steel wire facing the camera forms a highly luminous specular highlight band extending axially due to specular reflection. This band rapidly diminishes into dark areas along the normal direction of the high-curvature surface towards the edges. Detected targets such as scratches, cracks, and phosphate layer peeling appear on this ring surface in their respective physical forms. For each acquired local image of the ring surface, along each scan line perpendicular to the steel wire axis, the brightness peak position of the specular highlight band is extracted from the brightness distribution of that line. Specifically, the scan line is first denoised and smoothed, and then the pixel column containing the highest brightness is located with sub-pixel precision. In this embodiment, parabolic fitting or the centroid method is preferably used to determine the sub-pixel peak position by the grayscale of the highlight peak's neighborhood. Connecting the peak positions of each scan line axially yields the trajectory of the highlight band's center line along the axial direction. To suppress false peaks caused by local reflections or defects, peak shape constraints are added to each row of peaks, requiring that their peak width, peak height, and symmetry fall within the allowable range obtained from the statistics of defect-free samples. Those that do not meet the requirements are marked as suspicious and are completed by interpolation from adjacent rows.

[0041] Based on the natural laws of specular reflection, on the surface of a high-curvature metal cylinder, the circumferential position where the surface normal points to the bisector of the angle between the camera and the illumination appears extremely bright. Therefore, the circumferential angle corresponding to the center line of the highlight band is a physical reference position uniquely determined by imaging geometry, which does not change with the appearance of the film or the distribution of defects. Using this reference position as the reference phase, and combining it with the mapping relationship from the pixel column coordinates to the circumferential angle obtained in step one, the actual circumferential phase shift of the wire around its own axis relative to the nominal attitude at the current frame and the current axial section can be calculated, i.e., the twist angle. Since this phase originates from imaging geometry rather than surface texture, the calculation of the twist angle remains robust even if the wire surface is covered with a non-uniform phosphate film.

[0042] Furthermore, such as Figure 2 As shown, the circumferential angles of the highlight bands extracted by the six sets of cameras arranged in a ring on the same axial section of the same steel wire cylindrical surface satisfy a fixed angular difference relationship determined by the calibrated azimuth angle. Based on this, the six highlight phases on the same axial section are combined into an overdetermined system of equations with more equations than unknowns. The twist angle of the current section is solved using the least squares method. The residuals of this overdetermined system of equations are used to calibrate the azimuth drift of each camera online and eliminate false highlight phases distorted by defects or local reflection contamination. Specifically, when a certain phase deviates from the predetermined angular difference relative to the others by more than a threshold, the highlight phase is determined to be contaminated and removed from the system of equations. Only the reliable path is used in the solution. Simultaneously, the confidence level of the twist angle of the current section is derived from the overall level of the residuals of the overdetermined system of equations, which is used for the weighted fusion in step three and the weighted voting in step eight.

[0043] Preferably, the highlight phases extracted from multiple cameras are weighted, fused, and smoothed along the axial direction. The weights are taken from the peak confidence of each path, thereby suppressing single-path extraction noise and obtaining a continuous twist phase curve along the axial direction. Further, the twist phase curves of adjacent frames are subjected to time-domain filtering. In this embodiment, Kalman filtering is preferably used, with twist angle, twist angular velocity, and lateral jitter as state variables to estimate the twist angular velocity and lateral jitter of the wire, and to predict the twist phase of the next frame. This predicted value is used as the initial value for inter-frame registration in step three, shortening the registration search range and improving real-time performance. It is also used to temporarily continue the predicted phase when the highlight band in individual frames is obscured by a large area of ​​defects.

[0044] Step 3: Torn surface unfolding and stitching with twist compensation. Using the twist phase calculated in Step 2 as the circumferential reference, the toroidal local images from each camera are unfolded as a curved surface on a steel wire cylinder. For example... Figure 3 As shown, for each pixel, its column coordinates are converted into circumferential angles in the camera coordinate system according to the calibration mapping relationship, and then the twist phase of the current axial section is superimposed to obtain the absolute circumferential angle coordinates of the pixel with the physical surface of the steel wire as a reference; at the same time, its row coordinates are converted into absolute axial position coordinates according to the encoder's accumulated pulses. In this way, each pixel is placed into a unified toroidal unfolded coordinate system with absolute circumferential angle and absolute axial position as coordinate axes, forming an unfolded image with the horizontal axis being the absolute circumferential angle from 0 to 360 degrees and the vertical axis being the absolute mileage of the steel wire length.

[0045] For the unfolded pixels within the overlapping angular region of adjacent cameras, registration and fusion stitching are performed based on their absolute circumferential angles. Specifically, within an overlap angle of approximately 10 degrees, both adjacent cameras image the same physical circumferential position. First, they are aligned by their absolute circumferential angles. Then, fusion weights are assigned based on the distance of each pixel's imaging angular distance from the highlight band. Pixels with closer imaging angular distances and higher signal-to-noise ratios after brightness normalization receive greater weights. Weighted averaging is used to eliminate stitching seams and suppress single-path noise. This results in a complete toroidal unfolded image that eliminates twist drift, allowing images of the same physical surface position from different cameras at different times to be repositioned to the same coordinate in the unfolded coordinate system. This transforms the originally spatiotemporally non-stationary spiral drift background into a comparable stable coordinate field, creating a prerequisite for subsequent position-conditional benchmark modeling.

[0046] Step four, physically guided brightness normalization. Based on the highlight band center phase determined in step two, the brightness of the toroidal unfolded image is normalized according to the angular distance of each pixel's circumferential angle relative to the highlight band center. Specifically, a response model describing the brightness decay with this angular distance is established. In this embodiment, a model of the form I(Δθ)=a·exp(-b·Δθ^2)+c is preferably adopted, where Δθ is the angular distance of the pixel's absolute circumferential angle relative to the highlight band center, a represents the peak intensity of specular reflection, b represents the sharpness of specular reflection decay as the observation angle deviates, and c represents the intensity of diffuse reflection substrate transitioning towards the edge. Each term has a clear optical meaning. This model reflects the natural law that the specular reflection component of a high-curvature metal surface decays sharply as the observation angle deviates from the specular direction and transitions to a weak diffuse reflection signal towards the edge.

[0047] The response model performs gain compensation pixel-by-pixel on the unfolded image. Specifically, it normalizes the measured brightness using the model-predicted brightness baseline at each pixel as the denominator, compressing the dynamic range difference between overexposed highlight areas and dark edge areas. This ensures that the imaging brightness of the same physical surface is consistent across different circumferential angles and frames without loss of texture detail. Preferably, the parameters a, b, and c of the response model are fitted online using defect-free samples and slowly and adaptively updated using recursive least squares with a forgetting factor to adapt to illumination drift and overall tonal changes in the film. Only pixels deemed normal in subsequent steps are used for fitting, avoiding distortion of the brightness baseline due to defective areas. After normalization, the brightness distribution in the normal film area of ​​the unfolded image tends to be stable, while brightness anomalies in defective areas are highlighted within a uniform dynamic range.

[0048] Step 5: Online modeling of the normal film background benchmark with positional conditions. This embodiment utilizes the property that although the normal phosphating texture is not stationary overall, its local statistical characteristics are approximately stationary within a given circumferential angle and axial neighborhood. In the unfolded coordinate system, the local texture statistical benchmark of the normal film is maintained online using circumferential angle partitions and axial sliding windows as conditions. Specifically, the 0-360 degree circumferential direction is divided into several circumferential partitions at fixed angular intervals. In this embodiment, it is preferred that each partition is 6 degrees, for a total of 60 partitions. Sliding windows with lengths of tens to hundreds of millimeters are set along the axial direction. A set of statistical benchmarks is maintained for each conditional unit formed by the circumferential partition and the axial sliding window.

[0049] The local texture statistical benchmark includes three descriptive quantities: local gray-level distribution features, multi-scale texture direction energy, and local reflectivity level. Specifically, the local gray-level distribution features characterize the brightness and grain statistics of the film layer using the mean, variance, and higher-order moments of the pixel gray levels within the conditional unit; the multi-scale texture direction energy characterizes the intensity of the phosphating texture at different scales and directions using the energy of the directional filter bank responses at multiple scales and directions; and the local reflectivity level characterizes the density of the film layer coverage using the robust median of the normalized brightness. Together, these three constitute a complete description of the normal film layer appearance at this location. For newly arrived unfolded images, the local features at the corresponding circumferential and axial positions are compared with the conditional benchmark at that location. Standardized residuals are calculated pixel by pixel and collected into a residual feature map, so that defect identification is based on the deviation from the normal film layer benchmark at the location, rather than absolute gray levels or global outliers.

[0050] The statistical baseline is updated using a recursive method with a forgetting factor. Specifically, for each conditional unit, new observations are weighted and integrated into the existing baseline using a forgetting factor. The forgetting factor value is set so that the effective memory length of the baseline corresponds to several meters to tens of meters of filament, thus slowly tracking the normal drift of the operating conditions and the film layer without chasing instantaneous defects. Furthermore, only the regions determined as normal in steps six to eight participate in the update, while regions determined as candidate defects do not participate in the baseline update, avoiding contamination of the baseline by defect regions and preventing the accumulation of missed detections. Thus, even if the normal film layer and defects are highly homologous in local features, their deviation direction and deviation scale relative to the position-conditionalized baseline are still separable, and the deviation of the defect relative to the normal film layer at its location is effectively highlighted in the residual feature map.

[0051] Step Six: Detection and Classification of the Dual-Branch Defect Recognition Network. This step first describes how the trained network processes input and generates output during the detection phase, and then describes the training process of this network. During the detection phase, the unfolded image from Step Three, the normalized image from Step Four, and the residual feature map from Step Five are concatenated in the channel dimension into a multi-channel input tensor, which is then input into the trained lightweight object detection and segmentation network. For example... Figure 4 As shown, the network employs two parallel feature branches: the geometric discontinuity branch focuses on extracting structural features such as edge breaks and gradient abrupt changes extending along a certain direction, used to identify defects like scratches and cracks where geometric morphology is the primary evidence; the reflection and coverage anomaly branch focuses on extracting features such as sudden drops or increases in local reflectivity and energy collapse or disappearance along the texture direction, used to identify defects like phosphating layer peeling, undercoating defects, and uneven coverage where changes in reflection and coverage properties are the primary evidence. The features from the two branches are fused at multiple scales by a fusion module, and the detection head outputs the defect's location bounding box, contour segmentation mask, and category label.

[0052] Furthermore, the network uses residual feature maps as the dominant input channel, that is, assigning higher initial weights to the residual channels at the network front end or using them as attention guides, so that the criteria for network learning are the deviation patterns relative to the position-conditionalized normal baseline, rather than the absolute appearance of the phosphorylated texture, thereby suppressing the misclassification of normal film layers as defects. Preferably, the network adopts an anisotropic receptive field structure adapted to narrow annular bands and long axial direction, that is, using a larger span in the axial direction and a smaller span in the circumferential direction in the convolution kernel and downsampling stride, to match the slender geometry of the filament unfolded image, so that the receptive field extends fully along the filament axis without excessive pooling and loss of resolution in the narrow circumferential direction.

[0053] During the training phase, a training dataset was constructed from toroidal unfolded images accumulated on the production line, along with their corresponding normalized images and residual feature maps. The samples covered steel wires of different diameters, linear speeds, and phosphate coating conditions. Defect samples were segmented and categorized pixel-by-pixel by quality inspectors based on scratches, cracks, phosphate layer peeling, and normal film thickness fluctuations. Normal samples were included after being confirmed to be anomalies through benchmark comparison in step five. The dataset consisted of tens of thousands of image slices, divided into training, validation, and test sets at approximately a 7:2:1 ratio. Slices from the same roll of steel wire were not assigned across sets to avoid data leakage. Data preprocessing included randomly cropping fixed-length slices along the axial direction, performing cyclic translation along the circumference at absolute angles for enhancement, and applying moderate perturbations to brightness and contrast to simulate lighting drift. Sample imbalance between defect categories was mitigated through oversampling and online synthesis of rare defects.

[0054] Model training was performed on a graphics processing unit (GPU) within a deep learning framework. The loss function consisted of a weighted average of classification loss, bounding box regression loss, and segmentation masking loss. The classification loss employed a focusing loss to address the imbalance in defect categories and suppress the dominance of gradients by a large number of easily distinguishable normal samples. The segmentation masking loss used an intersection-over-union (IoU) loss to improve the boundary fit of masks for thin scratches and cracks. The optimizer employed an adaptive moment estimation optimizer with weight decay. The initial learning rate was set to 2.7 × 10⁻⁴, and a decay strategy of linear warm-up followed by cosine annealing was used. The warm-up period consisted of 3 epochs, with a weight decay coefficient of 4.5 × 10⁻². The batch size was set to 24, and the training epochs were set to 68 epochs with an early stopping mechanism. The training was terminated early when the validation set metric showed no improvement for 8 consecutive epochs to prevent overfitting. The evaluation metrics include the detection rate, false alarm rate, and segmentation crossover ratio for each defect category. The weighted sum of the missed detection rate and false alarm rate is used as the comprehensive criterion for model selection. On the test set, three configurations are compared: geometric discontinuity branch alone, reflection and coverage anomaly branch alone, and two-branch fusion. It is confirmed that two-branch fusion achieves lower missed detection and false alarm rates for both phosphating layer peeling and geometric defects.

[0055] Step 7: Specialized identification of phosphating layer detachment. For the candidate regions given in the reflection and coverage anomaly branch of Step 6, further distinguish between normal film thickness fluctuations and actual detachment defects. Specifically, a comprehensive judgment is made based on three factors: the deviation of the candidate region from the local reflectivity level in the local texture statistical benchmark, the sharpness of the candidate region boundary, and the degree of energy collapse in the texture direction within the candidate region. The essential difference between actual detachment defects and normal film thickness fluctuations lies in the significant jump in reflectivity, sharp boundaries, and energy collapse in the original phosphating texture direction. Therefore, when the reflectivity deviation exceeds the adaptive threshold, the boundary shows a sharp jump, and the energy in the original phosphating texture direction collapses significantly, it is determined to be a phosphating layer detachment defect; when the deviation falls within the normal fluctuation range and the boundary is gradual and the texture is continuous, it is determined to be a normal film thickness fluctuation and no defect is reported.

[0056] Specifically, the sharpness of the boundary is measured by the spatial gradient amplitude of the reflectance at the boundary of the candidate region, and the degree of energy collapse in the texture direction is measured by the decrease ratio of the multi-scale texture direction energy relative to the reference within the candidate region. The adaptive threshold is derived from the discreteness of the position conditional reference in step five, that is, using a preset multiple of the standard deviation of the reference reflectance at the circumferential and axial positions as the threshold, and dynamically taking values ​​with the circumferential angle and axial position, so that the discrimination threshold automatically adapts to the spatial fluctuation amplitude of the film layer itself at different positions, raising the threshold in positions where the film layer has large fluctuations and lowering the threshold in positions where the film layer is stable, thus balancing the missed detection of detachment and the false alarm of normal fluctuation.

[0057] Step 8: Verification of Spatiotemporal Consistency Across Multiple Views and Frames. Using the unified toroidal unfolded coordinate system established in Step 3, the same physical surface patch will be repeatedly observed in the overlapping fields of view of adjacent cameras and in consecutive frames during the wire's movement. The judgment results of these candidate defects pointing to the same absolute circumferential angle and absolute axial position are correlated and voted on. Specifically, a spatiotemporal correlation table of candidate defects is established using the absolute coordinates in the unfolded coordinate system as indexes. The number of times each physical coordinate is judged as a defect in each viewpoint and frame, along with its confidence level, is accumulated. Candidates that consistently and stably appear at the same physical coordinate across multiple views and frames are confirmed as genuine defects; candidates that appear only in a single viewpoint or frame and do not persist with the physical coordinate are judged as specular highlight flicker or transient reflection artifacts and are discarded.

[0058] Real defects are attached to the physical surface and will appear consistently and stably at the same coordinates across multiple viewpoints and frames. In contrast, artifacts such as specular highlight flicker and transient reflections move with twist and camera angle changes, but do not persist with the physical coordinates. Therefore, false alarms caused by moving highlight bands and twist jitter can be effectively suppressed. For example... Figure 5As shown, in the observation coordinate system, the same physical surface patch drifts along a spiral trajectory across multiple frames and cameras due to wire twisting and lateral jitter. After twist phase calculation in step two and twist compensation expansion in step three, it is repositioned to a unified toroidal expansion coordinate system and converges into a fixed coordinate, forming a stable coordinate field that does not drift with twist. This ensures that the real defect continuously and stably appears in the same coordinate and is thus confirmed, while reflection artifacts are voted out because they do not persist with the physical coordinate. Preferably, during voting, different observations are assigned confidence weights related to their imaging angle distance from the highlight band. Observations with imaging angles closer to the highlight band and at good observation angles are given higher weights, allowing high-quality observations to dominate the judgment. The twist angle confidence derived in step two is also included in the weights, and its voting influence is appropriately reduced in frames where the twist calculation is uncertain. Only confirmed defects proceed to subsequent location and tracing, while unconfirmed candidates are returned to step five as normal areas to participate in the benchmark update.

[0059] Step Nine: Axial Positioning, Traceability, and Reel-in Feedback. Combining the encoder signal with the wire running data, the axial position of the confirmed defect in the toroidal unfolded coordinate system is converted into the absolute mileage along the wire length. Specifically, the cumulative displacement pulses from the encoder's detection start point multiplied by the equivalent displacement per pulse equals the absolute mileage along the wire length where the confirmed defect is located, ensuring each confirmed defect has a unique and traceable location on the entire roll of wire. The absolute circumferential angle, category, size, and confidence level of the confirmed defect are recorded, along with its absolute mileage along the wire length, to form a defect traceability file, supporting subsequent quality backtracking and process analysis.

[0060] Furthermore, the detection results are fed back to the take-up controller in real time. For wire segments with severe defects such as phosphate layer peeling and cracks, automatic inkjet marking, speed reduction, or triggered removal are performed to achieve online handling of defective segments. Specifically, for wire segments with high confidence and severe defects, the controller drives the inkjet printer to print marks on the wire length adjacent to the defect so that it can be rejected downstream. The controller can also reduce the take-up speed or trigger the removal of consecutive severe defect segments based on the defect density, thereby improving the surface quality consistency of the drawn steel wire in a closed loop.

[0061] In this embodiment, the data processed in steps one through nine above all have definite technical meanings, corresponding to physical quantities and equipment status such as optical imaging, imaging geometric phase, surface reflectivity, texture statistics, and defect categories on the steel wire surface. Through the synergy of the above steps, this invention transforms the inherent specular highlight band of high curvature from passive interference into an actively utilized physical phase reference, solves and compensates for the spatiotemporal non-stationary drift caused by twisting jitter into a unified coordinate field, identifies defects in a residual manner on a normal film layer statistical reference bound to the position, and distinguishes phosphating layer peeling as an independent defect category and normal film thickness fluctuations through a dual-branch network and specialized discrimination. Furthermore, multi-view, multi-frame spatiotemporal consistency confirmation suppresses false alarms introduced by highlights and twisting, thereby achieving reliable online defect detection of the high curvature filament surface covered with natural non-uniform phosphating and lubricating film layers in 360 degrees around the entire circumference under the conditions that defects and background originate from the same source and the background is spatiotemporally non-stationary.

[0062] Example 2

[0063] In a preferred embodiment of the present invention, for the specular highlight band phase independently extracted by multiple sets of line scan cameras arranged in a ring at the same axial section, a solution method based on the overdetermined equation system with multi-path phase physical self-consistency constraint is further established to improve the robustness of twist angle calculation under high-speed operation of the steel wire and local reflection pollution conditions. Specifically, let the number of cameras arranged in a ring be n, and the azimuth angles obtained by each camera before calibration be denoted as θ_1, θ_2, ..., θ_n, respectively. These azimuth angles describe the circumferential installation position of the optical center of each camera relative to the nominal central axis of the steel wire; for the same axial section, the phase measurement value corresponding to the center line of the highlight band extracted by the i-th camera along the scanning line perpendicular to the axial direction of the steel wire is denoted as φ_i. Since the circumferential position of the specular highlight band is uniquely determined by the imaging geometry—the direction from the surface normal to the bisector of the angle between the camera and the illumination—and the installation azimuth angle of each camera relative to the nominal central axis of the wire is determined during calibration, ideally, when the wire twists around its own axis at an angle α, the phase measurements of each path should satisfy the following relationship: φ_i equals α plus θ_i, plus the observation noise term ε_i, i.e., φ_i = α + θ_i + ε_i, where ε_i is a small random disturbance caused by imaging noise, quantization error, etc. When the number of camera paths n involved in the calculation is greater than 1, the above equation forms an overdetermined system of equations with more equations than unknowns regarding the unique unknown α. This overdetermined structure is the basis for robust twist angle estimation and contamination removal in this embodiment.

[0064] Preferably, the twist angle is calculated using the following sub-steps. Sub-step one: A rough least squares estimate is performed on the phase measurement values ​​φ_i for each path to obtain the initial twist angle α_0. The calculation method is to take a weighted average of (φ_i-θ_i), and the initial weight can be uniformly set to 1. Sub-step two: The residuals r_i = φ_i - θ_i - α_0 for each path are calculated based on α_0, and the observations are reweighted according to the magnitude of the residuals. The weighting function preferably adopts a Huber-like form, that is, when the absolute value of the residual is less than the preset threshold c, the weight w_i = 1 is taken, and when the absolute value of the residual is greater than the threshold c, the weight w_i = c divided by the absolute value of the residual is taken. The threshold c is adaptively set according to the standard deviation of the historical residuals, and the preferred value range is 2 to 3 times the standard deviation. Sub-step three: Resolve the weighted least squares estimate with the updated weights to obtain a new twist angle estimate α_1, i.e., α_1 equals Σ(w_i×(φ_i-θ_i)) divided by Σw_i. Sub-step four: Repeat sub-step two and sub-step three for iterative reweighting. The number of iterations is preferably set in the range of 3 to 8 times, until the difference between the twist angle estimates obtained from two adjacent iterations is less than a preset convergence threshold. The converged estimate is then output as the final twist angle of the current axial section.

[0065] Furthermore, for camera paths that still exhibit significantly lower weights than the other paths after the above iterations (e.g., weights below 0.3), it is determined that the current frame specular phase measurement value is distorted due to local defects or stray reflection pollution. The data of this path is removed from the current frame twist angle calculation, and the abnormal marker, along with its circumferential angle and axial position, is output for reference in subsequent defect identification stages. Meanwhile, this embodiment maintains a long-term self-calibration mechanism for the azimuth angle of each camera: for each camera path, the mean value of its residual r_i is accumulated within a sliding window of preferably 50 to 500 frames, and recorded as the long-term offset estimate of the camera path; when the absolute value of the long-term offset estimate exceeds a preset drift threshold (preferably 0.5 to 2 degrees), it is determined that the calibration azimuth angle of the camera path has slowly drifted, and its azimuth angle is updated in a way with a forgetting factor, that is, the new value of θ_i is equal to its old value plus the forgetting factor λ multiplied by the long-term offset estimate. The forgetting factor λ preferably takes a value range of 0.9 to 0.99, so that the azimuth angle calibration value slowly tracks the long-term changes in the camera installation state without being disturbed by single-frame noise. Finally, this embodiment also outputs the confidence level of the twist angle estimate based on the overall weighted residual level after iterative convergence. The preferred calculation method is to subtract the normalized residual sum of squares from 1 and divide it by the preset benchmark variance, and then truncate the value to the range of 0 to 1. The closer the confidence level is to 1, the more consistent and reliable the multi-path observations on which the current twist angle estimate is based.

[0066] Preferably, the number of camera paths n in the ring arrangement ranges from 4 to 8 in this embodiment, and the preset overlap angle between adjacent cameras ranges from 5 to 20 degrees. This ensures seamless 360° circumferential coverage while providing sufficient observation redundancy for the over-determined equations. When the number of camera paths is too small, the redundant observations of the over-determined equations are insufficient, and the ability to robustly remove contaminated paths decreases accordingly. The output twist angle and its confidence level are used for subsequent conversion and registration fusion of the unified toroidal unfolding coordinate system. Furthermore, the confidence level is used to weight each observation during multi-view, multi-frame correlation voting, giving the unfolded position calculated based on the high-confidence twist angle a higher weight in the defect confirmation judgment.

[0067] The beneficial effects of the above-mentioned technical means are as follows: First, by combining multiple high-light phases into a system of indeterminate equations and performing robust estimation, the calculation of the twist angle no longer depends on the phase extraction quality of a single camera path. When the observation of individual camera paths is distorted due to local reflections or surface defects, a reliable twist angle estimate can still be obtained based on the consistent observations of the remaining camera paths, reducing the probability of overall twist compensation failure due to single-point contamination. Second, through a long-term azimuth angle self-calibration mechanism, the slow changes in the camera installation azimuth angle caused by factors such as vibration and thermal drift can be continuously tracked and corrected, ensuring that the calibration parameters remain effective in the scenario of long-term continuous operation of the wire production line, reducing the gradual accumulation of unfolding coordinate deviation due to calibration inaccuracies. Third, the output twist angle confidence provides a quantifiable weighted basis for the subsequent multi-view, multi-frame spatiotemporal consistency verification process, making high-quality observations dominate in defect verification and judgment, thereby reducing the false residuals caused by the transmission of twist phase errors to the unfolding coordinate system, and thus improving the accuracy and noise robustness of defect identification.

[0068] The principle behind the aforementioned beneficial effects lies in the fact that the circumferential position of the specular highlight band is determined by the geometric angle between the surface normal direction and the camera and illumination. This phenomenon is essentially a purely imaging geometric relationship, and its position is largely independent of the specific optical property of the local reflectivity of the phosphating film. Therefore, it provides a stable observation that is relatively independent of the film inhomogeneity for twist angle calculation. When multiple cameras arranged in a ring simultaneously observe a physical cylindrical surface with the same axial section, since the installation azimuth angle of each camera is a pre-calibrated a priori known quantity, theoretically all observations should converge to the same true twist angle. This makes the multi-path observations naturally constitute a set of equations with redundant constraints. The true twist angle signal remains consistent across all camera paths, while the phase deviation caused by local contamination is only reflected in a few contaminated camera paths. The distribution characteristics of the two in the residual space are essentially different, thus enabling the robust estimation method to distinguish and eliminate the true signal from the local contamination signal. When the highlight phase of more than half of the camera paths in the same axial section is contaminated at the same time, such as when there are large-area severe defects on the surface of the steel wire or when there is strong stray light interference in the environment, the redundant observations of the overdetermined equation system will not be sufficient to support robust elimination. At this time, the accuracy of twist angle estimation may be affected to a certain extent. In this case, the predicted value of the twist angle velocity of the preceding frame can be combined to perform short-time scale extrapolation compensation in order to maintain the continuity of twist compensation.

[0069] Example 3

[0070] In another embodiment of the present invention, as an optional alternative, the acquisition of the twist angle and the identification of defects do not rely on the image feature extraction of the specular highlight band. Instead, the technical paths of direct measurement of inertial angular velocity and self-supervised reconstruction error identification are respectively adopted to solve the problem of reliable online detection of toroidal defects of drawn steel wire as in Example 1.

[0071] Specifically, the toroidal acquisition unit still employs multiple sets of line-scan cameras arranged in a ring along the wire's running direction to form an acquisition field covering the 360° surface of the wire. Each camera is triggered by a signal from the wire running encoder for synchronous exposure. Unlike the previous implementation, this implementation adds a guide mechanism that rotates synchronously with the wire surface near the toroidal acquisition unit along the wire's running path. An angular velocity sensor, preferably a fiber optic gyroscope or a high-precision microelectromechanical gyroscope, is mounted on this guide mechanism to directly measure the instantaneous angular velocity signal of the wire twisting around its own axis. After synchronously sampling this angular velocity signal and the axial displacement signal provided by the wire running encoder, time integration is performed along the axial direction to obtain the estimated twist angle of the wire relative to its nominal attitude at each axial position. This twist angle estimation process is entirely based on the fusion of physical quantities from inertial measurement and displacement measurement, and does not involve the positioning and phase calculation of the specular highlight band in the toroidal image. Preferably, in order to suppress the cumulative error of the gyroscope's inherent zero-bias drift during the integration process, the cumulative twist angle is zeroed once at each preset axial mileage interval (preferably ranging from 10 meters to 100 meters) using a known fixed marker point on the wire production line or a mechanical tool setting reference point, so as to avoid the phase drift caused by long-distance integration growing indefinitely.

[0072] Furthermore, after obtaining the aforementioned twist angle estimate, it is still used as the circumferential reference to convert each toroidal local image to a unified toroidal unfolding coordinate system and register and fuse them to obtain the toroidal unfolded image. This unfolding conversion process is consistent with the corresponding processing method in Example 1. Based on this, the defect identification step in this embodiment adopts a different technical path from the position-conditional statistical residual comparison, namely, the identification method based on self-supervised reconstruction error. Specifically, for the toroidal unfolded image confirmed as a normal film layer, a sliding window sampling is performed on the unfolding coordinate system according to a preset spatial step size to obtain a normal image block sample set covering different circumferential angle partitions and different axial positions. The scale of this sample set is preferably on the order of hundreds of thousands to millions of image blocks. An encoder-decoder reconstruction network driven only by normal samples is trained with this normal sample set. It is preferred to use a convolutional autoencoder or a lightweight U-shaped reconstruction network structure so that the network learns the low-dimensional manifold representation of normal phosphating texture in the unfolding coordinate system during the training process. That is, the network can encode the input normal film layer image block into low-dimensional features and decode and reconstruct an image that is close to the input height. The loss function used for training is preferably a weighted combination of pixel-level reconstruction error and structural similarity metric. That is, the total loss is equal to the sum of the pixel-level L1 distance and the structural similarity loss term according to a preset weight coefficient. The weight coefficient is preferably between 0.5 and 2 to balance the pixel-level fidelity of the reconstruction result and the consistency of local texture structure. The optimizer is preferably the Adam optimizer, and the initial learning rate is preferably between 1×10^-4 and 1×10^-3, and is gradually reduced by cosine annealing or step decay. The batch size is preferably between 32 and 256 depending on the graphics memory configuration of the training hardware. The number of training epochs is preferably set in the range of tens to hundreds of epochs according to the size of the training samples, and is combined with an early stopping mechanism when the reconstruction error on the validation set no longer decreases to avoid overfitting.

[0073] During the online inference phase, newly acquired toroidal unfolded images in the unfolded coordinate system are divided into blocks and input into the reconstruction network according to the same spatial step size during training. The difference between the input and reconstruction output of each image block is calculated. This difference can be measured using either pixel-level error or the feature distance of the intermediate layers of the network. The difference value is used as the anomaly score for the corresponding location. Since the reconstruction network has only seen normal film samples, it is difficult for the network to accurately reconstruct regions whose structure or reflectance characteristics deviate from those of normal films. Therefore, the reconstruction error of such regions is usually significantly higher than that of normal regions. Based on this, image blocks with anomaly scores exceeding a preset threshold can be identified as candidate defect regions. Furthermore, for the regions identified as candidates, post-processing classification is performed based on the local reflectance level and edge gradient distribution characteristics of the region. Candidates mainly characterized by edge breakage and gradient abrupt changes are classified into the scratch or crack category, while candidates mainly characterized by sudden changes in reflectance and collapse of the original texture structure are classified into the phosphating layer peeling category. Thus, without relying on position-conditional statistical benchmarks and a dual-branch network structure, it is still possible to distinguish and identify defects of different physical causes.

[0074] The technical approach adopted in this embodiment differs substantially from the aforementioned embodiment in both the twist angle acquisition and defect identification stages: the acquisition of the twist angle is changed from relying on the image feature extraction of the specular highlight band to relying on the direct measurement and integration of inertial angular velocity, avoiding the phase calculation difficulties that may occur in situations such as complex lighting conditions, drastic changes in film reflection characteristics, or difficulty in stable extraction of the specular highlight band due to severe surface contamination; the defect identification is changed from relying on the comparison residual of local texture statistical benchmarks bound to absolute circumferential angle and axial position to relying on the reconstruction error given by a self-supervised reconstruction network trained only with normal samples, so that this scheme can distinguish the phosphating film, which is of the same origin as the defect, from the real defect even in working conditions where normal samples are fully covered. When normal film appearance changes occur during the steel wire production process that were not fully covered during the training phase, such as an overall color shift caused by adjustments to phosphating process parameters, the reconstruction network may produce a higher reconstruction error for these newly emerging normal samples, thereby increasing the probability of misjudging them as defect candidates. In this case, the reconstruction network can be incrementally trained and updated periodically with newly collected normal samples so that its reconstruction ability can continuously adapt to the normal range of film appearance changes.

[0075] Example 4

[0076] This embodiment provides a visual inspection system for toroidal defects in drawn steel wire, corresponding to the method described in Embodiment 1. This system is used to implement the aforementioned nine steps at the exit inspection station of the drawing production line. The system includes a toroidal acquisition unit, a synchronous triggering unit, a phase calculation module, a twist compensation unfolding and splicing module, a brightness normalization module, a background reference modeling module, a defect identification module, a phosphating layer peeling discrimination module, a spatiotemporal consistency verification module, and a positioning traceability feedback module. Each module sequentially receives the output of the preceding module and transmits the processing result to the following module, forming a processing link connected in series along the data flow direction.

[0077] The toroidal acquisition unit comprises multiple sets of line-scan cameras arranged in a ring along the direction of the steel wire's movement, and a coaxial halo illumination module. This forms a 360-degree acquisition field of view covering the surface of the steel wire. The principal optical axes of each camera point towards the nominal central axis of the steel wire and are uniformly offset circumferentially. The fields of view of adjacent cameras maintain a preset overlap angle. The coaxial halo illumination module ensures that the incident illumination is approximately axially symmetrical along the circumference of the steel wire, providing the physical conditions for the regularity of the specular highlight band. Each camera is pre-calibrated geometrically to obtain the azimuth angle of its optical center relative to the nominal central axis of the steel wire, the imaging magnification, the circumferential field of view coverage, and the mapping relationship from pixel column coordinates to the circumferential angle. This mapping relationship is stored and used by the phase calculation module and the twist compensation unfolding and stitching module.

[0078] The synchronous triggering unit is connected to the wire running encoder and is used to trigger the synchronous exposure of each camera line according to the displacement pulse output by the encoder, so that the images of each channel at the same acquisition time correspond to the same axial position on the wire, and transmit the toroidal local images acquired by each camera to the phase calculation module.

[0079] The phase calculation module extracts the peak brightness position of the specular highlight band from the local image of each toroidal surface along a scan line perpendicular to the wire axis to obtain the center line of the highlight band. The circumferential angle corresponding to this center line, uniquely determined by imaging geometry, is used as the reference phase. Combined with the mapping relationship, the twist angle of the wire around its own axis is calculated. This module further uses a system of overdetermined equations to simultaneously solve multiple highlight phases, using the residuals to calibrate the azimuth drift of each camera online, eliminate contaminated pseudo-highlight phases, and output the confidence level of the twist angle. The phase calculation module then transmits the twist angle, confidence level, and highlight band center phase to the twist compensation unfolding and stitching module.

[0080] The twist compensation unfolding and stitching module is used to convert the local images of each toroidal surface to a unified toroidal unfolding coordinate system with absolute circumferential angle and absolute axial position as coordinate axes, and then register and fuse them to obtain an unfolded toroidal image. This image is then output to the brightness normalization module and the phosphating layer peeling discrimination module. The brightness normalization module is used to establish a brightness attenuation response model based on the phase of the highlight band centerline and the angular distance between the circumferential angle of each pixel in the unfolded image and the highlight band center. It performs gain compensation pixel-by-pixel on the unfolded image, with model parameters fitted online from defect-free samples and adaptively updated. The normalized image is then output to the background reference modeling module and the defect identification module.

[0081] The background benchmark modeling module maintains the local texture statistical benchmark of the normal film layer online within a unified toroidal unfolded coordinate system, using circumferential angle partitioning and axial sliding windows as conditions. It compares the local features of the normalized image with the corresponding local texture statistical benchmark to obtain a residual feature map. The local texture statistical benchmark includes local gray-level distribution features, multi-scale texture direction energy, and local reflectivity levels, and is updated using a recursive method with a forgetting factor, involving only regions determined to be normal. The residual feature map is then passed to the defect identification module.

[0082] The defect identification module is used to input the toroidal unfolded image, normalized image and residual feature map into the trained defect identification network after concatenating them in the channel dimension. The network has two parallel feature branches: a geometric discontinuity branch and a reflection and coverage anomaly branch. The residual feature map is the dominant input channel. After the features of the two branches are fused, the location, contour segmentation mask and category of the defect are output. Candidate regions belonging to the reflection and coverage anomaly category are passed to the phosphating layer peeling discrimination module, and the remaining candidates along with the confirmation results are passed to the spatiotemporal consistency confirmation module.

[0083] The phosphating layer peeling discrimination module is used to distinguish between phosphating layer peeling and normal film thickness fluctuations based on the deviation of the candidate region from the local reflectivity level, the sharpness of the boundary, and the degree of energy collapse in the texture direction relative to the local texture statistical benchmark, combined with the adaptive threshold derived from the background benchmark modeling module, and the discrimination result is sent back to the spatiotemporal consistency verification module.

[0084] The spatiotemporal consistency verification module utilizes a unified toroidal coordinate system to correlate and vote on candidate defect judgment results pointing to the same absolute coordinate in overlapping fields of view of adjacent cameras and in consecutive frames. Candidates that consistently and stably appear at the same physical coordinate are verified as real defects, while candidates appearing only in a single viewpoint or single frame are judged as reflection artifacts and discarded. Unverified candidates are sent back to the background benchmark modeling module as normal areas to participate in benchmark updates. The positioning traceability feedback module combines encoder signals to convert the axial position of verified defects into absolute mileage of wire length, records circumferential angles, categories, dimensions, and confidence levels to form a defect traceability file, and feeds the detection results back to the take-up controller, driving it to perform inkjet marking, speed reduction, or removal of severely defective wire segments.

[0085] In this embodiment, the above modules can be deployed on edge computing devices adjacent to the inspection station. Processing with high real-time requirements, such as phase calculation, unfolding and splicing, and brightness normalization, is deployed on edge nodes equipped with graphics processing units. Background benchmark modeling, defect identification network inference, and traceability file management can be deployed on production line-level servers. Edge nodes and servers exchange inspection data and control commands via industrial Ethernet. The overall deployment environment is only for illustration and does not limit the specific equipment model.

[0086] Example 5

[0087] To verify the feasibility of the method described in this embodiment, a drawn steel wire with a diameter of 1.2 mm, a lead-out speed of 18 m / s, and a surface covered with a natural non-uniform phosphate and soap-based lubricating film was selected as an application case. The thickness of the phosphate film on the surface of this type of steel wire exhibits natural fluctuations along both the wire length and circumference. Furthermore, the wire spontaneously twists during traction, causing the surface texture background to continuously drift relative to a fixed viewing angle. Conventional visual inspection methods based on fixed background models or global threshold segmentation struggle to reliably distinguish between genuine defects such as phosphate layer peeling, scratches, and cracks and normal film fluctuations and specular highlight disturbances, easily leading to a high rate of missed detections and false alarms.

[0088] The implementation steps are as follows: Six sets of line scan cameras are deployed and geometrically calibrated according to step one of Example 1; approximately 120 rolls of steel wire are continuously acquired to construct a dataset, with a total of tens of thousands of slices. Quality inspectors label scratches, cracks, phosphating layer peeling, and normal film thickness fluctuations pixel by pixel; the training set, validation set, and test set are divided at approximately a 7:2:1 ratio, with slices from the same roll of steel wire not being assigned across sets; steps two through six are executed sequentially to complete twist phase calculation, toroidal unfolding, brightness normalization, background baseline modeling, and dual-branch network training; the detection rate, false alarm rate, and segmentation crossover ratio are evaluated on the test set.

[0089] Test results show that, Figure 7As shown, the method of this invention achieves a detection rate of 95.7% for scratches, 93.4% for cracks, and 96.8% for phosphate layer peeling. The combined false alarm rate for the three types of defects is 3.6%, and the average cross-union ratio (CUI) of the segmentation mask is 0.80. In contrast, a conventional method that does not incorporate twist phase calculation and position-conditional benchmark modeling, but only uses a fixed background template for difference and combines it with a general convolutional neural network for classification, achieves detection rates of 76.2%, 69.8%, and 64.5% for scratches, cracks, and phosphate layer peeling on the same test set, respectively. The combined false alarm rate rises to 17.3%, and the segmentation CUI drops to 0.51. The main reason for this is that the method fails to compensate for the background drift caused by twist, resulting in a large number of normal film fluctuations and specular highlights being misjudged as abnormal.

[0090] To demonstrate the technological contributions of each innovative step, further ablation comparisons were conducted, such as... Figure 8 As shown. When the twist compensation torus unrolling in step three is removed and subsequent processing is performed directly on the original local image, the average detection rate of the three types of defects decreases to 74.1%, while the overall false alarm rate increases to 14.9%, indicating that twist compensation has a significant effect on background stabilization. When the location-conditional background benchmark modeling in step five is removed and replaced with a global statistical benchmark, the average detection rate of the three types of defects decreases from 95.3% to 80.3%, while the overall false alarm rate increases from 3.6% to 9.7%, with a particularly significant decrease in the detection rate of phosphating layer peeling, indicating that the location-conditional benchmark is crucial for distinguishing between defects of the same origin and normal fluctuations. When the multi-view, multi-frame spatiotemporal consistency verification in step eight is removed, the overall false alarm rate increases from 3.6% to 11.2%, and the detection rate fluctuates slightly but does not change much, indicating that this step mainly suppresses false alarms introduced by specular artifacts rather than improving the detection rate. The above results show that each step of the present invention has a verifiable independent contribution to both the detection rate and the false alarm rate. The overall scheme has significantly better comprehensive detection performance than conventional methods under the conditions of non-uniform phosphating film and spontaneous twisting of steel wire.

[0091] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A visual inspection method for toroidal defects in drawn steel wire, characterized in that, include: Step S1: Multiple sets of line scan cameras are arranged in a ring along the running direction of the steel wire. The encoder triggers the line synchronous exposure to acquire a local image of the ring surface covering 360° of the steel wire, and the mapping relationship between the pixel column coordinates of each camera and the circumferential angle of the steel wire is calibrated. Step S2: Extract the peak position of the specular highlight band brightness from the local image of each toroidal surface along the scanning line perpendicular to the steel wire axis to obtain the center line of the highlight band. Use the circumferential angle corresponding to the center line, which is uniquely determined by the imaging geometry, as the reference phase. Combine the mapping relationship to calculate the twist angle of the steel wire around its own axis. Step S3: Using the twist angle as the circumferential reference, convert each toroidal local image to a unified toroidal unfolding coordinate system with absolute circumferential angle and absolute axial position as coordinate axes, and register and fuse them to obtain the toroidal unfolding image. Step S4: In the unified toroidal unfolding coordinate system, with circumferential angle partitioning and axial sliding window as conditions, maintain the local texture statistical benchmark of the normal film layer online, and compare the local features of the toroidal unfolding image with the local texture statistical benchmark at the corresponding position to obtain the residual feature map. Step S5: Identify the location and type of surface defects of the steel wire based on the residual feature map.

2. The method according to claim 1, characterized in that, In step S1, the main optical axis of each camera points to the nominal central axis of the steel wire and is evenly offset in the circumferential direction, and the field of view of adjacent cameras maintains a preset overlap angle; a coaxial halo illumination module is configured for the high curvature surface of the steel wire so that the incident illumination is approximately axially symmetrical in the circumferential direction; the calibration also includes the azimuth angle of the optical center of each camera relative to the nominal central axis of the steel wire, the imaging magnification, and the circumferential field of view coverage.

3. The method according to claim 1, characterized in that, In step S2, the circumferential angles of the highlight bands extracted by multiple sets of line scanning cameras arranged in a ring on the same axial section of the same steel wire cylindrical surface satisfy a fixed angle difference relationship determined by the calibrated azimuth angle. The multiple highlight phases are combined into a set of overdetermined equations. The residuals of the set of overdetermined equations are used to calibrate the azimuth angle drift of each camera online, eliminate false highlight phases contaminated by defects or local reflections, and output the confidence level of the twist angle.

4. The method according to claim 1, characterized in that, Step S3 is followed by: using the phase of the center line of the highlight band as a reference, establishing a brightness attenuation response model based on the angular distance of the circumferential angle of each pixel in the toroidal unfolded image relative to the center of the highlight band, performing gain compensation pixel by pixel on the toroidal unfolded image using the brightness attenuation response model, and the parameters of the brightness attenuation response model are fitted online by defect-free samples and updated adaptively.

5. The method according to claim 1, characterized in that, In step S4, the local texture statistical benchmark includes local grayscale distribution features, multi-scale texture direction energy, and local reflectivity level; the local texture statistical benchmark is updated using a recursive method with a forgetting factor, and only regions determined to be normal participate in the update.

6. The method according to claim 5, characterized in that, Step S5 includes: stitching the toroidal unfolded image and the residual feature map in the channel dimension and inputting them into the defect identification network. The defect identification network has two parallel feature branches: a geometric discontinuity branch and a reflection and coverage anomaly branch. The geometric discontinuity branch extracts edge breaks and gradient abrupt changes extending along a certain direction to identify scratches and cracks. The reflection and coverage anomaly branch extracts sudden changes in local reflectivity and energy collapse in the texture direction to identify phosphating layer peeling. After the features of the two branches are fused, the location, contour segmentation mask and category of the defect are output, and the residual feature map is used as the dominant input channel of the defect identification network.

7. The method according to claim 6, characterized in that, For the candidate regions given by the reflection and coverage anomaly branches, the discrimination is based on the deviation of their local reflectivity level relative to the local texture statistical benchmark, the sharpness of the region boundary, and the degree of collapse of the texture direction energy within the region. When the reflectivity deviation exceeds the adaptive threshold, the boundary shows a sharp jump, and the texture direction energy collapses significantly, it is determined to be phosphating layer peeling and bottom leakage; otherwise, it is determined to be normal film thickness fluctuation. The adaptive threshold is derived from the discreteness of the local texture statistical benchmark in step S4 and is dynamically valued with the circumferential angle and axial position.

8. The method according to claim 1, characterized in that, Also includes: Using the unified toroidal coordinate system, the candidate defect judgment results pointing to the same absolute circumferential angle and absolute axial position in the overlapping fields of view of adjacent cameras and in multiple consecutive frames are correlated and voted. Candidates that appear stably and continuously in the same physical coordinate in multiple views and multiple frames are confirmed as real defects, while candidates that appear only in a single view or single frame and do not persist with the physical coordinate are judged as reflection artifacts and are eliminated. During the correlation voting, each observation is assigned a confidence weight related to its imaging angle distance from the center line of the highlight band.

9. The method according to claim 1, characterized in that, Also includes: Combining the encoder signal, the axial position of the steel wire surface defect in the unified toroidal unfolded coordinate system is converted into the absolute mileage of the steel wire length. The circumferential angle, type, size and confidence level of the defect are recorded to form a defect traceability file. The detection results are fed back to the take-up controller, and inkjet marking, speed reduction or triggering removal are performed on the wire segments containing phosphate layer peeling or cracks.

10. A visual inspection system for toroidal defects in drawn steel wire, characterized in that, include: The toroidal acquisition unit includes multiple sets of line scan cameras and coaxial halo illumination modules arranged in a ring along the running direction of the steel wire, forming an acquisition field of view covering the 360° surface of the steel wire. The mapping relationship between the pixel column coordinates and the circumferential angle of the steel wire is pre-calibrated for each camera. The synchronous triggering unit, connected to the wire running encoder, is used to trigger the synchronous exposure acquisition of local images of the toroidal surface by each camera row; The phase calculation module is used to extract the peak position of the specular highlight band brightness from the local image of each toroidal surface along the scanning line perpendicular to the axis of the steel wire to obtain the center line of the highlight band. The circumferential angle corresponding to the center line, which is uniquely determined by the imaging geometry, is used as the reference phase. The twist angle of the steel wire around its own axis is calculated in combination with the mapping relationship. The twist compensation unfolding and stitching module is used to convert each toroidal local image to a unified toroidal unfolding coordinate system with absolute circumferential angle and absolute axial position as coordinate axes, and register and fuse them to obtain a toroidal unfolding image, using the twist angle as the circumferential reference. The background benchmark modeling module is used to maintain the local texture statistical benchmark of the normal film layer online in the unified toroidal unfolding coordinate system with circumferential angle partitioning and axial sliding window as conditions, and compare the local features of the toroidal unfolding image with the local texture statistical benchmark at the corresponding position to obtain the residual feature map. The defect identification module is used to identify the location and type of defects on the steel wire surface based on the residual feature map.