Square billet bent steel real-time detection method based on machine vision and edge feature analysis
By optimizing equipment layout and calibration process, and adopting technologies such as tilted camera installation, dual-path pulse illumination, and polarizing filters, the environmental adaptability and accuracy issues of existing machine vision solutions in billet bending steel detection have been resolved, achieving high-precision, real-time bending steel detection and reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202511877288.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-20
AI Technical Summary
Existing machine vision solutions for inspecting bent billets suffer from poor environmental adaptability, non-focused calibration logic on edge accuracy, poor compatibility with equipment layout and protection, severe light spot interference, and large edge detection errors, making it difficult to meet the production requirements of high precision, high real-time performance, and strong environmental adaptability.
By employing techniques such as camera tilting installation, dual-channel pulse illumination, polarizing filters, infrared beam triggering, multi-device synchronous image acquisition, dynamic threshold segmentation, edge enhancement filtering, Canny edge detection, and piecewise linear fitting, the equipment layout and calibration process are optimized to improve environmental adaptability and detection accuracy.
It significantly improves the edge extraction environment, reduces edge blurring rate and measurement error, enhances detection reliability and accuracy, reduces production accidents, and lowers operation and maintenance costs.
Abstract
Description
Technical Field
[0001] This invention relates to the field of high-speed wire rod production technology in the steel industry, specifically to a real-time detection method for bent square billets using machine vision and edge feature analysis. Background Technology
[0002] In the high-speed wire rod production process of the steel industry, the straightness of the billet entering the furnace is a core indicator that determines the stability of subsequent heating furnace feeding, the safety of roller conveyor, and the quality of finished steel products. If the billet has excessive vertical or horizontal bending (such as vertical arc height > 10mm, horizontal arc height > 20mm), it is easy to cause problems such as heating furnace feeding blockage (a single shutdown repair takes about 2 hours, and the average daily production capacity loss exceeds 50 tons) and billet surface scratches (the scrap rate increases by 0.3%). Therefore, online bending inspection of billets before entering the furnace has become a key link in the quality control of enterprises.
[0003] With the iteration of automation technology, the inspection of bent billets has been upgraded from "manual visual inspection + caliper measurement" (single inspection time > 30s, false judgment rate > 15%, unable to match the roller speed of 0~2m / s) to "machine vision inspection". However, the existing machine vision solution (i.e. the original reference solution) still has multiple technical pain points, which are difficult to meet the production requirements of high precision, high real-time performance and strong environmental adaptability. The specific pain points are as follows: Poor equipment layout and protection adaptability: The original solution uses a "vertical downward" camera installation, and the heat radiation and metal reflection on the billet surface (temperature <300℃) can easily cause the edges to be blurred; the supplementary lighting uses a "single direct beam" type, and the light spot formed by the strong light will cover the details of the billet edge, and there is no protection against stray light. The reflection on the metal surface of the roller conveyor further exacerbates the difficulty of edge extraction, resulting in an edge clarity rate of only about 80%.
[0004] The calibration logic does not focus on edge accuracy: The original solution only completed the "pixel-world coordinate" conversion calibration and did not perform specific calibration for edge size and environmental interference. In actual testing, there is a deviation between the edge pixel spacing and the physical size (error of about 5%), and the vibration of the roller conveyor (amplitude of 2~5mm) will cause the edge coordinate to shift. The original solution only corrected the overall coordinates of the image and did not specifically compensate for the edge shift. The maximum error in the vertical arc height measurement reached 15mm, which exceeded the accuracy requirement of "≤10mm". Summary of the Invention
[0005] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a real-time detection method for bent billet steel using machine vision and edge feature analysis. This method has advantages such as improved environmental adaptability and the resolution of reflection and light spot interference. It also solves the problem that the strong light spots formed by the "single direct beam" supplementary lighting can obscure the edge details of the billet.
[0006] (II) Technical Solution To achieve the above-mentioned goals of improving environmental adaptability and solving the problems of reflection and light spot interference, the present invention provides the following technical solution: a real-time detection method for bent steel billets using machine vision and edge feature analysis, comprising: step 1: equipment deployment and edge feature-specific calibration; step 2: billet dynamic triggering and synchronous image acquisition; step 3: edge enhancement preprocessing; step 4: edge detection and dynamic verification; step 5: edge coordinate segment fitting and bent steel calculation; and step 6: bent steel determination, intelligent output and edge quality feedback. Step 1: equipment deployment and edge feature-specific calibration includes 1.1 equipment deployment and 1.2 edge feature-specific calibration. Step 2: Billet dynamic triggering and synchronous drawing acquisition includes 2.1 dual-condition arrival triggering and 2.2 multi-device synchronous drawing acquisition; Step 3: Edge enhancement preprocessing includes 3.1 dynamic threshold segmentation, 3.2 edge enhancement filtering, and 3.3 pseudo-edge removal; Step 4: Edge Detection and Dynamic Verification includes 4.1 Canny Edge Detection and 4.2 Dynamic Edge Verification; Step 5: Piecewise edge coordinate fitting and bending calculation includes 5.1 Piecewise edge coordinate fitting and 5.2 Piecewise linear fitting and bending calculation; Step 6: Bending steel determination, intelligent output and edge quality feedback includes 6.1 multi-level bending steel determination and 6.2 intelligent output and edge quality feedback.
[0007] Preferably, the equipment deployment in section 1.1 is as follows: Optimized layout of visual equipment: The original plan of "installing two 8-megapixel high-definition network cameras (8m apart, covering 15m of roller conveyor) on a 6m steel structure above the roller conveyor" is retained, but the camera installation angle is adjusted from "vertically downward" to "tilted 15° towards the center line of the roller conveyor" to avoid edge blurring caused by reflection on the billet surface; at the same height as the billet on the side of the roller conveyor, the original "single high-brightness supplementary light" is replaced with a "dual-path pulse synchronous supplementary light group" (30W power per path, surface-mount LED, 45° beam angle), which shines obliquely from 30° above and 30° below the billet side, respectively, to "enhance the edge contour of the billet through light and dark contrast"; Protective structure adapted for edge acquisition: All camera equipment retains the original "double-layer stainless steel air curtain dust removal cylinder (outer diameter 130mm, length 250mm)", but adds a "detachable polarizing filter" at the front end of the cylinder - to filter stray light from the metal surface of the roller conveyor and the billet, further improving edge clarity. The original solution did not have this structure.
[0008] Preferably, the edge feature specific calibration in step 1.2 is as follows: Edge pixel - actual size calibration: A rectangular calibration block with "1mm interval scale lines" (size matches the billet cross section, 150mm×180mm) is used and fixed at different positions on the roller conveyor (head, middle, tail). After acquiring the image of the calibration block, the pixel coordinates of the scale line edge are extracted, and a mapping relationship of "edge pixel spacing - actual physical spacing" is established (e.g., 10 pixels correspond to 1mm). An "edge size correction coefficient" is generated to solve the problem of the original solution "only calibrating coordinate transformation, without calibrating edge size". Dynamic vibration edge offset calibration: A "high-frequency vibration sensor (sampling rate 2kHz, higher than the original 1kHz)" is installed on the roller conveyor to simulate the vibration state when the billet moves at speeds of 0.5m / s, 1m / s, and 2m / s. Edge images of the calibration block under different vibration conditions are collected, the offset of edge pixels is recorded, and a "vibration frequency - edge offset" compensation model is established for subsequent edge coordinate correction. Light and shadow interference edge threshold calibration: By simulating scenarios such as "crane shadow (30% occlusion area) and roof light leakage (60° strong light illumination angle)" with adjustable light source, the edge images of the billet under different light and shadow conditions are collected to determine the "effective threshold range" of edge pixel grayscale difference and generate a "light and shadow intensity - edge threshold" correspondence table to provide a basis for dynamic threshold segmentation.
[0009] Preferably, the 2.1 dual-condition triggering is as follows: An infrared beam sensor is added at the roller conveyor entrance (2m in front of the detection area). When the infrared beam sensor detects the billet obstruction (for 200ms) and the network camera above recognizes the "rectangular outline that conforms to the billet cross section of 150~180mm" for 3 consecutive frames, a trigger signal is sent to the vision AI controller to avoid missed triggering due to light and shadow interference from a single vision trigger. 2.2 Simultaneous image acquisition by multiple devices: Trigger signal synchronous start: ① Two network cameras above (frame rate increased from the original 30fps to 60fps, exposure time per frame controlled at 10ms to avoid edge ghosting caused by billet movement); ② Side industrial camera (frame rate 60fps, synchronized with the supplementary lighting group); ③ Dual-channel pulse supplementary lighting group (pulse frequency 60Hz, fully synchronized with the camera frame rate, supplementary lighting is turned on when each frame of image is exposed, with no light and shadow flicker); Image data transmission: The "priority transmission protocol" is adopted to transmit the edge image (high priority) of the side industrial camera and the upper surface image (second highest priority) of the network camera above to the vision AI controller through the original "gigabit PoE switch" to ensure that the edge image transmission latency is ≤50ms.
[0010] Preferably, the 3.1 dynamic threshold segmentation: Based on the "light intensity - edge threshold" correspondence table in step 1.2, the average gray value of each frame image is analyzed in real time (e.g., an average gray value of 200 corresponds to a strong light scene, with a threshold of 80; an average gray value of 80 corresponds to a shadow scene, with a threshold of 40). The "Otsu adaptive threshold algorithm" is used to dynamically adjust the segmentation threshold to separate the billet area from the background (roller conveyor, dust) and ensure complete extraction of the edge area. 3.2 Edge Enhancement Filtering: For the segmented billet image, the Gaussian-Laplacian operator (LoG) is used for convolution operation. First, the image is smoothed by a 5×5 Gaussian filter (to eliminate noise points caused by dust), and then the pixel gray-level change rate is calculated by the Laplacian operator to highlight the gray-level gradient of the billet edge (the gray-level difference of edge pixels is increased from ≥50 in the original scheme to ≥60), forming an "edge-enhanced image" to provide clear features for subsequent edge detection. 3.3 False Edge Removal: The edge enhancement image is processed by "morphological opening operation (3×3 rectangular structuring element)" to remove "short pseudo edges" (edge segments with a length of < 5 pixels) caused by dust and roller scratches; then, by "edge continuity judgment" (the distance between adjacent edge pixels is ≤ 2 pixels to be continuous), the complete edges of the upper and side surfaces of the billet are preserved, and the "clean edge image" is output.
[0011] Preferably, the 4.1 Canny edge detection: The Canny algorithm is applied to the "clean edge image": ① Further denoising is performed using a 5×5 Gaussian filter; ② The image gradient (horizontal and vertical directions) is calculated to determine the edge direction; ③ Non-maximum suppression is used to remove non-edge pixels and retain the edge center line; ④ Double threshold detection is performed using the "edge threshold range (40~80)" calibrated in step 1.2 to extract "strong edges (gray level difference ≥60)" and "weak edges (gray level difference 40~60)", and the edges are completed by "connectivity between weak edges and strong edges", and finally the "square blank edge pixel coordinate sequence" is output. 4.2 Edge Dynamic Validation: Cross-sectional dimension verification: Based on the specifications of 150~180mm for the square billet cross-section, calculate the vertical distance (actual height) between the upper and lower edges of the side surface and the horizontal distance (actual width) between the two sides of the upper surface. If the dimensions are within the range of 145~185mm (allowing ±5mm error), the edge is considered valid; otherwise, it is considered "edge extraction abnormal" and triggers re-image acquisition. Edge continuity verification: For the coordinate sequence of each edge segment, calculate the Euclidean distance between adjacent coordinate points. If the distance between 3 consecutive points is greater than 5 pixels (corresponding to 1mm in reality), it is judged as "edge break". The coordinates of the break are supplemented by "linear interpolation". If the break length is greater than 20 pixels, it is judged as "image acquisition abnormality". A signal is sent to the supplementary light group to adjust the brightness and then re-acquire.
[0012] Preferably, the 5.1 edge coordinate segmentation is as follows: The billet length direction (X-axis) is divided into segments of 150mm each (the original solution was 100mm each, balancing accuracy and efficiency). The Z-axis coordinates (vertical direction) of the upper surface edge and the Y-axis coordinates (horizontal direction) of the side surface edge within each segment are extracted separately to form a "segmented edge coordinate subset" (60~100 segments in total, covering billets of 9~15m). Compared with the original solution of "overall fitting", segmented processing can accurately capture small local bends in the billet.
[0013] Preferably, the 5.2 piecewise linear fitting and bending calculation are as follows: Calculation of vertical bending of steel: Perform linear fitting on the subset of "XZ" coordinates of each upper surface edge to obtain the fitted line equation for each segment \(Z_i = k_iX + b_i\) (i is the segment number); Calculate the "slope deviation" (slope difference between two adjacent segments \(\Delta k = |k_{i+1}- k_i|\)) of all piecewise fitted straight lines. If \(\Delta k > 0.005\) (corresponding to an offset of 5mm per meter in the vertical direction), mark the area as a "potential bending steel segment". For all coordinate points of the potential bent steel segment, fit an overall quadratic curve \(Z = a_1X 2 + b_1X + c_1\), calculate the vertical distance between the highest point of the curve and the line connecting the two ends of the billet, which is the "vertical bending arc height"; Calculation of horizontal bending of steel: Similarly, a linear fit is performed on the subset of "XY" coordinates of each side surface edge to obtain \(Y_i = m_iX + n_i\); Calculate the slope difference between adjacent segments \(\Delta m = |m_{i+1} - m_i|\). If \(\Delta m > 0.01\) (corresponding to a horizontal offset of 10mm per meter), mark the potential bent steel segment. Fit a quadratic curve to the potential bent steel segment\(Y = a_2X) 2+ b_2X + c_2\) calculates the horizontal distance between the line connecting the point of maximum offset of the curve and the two endpoints, which is the "horizontal bending arc height" (accuracy ≤18mm).
[0014] Preferably, the 6.1 multi-level bending steel determination: Preset three threshold levels: ① Warning threshold (vertical arc height 8~10mm, horizontal arc height 16~18mm); HMI prompts only; ② Alarm thresholds (vertical arc height 10~12mm, horizontal arc height 18~20mm); Trigger audible and visual alarms; ③ Emergency threshold (vertical arc height > 12mm, horizontal arc height > 20mm) triggers roller conveyor shutdown.
[0015] Preferably, the 6.2 intelligent output and edge quality feedback: Data output: The original scheme of "transmitting billet ID, inspection time, arc height, and judgment result to the L2 system" is retained; HMI visualization optimization: In addition to the original solution's "real-time images and detection results"; Edge quality feedback: If the edge sharpness is less than 80% (based on grayscale difference) or the number of breaks is greater than 5, the "fill light brightness adjustment" (such as increasing the fill light power from 30W to 40W in shadow scenes) or "camera exposure time correction" (adjusting from 10ms to 15ms) will be automatically triggered without manual intervention.
[0016] (III) Beneficial Effects Compared with existing technologies, this invention provides a real-time detection method for bent square billets using machine vision and edge feature analysis, which has the following advantages: 1. This machine vision and edge feature analysis method for real-time detection of bent billet steel improves environmental adaptability and solves interference from reflections and light spots. Through the optimized combination of "tilted camera installation + dual-path oblique illumination + polarizing filter", the edge extraction environment is thoroughly improved. The camera is installed at a 15° angle to the center line of the roller conveyor to avoid reflections on the billet surface when shooting vertically. The edge reflection blur rate is reduced from 20% in the original solution to less than 5%. The dual-path pulse supplementary light group (30° side-up and 30° side-down oblique illumination) strengthens the edges through light and dark contrast, replacing the original direct illumination, and the problem of light spots covering the edges is reduced by 90%.
[0017] 2. This machine vision and edge feature analysis method for real-time detection of bent billets enhances calibration accuracy, compensates for edge dimensions and vibration offsets, and fills the gap in the original solution that "only calibrates coordinates and does not calibrate edges" through "specific edge feature calibration". "Edge Pixel - Actual Size Calibration" establishes a mapping relationship between 1mm scale lines and pixels, generates correction coefficients, and reduces the edge size measurement error from 5% in the original scheme to within 1%. The compensation model established by the "Dynamic Vibration Edge Offset Calibration" (2kHz high-frequency sensor) can correct edge offsets at different moving speeds in real time (e.g., the offset is reduced from 2 pixels to 0.5 pixels at 2m / s), and the vibration interference error of vertical arc height measurement is reduced from 15mm to less than 3mm, laying the foundation for high-precision detection.
[0018] 3. This machine vision and edge feature analysis method for real-time detection of bent billets improves trigger reliability and data synchronization, ensuring real-time detection. It optimizes the "dual-condition triggering + synchronous image acquisition + priority transmission" mechanism, resolving the issues of missed triggers and data delays in the original solution. "Infrared beam + visual dual-condition triggering" (infrared occlusion 200ms + 3 frames visual recognition) reduces the missed trigger rate from 3% in the original solution to less than 1%, avoiding missed detection of billets due to light and shadow interference; The camera frame rate is increased to 60fps (10ms exposure), and the supplementary light is synchronized with the frame rate (60Hz pulse), eliminating edge shadows caused by billet movement; the "edge image priority transmission" design makes the transmission delay ≤50ms, which is 50% shorter than the original solution (100ms), ensuring that the detection results are output within 2.5 seconds, matching the conveyor speed of 0~2m / s.
[0019] 4. This machine vision and edge feature analysis method for real-time detection of bent billets optimizes the edge processing workflow, improves edge extraction quality and speed, and solves the problems of edge loss, numerous false edges, and slow processing in the original solution through a full-process optimization of "dynamic threshold + edge enhancement + false edge removal + Canny algorithm". Dynamic threshold segmentation (Otsu algorithm + light and shadow threshold table) reduces the edge loss rate in shadow scenes from 15% to 3%, significantly improving the integrity of edge extraction; The Gaussian-Laplace operator enhances the edge grayscale gradient (grayscale difference ≥ 60), and combined with morphological opening operations to remove short false edges, the misclassification rate caused by false edges is reduced from 8% to 2%; The original Pangu large model was replaced by the Canny edge detection algorithm, which reduced the single-frame edge processing time from 200ms to 50ms, reduced the computing power requirement by 75%, and provided sufficient data support for subsequent fitting by having ≥1000 edge coordinate points.
[0020] 5. This machine vision and edge feature analysis method for real-time detection of bent steel billets accurately captures local bends, improving measurement accuracy. It replaces the original "overall quadratic fitting" with "piecewise linear fitting + quadratic fitting," achieving accurate detection of local micro-bends. By extracting edge coordinates in 150mm segments, local micro-bends within 200mm can be captured (which the original overall fitting could not identify). Potential bent steel segments are marked by the slope deviation between adjacent segments, and then a quadratic curve is fitted in a targeted manner. The accuracy of vertical arc height measurement is improved from 10mm to 9mm, and horizontal arc height is improved from 20mm to 18mm. The accuracy of bent steel judgment is increased from 90% to over 96%, reducing production accidents caused by missed local bends.
[0021] 6. This machine vision and edge feature analysis method for real-time detection of bent steel billets improves the judgment and feedback mechanism, reduces operation and maintenance costs, and enhances system operation and maintenance convenience and production safety through "multi-level bending steel judgment + edge quality feedback". The three-level threshold judgment (early warning - alarm - emergency shutdown) enables differentiated management and avoids excessive shutdowns caused by the original single alarm (such as early warning only being prompted by HMI, without the need for audible and visual alarms), thereby reducing unnecessary production interruptions. Detailed Implementation
[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0023] This solution provides a technical approach, specifically a real-time detection method for bent billet steel using machine vision and edge feature analysis, comprising the following steps: Step 1: Equipment deployment and edge feature-specific calibration: 1.1 Equipment Deployment: Optimized layout of visual equipment: The original plan of "installing two 8-megapixel high-definition network cameras (8m apart, covering 15m of roller conveyor) on a 6m steel structure above the roller conveyor" is retained, but the camera installation angle is adjusted from "vertically downward" to "tilted 15° towards the center line of the roller conveyor" to avoid edge blurring caused by reflection on the billet surface; at the same height as the billet on the side of the roller conveyor, the original "single high-brightness supplementary light" is replaced with a "dual-path pulse synchronous supplementary light group" (30W power per path, surface-mount LED, 45° beam angle), which shines obliquely from 30° above and 30° below the billet side, respectively, to "enhance the edge contour of the billet through light and dark contrast"; Protective structure adapted for edge acquisition: All camera equipment retains the original "double-layer stainless steel air curtain dust removal cylinder (outer diameter 130mm, length 250mm)", but adds a "detachable polarizing filter" at the front end of the cylinder - to filter stray light from the metal surface of the roller conveyor and the billet, further improving edge clarity. The original solution did not have this structure. 1.2 Edge Feature Specific Calibration: Edge pixel - actual size calibration: A rectangular calibration block with "1mm interval scale lines" (size matches the billet cross section, 150mm×180mm) is used and fixed at different positions on the roller conveyor (head, middle, tail). After acquiring the image of the calibration block, the pixel coordinates of the scale line edge are extracted, and a mapping relationship of "edge pixel spacing - actual physical spacing" is established (e.g., 10 pixels correspond to 1mm). An "edge size correction coefficient" is generated to solve the problem of the original solution "only calibrating coordinate transformation, without calibrating edge size". Dynamic vibration edge offset calibration: A "high-frequency vibration sensor (sampling rate 2kHz, higher than the original 1kHz)" is installed on the roller conveyor to simulate the vibration state when the billet moves at speeds of 0.5m / s, 1m / s, and 2m / s. Edge images of the calibration block under different vibration conditions are collected, the offset of edge pixels is recorded, and a "vibration frequency - edge offset" compensation model is established for subsequent edge coordinate correction. Light and shadow interference edge threshold calibration: By simulating scenarios such as "crane shadow (30% occlusion area) and roof light leakage (60° strong light angle)" with adjustable light source, the edge images of the billet under different light and shadow are collected to determine the "effective threshold range" of edge pixel gray level difference and generate a "light and shadow intensity - edge threshold" correspondence table to provide a basis for dynamic threshold segmentation; Step 2: Dynamic triggering and synchronous image acquisition of billets: 2.1 Triggered by two conditions: An infrared beam sensor is added at the roller conveyor entrance (2m in front of the detection area). When the infrared beam sensor detects the billet obstruction (for 200ms) and the network camera above recognizes the "rectangular outline that conforms to the billet cross section of 150~180mm" for 3 consecutive frames, a trigger signal is sent to the vision AI controller to avoid missed triggering due to light and shadow interference from a single vision trigger. 2.2 Simultaneous image acquisition by multiple devices: Trigger signal synchronous start: ① Two network cameras above (frame rate increased from the original 30fps to 60fps, exposure time per frame controlled at 10ms to avoid edge ghosting caused by billet movement); ② Side industrial camera (frame rate 60fps, synchronized with the supplementary lighting group); ③ Dual-channel pulse supplementary lighting group (pulse frequency 60Hz, fully synchronized with the camera frame rate, supplementary lighting is turned on when each frame of image is exposed, with no light and shadow flicker); Image data transmission: The "priority transmission protocol" is adopted to transmit the edge image (high priority) of the side industrial camera and the upper surface image (second highest priority) of the network camera above to the visual AI controller through the original "gigabit PoE switch" to ensure that the edge image transmission latency is ≤50ms; Step 3: Edge enhancement preprocessing: 3.1 Dynamic threshold segmentation: Based on the "light intensity - edge threshold" correspondence table in step 1.2, the average gray value of each frame image is analyzed in real time (e.g., an average gray value of 200 corresponds to a strong light scene, with a threshold of 80; an average gray value of 80 corresponds to a shadow scene, with a threshold of 40). The "Otsu adaptive threshold algorithm" is used to dynamically adjust the segmentation threshold to separate the billet area from the background (roller conveyor, dust) and ensure complete extraction of the edge area. 3.2 Edge Enhancement Filtering: For the segmented billet image, the Gaussian-Laplacian operator (LoG) is used for convolution operation. First, the image is smoothed by a 5×5 Gaussian filter (to eliminate noise points caused by dust), and then the pixel gray-level change rate is calculated by the Laplacian operator to highlight the gray-level gradient of the billet edge (the gray-level difference of edge pixels is increased from ≥50 in the original scheme to ≥60), forming an "edge-enhanced image" to provide clear features for subsequent edge detection. 3.3 False Edge Removal: The edge enhancement image is processed using "morphological opening operation (3×3 rectangular structuring element)" to remove "short pseudo-edges" (edge segments with a length of < 5 pixels) caused by dust and roller scratches; then, through "edge continuity judgment" (the distance between adjacent edge pixels is ≤ 2 pixels to be continuous), the complete edges of the upper and side surfaces of the billet are preserved, and a "clean edge image" is output. Step 4: Edge detection and dynamic verification: 4.1 Canny Edge Detection: The Canny algorithm is applied to the "clean edge image": ① Further denoising is performed using a 5×5 Gaussian filter; ② The image gradient (horizontal and vertical directions) is calculated to determine the edge direction; ③ Non-maximum suppression is used to remove non-edge pixels and retain the edge center line; ④ Double threshold detection is performed using the "edge threshold range (40~80)" calibrated in step 1.2 to extract "strong edges (gray level difference ≥60)" and "weak edges (gray level difference 40~60)", and the edges are completed by "connectivity between weak edges and strong edges", and finally the "square blank edge pixel coordinate sequence" is output. 4.2 Edge Dynamic Validation: Cross-sectional dimension verification: Based on the specifications of 150~180mm for the square billet cross-section, calculate the vertical distance (actual height) between the upper and lower edges of the side surface and the horizontal distance (actual width) between the two sides of the upper surface. If the dimensions are within the range of 145~185mm (allowing ±5mm error), the edge is considered valid; otherwise, it is considered "edge extraction abnormal" and triggers re-image acquisition. Edge continuity verification: For the coordinate sequence of each edge segment, calculate the Euclidean distance between adjacent coordinate points. If the distance between 3 consecutive points is greater than 5 pixels (corresponding to 1mm in reality), it is judged as "edge break". The coordinates of the break are supplemented by "linear interpolation". If the break length is greater than 20 pixels, it is judged as "image acquisition abnormality". A signal is sent to the supplementary lighting group to adjust the brightness and then re-acquire the image. Step 5: Piecewise fitting of edge coordinates and calculation of bent steel: 5.1 Edge coordinate segmentation: The billet length (X-axis) is divided into segments of 150mm each (the original solution was 100mm each, balancing accuracy and efficiency). The Z-axis coordinates (vertical direction) of the upper surface edge and the Y-axis coordinates (horizontal direction) of the side surface edge within each segment are extracted separately to form a "segmented edge coordinate subset" (60~100 segments in total, covering billets of 9~15m). Compared with the original solution of "overall fitting", segmented processing can accurately capture small local bends in the billet. 5.2 Piecewise Linear Fitting and Bending Steel Calculation: Calculation of vertical bending of steel: Perform linear fitting on the subset of "XZ" coordinates of each upper surface edge to obtain the fitted line equation for each segment \(Z_i = k_iX + b_i\) (i is the segment number); Calculate the "slope deviation" (slope difference between two adjacent segments \(\Delta k = |k_{i+1}- k_i|\)) of all piecewise fitted straight lines. If \(\Delta k > 0.005\) (corresponding to an offset of 5mm per meter in the vertical direction), mark the area as a "potential bending steel segment". For all coordinate points of the potential bent steel segment, fit an overall quadratic curve \(Z = a_1X 2 + b_1X + c_1\), calculate the vertical distance between the highest point of the curve and the line connecting the two ends of the billet, which is the "vertical bending arc height"; Calculation of horizontal bending of steel: Similarly, a linear fit is performed on the subset of "XY" coordinates of each side surface edge to obtain \(Y_i = m_iX + n_i\); Calculate the slope difference between adjacent segments \(\Delta m = |m_{i+1} - m_i|\). If \(\Delta m > 0.01\) (corresponding to a horizontal offset of 10mm per meter), mark the potential bent steel segment. Fit a quadratic curve to the potential bent steel segment\(Y = a_2X) 2 + b_2X + c_2\) calculates the horizontal distance between the line connecting the point of maximum offset of the curve and the two endpoints, which is the "horizontal bending arc height" (accuracy ≤18mm). Step 6: Bending steel judgment, intelligent output and edge quality feedback: 6.1 Judgment of multi-level bending steel: Preset three threshold levels: ① Warning threshold (vertical arc height 8~10mm, horizontal arc height 16~18mm); HMI prompts only; ② Alarm thresholds (vertical arc height 10~12mm, horizontal arc height 18~20mm); ③ Trigger audible and visual alarms; ③ Emergency thresholds (vertical arc height > 12mm, horizontal arc height > 20mm) trigger the roller conveyor to stop; 6.2 Intelligent Output and Edge Quality Feedback: Data output: The original scheme of "transmitting billet ID, inspection time, arc height, and judgment result to the L2 system" is retained; HMI visualization optimization: In addition to the original solution's "real-time images and detection results"; Edge quality feedback: If the edge sharpness is less than 80% (based on grayscale difference) or the number of breaks is greater than 5, the "fill light brightness adjustment" (such as increasing the fill light power from 30W to 40W in shadow scenes) or "camera exposure time correction" (adjusting from 10ms to 15ms) will be automatically triggered without manual intervention; Furthermore, this method improves environmental adaptability and solves problems related to reflections and light spots. Through the optimized combination of "tilted camera mounting + dual-path oblique illumination + polarizing filter," it thoroughly improves the edge extraction environment. The camera is installed at a 15° angle towards the center line of the roller conveyor to avoid reflections on the billet surface when shooting vertically, reducing the edge reflection blur rate from 20% in the original solution to below 5%; the dual-path pulse supplementary light group (30° side-up and 30° side-down oblique illumination) enhances the edges through light and dark contrast, replacing the original direct supplementary light, reducing the problem of light spots obscuring the edges by 90%; Furthermore, this method enhances calibration accuracy, compensates for edge dimensions and vibration offsets, and fills the gap in the original scheme that "only calibrates coordinates and does not calibrate edges" through "edge feature-specific calibration." "Edge Pixel - Actual Size Calibration" establishes a mapping relationship between 1mm scale lines and pixels, generates correction coefficients, and reduces the edge size measurement error from 5% in the original scheme to within 1%. The compensation model established by the "Dynamic Vibration Edge Offset Calibration" (2kHz high-frequency sensor) can correct the edge offset at different moving speeds in real time (e.g., the offset is reduced from 2 pixels to 0.5 pixels at 2m / s), and the vibration interference error of vertical arc height measurement is reduced from 15mm to less than 3mm, laying the foundation for high-precision detection. Furthermore, this method improves trigger reliability and data synchronization, ensures real-time detection, and optimizes the "dual-condition triggering + synchronous image acquisition + priority transmission" mechanism to solve the problems of missed triggering and data delay in the original scheme. "Infrared beam + visual dual-condition triggering" (infrared occlusion 200ms + 3 frames visual recognition) reduces the missed trigger rate from 3% in the original solution to less than 1%, avoiding missed detection of billets due to light and shadow interference; The camera frame rate is increased to 60fps (10ms exposure), and the supplementary light is synchronized with the frame rate (60Hz pulse), eliminating edge shadows caused by billet movement; the "edge image priority transmission" design makes the transmission delay ≤50ms, which is 50% shorter than the original solution (100ms), ensuring that the detection results are output within 2.5 seconds, matching the conveyor speed of 0~2m / s. Furthermore, this method optimizes the edge processing workflow, improving the quality and speed of edge extraction. Through a comprehensive optimization of the entire process—"dynamic thresholding + edge enhancement + pseudo-edge removal + Canny algorithm"—it solves the problems of edge loss, numerous pseudo-edges, and slow processing in the original solution. Dynamic threshold segmentation (Otsu algorithm + light and shadow threshold table) reduces the edge loss rate in shadow scenes from 15% to 3%, significantly improving the integrity of edge extraction; The Gaussian-Laplace operator enhances the edge grayscale gradient (grayscale difference ≥ 60), and combined with morphological opening operations to remove short false edges, the misclassification rate caused by false edges is reduced from 8% to 2%; The original Pangu large model was replaced by the Canny edge detection algorithm, which reduced the single-frame edge processing time from 200ms to 50ms, reduced the computing power requirement by 75%, and had ≥1000 edge coordinate points, providing sufficient data support for subsequent fitting. Furthermore, this method accurately captures locally bent steel, improving measurement accuracy. It replaces the original "overall quadratic fitting" with "piecewise linear fitting + quadratic fitting," achieving precise detection of local micro-bending. By extracting edge coordinates in 150mm segments, local micro-bends within 200mm can be captured (which the original overall fitting could not identify). Potential bending steel segments are marked by the slope deviation between adjacent segments, and then a quadratic curve is fitted in a targeted manner. The accuracy of vertical arc height measurement is improved from 10mm to 9mm, horizontal arc height is improved from 20mm to 18mm, and the accuracy of bending steel judgment is improved from 90% to over 96%, reducing production accidents caused by missed local bending steel judgment. Furthermore, this method improves the judgment and feedback mechanism, reduces operation and maintenance costs, and enhances system operation and maintenance convenience and production safety through "multi-level bending steel judgment + edge quality feedback". The three-level threshold judgment (early warning - alarm - emergency shutdown) enables differentiated management and avoids excessive shutdowns caused by the original single alarm (such as early warning only being prompted by HMI, without the need for audible and visual alarms), thereby reducing unnecessary production interruptions.
[0024] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A real-time detection method for bent steel in billets using machine vision and edge feature analysis, comprising: step 1: equipment deployment and edge feature-specific calibration; step 2: billet dynamic triggering and synchronous image acquisition; step 3: edge enhancement preprocessing; step 4: edge detection and dynamic verification; step 5: edge coordinate segment fitting and bent steel calculation; and step 6: bent steel determination, intelligent output, and edge quality feedback, characterized in that: Step 1: Equipment Deployment and Edge Feature Specialized Calibration includes 1.1 Equipment Deployment and 1.2 Edge Feature Specialized Calibration; Step 2: Billet dynamic triggering and synchronous drawing acquisition includes 2.1 dual-condition arrival triggering and 2.2 multi-device synchronous drawing acquisition; Step 3: Edge enhancement preprocessing includes 3.1 dynamic threshold segmentation, 3.2 edge enhancement filtering, and 3.3 pseudo-edge removal; Step 4: Edge Detection and Dynamic Verification includes 4.1 Canny Edge Detection and 4.2 Dynamic Edge Verification; Step 5: Piecewise edge coordinate fitting and bending calculation includes 5.1 Piecewise edge coordinate fitting and 5.2 Piecewise linear fitting and bending calculation; Step 6: Bending steel determination, intelligent output and edge quality feedback includes 6.1 multi-level bending steel determination and 6.2 intelligent output and edge quality feedback.
2. The real-time detection method for bent square billets using machine vision and edge feature analysis according to claim 1, characterized in that: 1.1 Equipment Deployment: Optimized layout of vision equipment: The original plan of "installing two 8-megapixel high-definition network cameras (8m apart, covering 15m of roller conveyor) on a 6m steel structure above the roller conveyor" is retained, but the camera installation angle is adjusted from "vertically downward" to "tilted 15° towards the center line of the roller conveyor" to avoid edge blurring caused by reflection on the billet surface; at the same height as the billet on the side of the roller conveyor, the original "single high-brightness supplementary light" is replaced with a "dual-path pulse synchronous supplementary light group" (30W power per path, surface-mount LED, 45° beam angle), which shines obliquely from 30° above and 30° below the billet side, respectively, to "enhance the edge contour of the billet through light and dark contrast"; Protective structure adapted for edge acquisition: All camera equipment retains the original "double-layer stainless steel air curtain dust removal cylinder (outer diameter 130mm, length 250mm)", but a "detachable polarizing filter" is added to the front end of the cylinder - to filter stray light from the metal surface of the roller conveyor and the billet, further improving edge clarity. The original solution did not have this structure.
3. The real-time detection method for bent billet steel based on machine vision and edge feature analysis according to claim 1, characterized in that: The edge feature specific calibration described in section 1.2: Edge pixel - actual size calibration: A rectangular calibration block with "1mm interval scale lines" (size matches the cross-section of the billet, 150mm×180mm) is used and fixed at different positions on the roller conveyor (head, middle, tail). After acquiring the image of the calibration block, the pixel coordinates of the scale line edge are extracted, and a mapping relationship of "edge pixel spacing - actual physical spacing" is established (e.g., 10 pixels correspond to 1mm). An "edge size correction coefficient" is generated to solve the problem of the original solution "only calibrating coordinate transformation, without calibrating edge size". Dynamic vibration edge offset calibration: A high-frequency vibration sensor (sampling rate 2kHz, higher than the original 1kHz) is installed on the roller conveyor to simulate the vibration state when the billet moves at speeds of 0.5m / s, 1m / s, and 2m / s. Edge images of the calibration block under different vibration conditions are collected, the offset of edge pixels is recorded, and a "vibration frequency - edge offset" compensation model is established for subsequent edge coordinate correction. Light and shadow interference edge threshold calibration: By simulating scenarios such as "crane shadow (30% occlusion area) and roof light leakage (60° strong light illumination angle)" with adjustable light sources, the edge images of the billet under different light and shadow conditions are collected to determine the "effective threshold range" of edge pixel grayscale difference and generate a "light and shadow intensity - edge threshold" correspondence table to provide a basis for dynamic threshold segmentation.
4. The real-time detection method for bent billet steel based on machine vision and edge feature analysis according to claim 1, characterized in that: The above 2.1 dual-condition triggering: An infrared beam sensor is added at the roller conveyor entrance (2m in front of the detection area). When the infrared beam sensor detects the billet obstruction (for 200ms) and the network camera above recognizes the "rectangular outline that conforms to the billet cross section of 150~180mm" for 3 consecutive frames, a trigger signal is sent to the vision AI controller to avoid missed triggering due to light and shadow interference from a single vision trigger. 2.2 Simultaneous image acquisition by multiple devices: Trigger signal synchronous start: ① Two network cameras above (frame rate increased from the original 30fps to 60fps, exposure time per frame controlled at 10ms to avoid edge ghosting caused by billet movement); ② Side industrial camera (frame rate 60fps, synchronized with the supplementary lighting group); ③ Dual-channel pulse supplementary lighting group (pulse frequency 60Hz, fully synchronized with the camera frame rate, supplementary lighting is turned on when each frame of image is exposed, with no light and shadow flicker); Image data transmission: The "priority transmission protocol" is adopted to transmit the edge image (high priority) of the side industrial camera and the upper surface image (second highest priority) of the network camera above to the vision AI controller through the original "gigabit PoE switch" to ensure that the edge image transmission latency is ≤50ms.
5. The real-time detection method for bent square billets using machine vision and edge feature analysis according to claim 1, characterized in that: The dynamic threshold segmentation described in section 3.1: Based on the "light intensity - edge threshold" correspondence table in step 1.2, the average gray value of each frame image is analyzed in real time (e.g., an average gray value of 200 corresponds to a strong light scene, and the threshold is 80; an average gray value of 80 corresponds to a shadow scene, and the threshold is 40). The "Otsu adaptive threshold algorithm" is used to dynamically adjust the segmentation threshold to separate the billet area from the background (roller conveyor, dust) and ensure that the edge area is completely extracted. 3.2 Edge Enhancement Filtering: For the segmented billet image, the "Gaussian-Laplacian operator (LoG)" is used for convolution operation. First, the image is smoothed by a 5×5 Gaussian filter (to eliminate noise points caused by dust), and then the pixel gray-level change rate is calculated by the Laplacian operator to highlight the gray-level gradient of the billet edge (the gray-level difference of edge pixels is increased from ≥50 in the original scheme to ≥60), forming an "edge-enhanced image" to provide clear features for subsequent edge detection. 3.3 False Edge Removal: The edge enhancement image is processed using "morphological opening operation (3×3 rectangular structuring element)" to remove "short pseudo-edges" (edge segments with a length of < 5 pixels) caused by dust and roller scratches; then, through "edge continuity judgment" (the distance between adjacent edge pixels is ≤ 2 pixels to be continuous), the complete edges of the upper and side surfaces of the billet are preserved, and a "clean edge image" is output.
6. The real-time detection method for bent square billets using machine vision and edge feature analysis according to claim 1, characterized in that: The 4.1 Canny edge detection: The Canny algorithm is applied to the "clean edge image": ① Further denoising is performed using a 5×5 Gaussian filter; ② The image gradient (horizontal and vertical directions) is calculated to determine the edge direction; ③ Non-maximum suppression is used to remove non-edge pixels and retain the edge center line; ④ Double threshold detection is performed using the "edge threshold range (40~80)" calibrated in step 1.2 to extract "strong edges (gray level difference ≥60)" and "weak edges (gray level difference 40~60)", and the edges are completed by "connectivity between weak edges and strong edges", and finally the "square blank edge pixel coordinate sequence" is output. 4.2 Edge Dynamic Validation: Cross-sectional dimension verification: Based on the specifications of 150~180mm for the square billet cross-section, calculate the vertical distance (actual height) between the upper and lower edges of the side surface and the horizontal distance (actual width) between the two sides of the upper surface. If the dimensions are within the range of 145~185mm (allowing ±5mm error), the edge is considered valid; otherwise, it is considered "edge extraction abnormal" and triggers re-image acquisition. Edge continuity verification: For the coordinate sequence of each edge segment, calculate the Euclidean distance between adjacent coordinate points. If the distance between 3 consecutive points is greater than 5 pixels (corresponding to 1mm in reality), it is judged as "edge break". The coordinates of the break are supplemented by "linear interpolation". If the break length is greater than 20 pixels, it is judged as "image acquisition abnormality". A signal is sent to the supplementary light group to adjust the brightness and then re-acquire.
7. The real-time detection method for bent square billets using machine vision and edge feature analysis according to claim 1, characterized in that: The edge coordinate segmentation in section 5.1: The billet length direction (X-axis) is divided into segments of 150mm each (the original solution was 100mm each, balancing accuracy and efficiency). The Z-axis coordinates (vertical direction) of the upper surface edge and the Y-axis coordinates (horizontal direction) of the side surface edge within each segment are extracted separately to form a "segmented edge coordinate subset" (60~100 segments in total, covering billets of 9~15m). Compared with the original solution of "overall fitting", segmented processing can accurately capture small local bends in the billet.
8. The real-time detection method for bent square billets using machine vision and edge feature analysis according to claim 1, characterized in that: Section 5.2 Piecewise Linear Fitting and Bending Steel Calculation: Calculation of vertical bending of steel: Perform linear fitting on the subset of "XZ" coordinates of each upper surface edge to obtain the fitted line equation for each segment \(Z_i =k_iX + b_i\) (where i is the segment number); Calculate the "slope deviation" (slope difference between two adjacent segments \(\Delta k = |k_{i+1} -k_i|\)) of all piecewise fitted straight lines. If \(\Delta k > 0.005\) (corresponding to an offset of 5mm per meter in the vertical direction), mark the area as a "potential bending steel segment". For all coordinate points of the potential bent steel segment, fit an overall quadratic curve \(Z = a_1X 2 + b_1X + c_1\), calculate the vertical distance between the highest point of the curve and the line connecting the two ends of the billet, which is the "vertical bending arc height"; Calculation of horizontal bending of steel: Similarly, a linear fit is performed on the subset of "XY" coordinates of each side surface edge to obtain \(Y_i = m_iX + n_i\); Calculate the slope difference between adjacent segments \(\Delta m = |m_{i+1} - m_i|\). If \(\Delta m > 0.01\) (corresponding to a horizontal offset of 10mm per meter), mark the potential bent steel segment. Fit a quadratic curve to the potential bent steel segment\(Y = a_2X) 2 + b_2X + c_2\) calculates the horizontal distance between the line connecting the point of maximum offset of the curve and the two endpoints, which is the "horizontal bending arc height" (accuracy ≤18mm).
9. The real-time detection method for bent square billets using machine vision and edge feature analysis according to claim 1, characterized in that: The determination of multi-level bending steel as described in section 6.1: Preset three threshold levels: ① Warning threshold (vertical arc height 8~10mm, horizontal arc height 16~18mm); HMI prompts only; ② Alarm thresholds (vertical arc height 10~12mm, horizontal arc height 18~20mm); Trigger an audible and visual alarm; ③ Emergency threshold (vertical arc height > 12mm, horizontal arc height > 20mm) triggers the roller conveyor to stop.
10. The real-time detection method for bent square billet steel based on machine vision and edge feature analysis according to claim 1, characterized in that: Section 6.2 Intelligent Output and Edge Quality Feedback: Data output: The original scheme of "transmitting billet ID, inspection time, arc height, and judgment result to the L2 system" is retained; HMI visualization optimization: In addition to the original solution's "real-time images and detection results"; Edge quality feedback: If the edge sharpness is less than 80% (based on grayscale difference) or the number of breaks is greater than 5, the "fill light brightness adjustment" (such as increasing the fill light power from 30W to 40W in shadow scenes) or "camera exposure time correction" (adjusting from 10ms to 15ms) will be automatically triggered without manual intervention.