Intelligent Detection Method and System for Reinforcing Steel Surface Defects Based on Machine Vision

By acquiring images of steel bar surfaces using industrial line scan cameras, performing directional texture enhancement and multi-dimensional feature extraction, and combining this with a predefined rule base to identify defects, the problem of missing minor scratches on high-speed production lines has been solved, achieving accurate detection and efficient quality supervision.

CN121458677BActive Publication Date: 2026-11-10ZHENGTONG CONSTR MANAGEMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511618472.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-11-10
Estimated Expiration
2045-11-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify minute scratches with low grayscale contrast that align with the grain direction on high-speed rebar production lines, resulting in a high rate of missed detections and impacting the quality and safety of rebar products.

Method used

An industrial linear array camera is used to acquire images of the steel bar surface. Through directional texture enhancement processing, defect candidate regions are segmented, multi-dimensional features are extracted, defects are identified with the help of a predefined rule base, quantitative indicators are generated, and control signals are output.

Benefits of technology

It enables precise detection of minute scratches on the surface of steel bars during high-speed production, significantly reducing the missed detection rate, improving the accuracy of quality control, and ensuring product quality and safety in use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121458677B_ABST
    Figure CN121458677B_ABST
Patent Text Reader

Abstract

This application belongs to the field of rebar defect detection technology, specifically providing a machine vision-based intelligent detection method and system for rebar surface defects. The method mainly includes: acquiring original images of the rebar surface synchronously captured by an industrial linear array camera; performing directional texture enhancement processing on the original rebar surface image to obtain a directionally enhanced image; performing defect candidate region segmentation based on the directionally enhanced image to obtain a connected region labeling map; performing multi-dimensional feature extraction and fusion on the connected region labeling map to generate a fused feature vector; and using a predefined rule base to identify defects in the fused feature vector to obtain a defect quantification index. This application achieves accurate detection of minute scratches on the rebar surface during high-speed production, significantly reducing the false negative rate, improving quality control accuracy, ensuring product quality and safety, and meeting the quality supervision needs of efficient production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of steel bar defect detection technology, and specifically relates to an intelligent detection method and system for steel bar surface defects based on machine vision. Background Technology

[0002] In the detection of surface defects of steel bars, traditional image processing methods such as fixed threshold segmentation and general edge detection are currently used, combined with feature extraction methods such as HOG and LBP. These technologies can achieve basic defect screening and meet general quality inspection needs in low-speed production or scenarios with obvious defect features.

[0003] However, on high-speed steel bar production lines, the rolling process often produces fine scratches on the surface of the steel bars that are highly consistent with the grain direction. These scratches are very similar to normal grain in terms of grayscale and contrast, and their shapes are similar. The traditional detection methods mentioned above are difficult to identify accurately, resulting in a high rate of missed detection of such minor defects in the steel bar quality control process. This seriously affects the overall quality of steel bar products and the safety of subsequent use. Summary of the Invention

[0004] This application provides a machine vision-based intelligent detection method and system for steel bar surface defects. It effectively solves the problem that traditional image processing methods and conventional feature extraction methods in the prior art are difficult to accurately identify minute scratches with consistent texture direction and small grayscale contrast differences in high-speed production lines, resulting in a high false negative rate. It achieves accurate detection of minute scratches on the surface of steel bars in high-speed production, significantly reduces the false negative rate, improves the accuracy of quality control, ensures product quality and safety of use, and adapts to the quality supervision needs of efficient production.

[0005] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, this application provides a machine vision-based intelligent detection method for surface defects in reinforcing bars, including: The original image of the steel bar surface is acquired synchronously by an industrial linear array camera, and the original image of the steel bar surface is processed by directional texture enhancement to obtain a directional enhanced image.

[0006] Based on the enhanced image, defect candidate region segmentation is performed to obtain a connected region labeling map.

[0007] Multi-dimensional feature extraction and fusion are performed on the connected region labeling map to generate a fused feature vector.

[0008] The fused feature vector is used to identify defects using a predefined rule base to obtain a defect quantification index.

[0009] The results of the aforementioned defect quantification indicators are integrated and confidence level assessed to generate structured defect records and quality statistical reports.

[0010] The structured defect records and quality statistics reports are output to generate sorting control signals.

[0011] Further, the original image of the rebar surface synchronously acquired by an industrial linear array camera is obtained, and the original image of the rebar surface is processed by directional texture enhancement to obtain a directional enhanced image, including: Acquire raw images of the steel reinforcement surface simultaneously captured by an industrial linear array camera.

[0012] The original image of the steel bar surface is processed using white balance correction based on the gray world hypothesis, and a color-constant image is output.

[0013] The color constant image is processed by guided filtering to obtain a texture smoothing image; wherein the color constant image itself is used as a guide map to smooth the texture in the same direction.

[0014] A directional filter designed along the steel bar rolling direction is applied to perform a convolution operation on the texture smoothing image to enhance the abnormal features perpendicular to this direction, resulting in the directionally enhanced image.

[0015] Further, defect candidate region segmentation is performed based on the directional enhancement image to obtain a connected component label map, including: The saliency of the directional enhancement image is calculated based on the local gray-level variance to generate a saliency map.

[0016] An adaptive threshold segmentation algorithm is used to process the saliency map and output a binarized candidate region mask; wherein, the adaptive threshold is dynamically determined according to the overall saliency distribution of the image.

[0017] A morphological closing operation is applied to the binarized candidate region mask to connect adjacent pixels and fill small holes, forming the connected region marker map.

[0018] Furthermore, multi-dimensional feature extraction and fusion are performed on the connected component labeling map to generate a fused feature vector, including: Based on the connected region labeling map, candidate region image blocks are extracted from the directional enhancement image to construct a candidate region image block set.

[0019] For each candidate region image patch, calculate its gray-level co-occurrence matrix, and extract contrast, correlation, and entropy attributes to construct a texture feature vector.

[0020] Extract the minimum bounding rectangle from each candidate region image block, calculate the aspect ratio of the rectangle and the ratio of the region area to the rectangle area, and generate a morphological feature vector.

[0021] The texture feature vector and morphological feature vector of the same candidate region are concatenated to obtain the fused feature vector.

[0022] Furthermore, using a predefined rule base, the fused feature vector is used to identify defects, resulting in a defect quantification index, including: The fused feature vector is input into a preset rule-based reasoning engine, which outputs preliminary true / false defect identifiers. The engine integrates logical conditions based on expert experience for judging the authenticity of defects.

[0023] For defects identified as true, their fused feature vectors are matched with the nearest neighbor of a predefined defect type feature template to obtain a preliminary defect type classification result.

[0024] Based on the classification results, the corresponding size measurement algorithm is invoked to calculate the actual physical length and width of the defect, thereby obtaining the defect quantification index.

[0025] Furthermore, the results of the aforementioned defect quantification indicators are integrated and confidence level assessed to generate structured defect records and quality statistical reports, including: Based on the aforementioned defect quantification indicators, determine whether the defect meets the physical constraints of that type of defect, complete the result verification, and obtain the final confirmed defect type and size.

[0026] The final confirmed defect type and size are bound to the corresponding rebar location code and inspection timestamp execution data to generate the structured defect record.

[0027] The structured defect records are statistically analyzed to calculate the defect rate of the current production batch and output a quality statistics report.

[0028] Furthermore, the structured defect records and quality statistical reports are output to generate sorting control signals, including: The structured defect records and quality statistical reports are converted into the standard format of industrial communication protocols to generate standardized output data.

[0029] The standardized output data is sent to the host computer quality management system and the on-site human-machine interface via industrial Ethernet to realize data reporting and display.

[0030] Based on the defect information in the standardized output data, equipment control instructions are generated to obtain the sorting control signal.

[0031] Furthermore, a directional filter kernel designed along the steel bar rolling direction is applied to perform a convolution operation on the texture smoothing image to enhance anomalous features perpendicular to this direction, resulting in the directionally enhanced image, including: The orientation angle of the filter core is determined based on the direction of steel bar rolling, and a directional filter core matrix is ​​constructed.

[0032] The texture-smoothed image is subjected to a two-dimensional convolution operation using the directional filter kernel matrix to obtain a preliminary response map.

[0033] The preliminary response map is subjected to nonlinear enhancement processing to suppress the texture response parallel to the rolling direction and enhance the abnormal feature response perpendicular to the rolling direction, resulting in an enhanced response map.

[0034] The pixel values ​​of the enhanced response map are mapped to a preset image intensity range.

[0035] The mapped image is then subjected to grayscale normalization to obtain the direction-enhanced image.

[0036] Further, a morphological closing operation is applied to the binarized candidate region mask to connect adjacent pixels and fill small holes, forming the connected region marker map, including: A circular structuring element is used to perform a dilation operation on the binarized candidate region mask, connecting adjacent pixels to form a dilated connected image.

[0037] The same circular structuring element is applied to the dilated connection image for erosion processing to fill the small holes, thus obtaining the connected region marker map.

[0038] Secondly, this application provides a machine vision-based intelligent detection system for surface defects in reinforcing bars, comprising: Image acquisition and enhancement module: acquires the original image of the steel bar surface synchronously acquired by an industrial linear scan camera, and obtains a directional enhanced image by performing directional texture enhancement processing on the original image of the steel bar surface.

[0039] Defect region segmentation module: Performs defect candidate region segmentation based on the directional enhancement image to obtain a connected region label map.

[0040] Feature extraction and fusion module: Performs multi-dimensional feature extraction and fusion on the connected region label map to generate a fused feature vector.

[0041] Defect identification and analysis module: Uses a predefined rule base to identify defects in the fused feature vector and obtains a defect quantification index.

[0042] Results Evaluation Report Module: Integrates and evaluates the results of the aforementioned defect quantification indicators to generate structured defect records and quality statistical reports.

[0043] Output control signal module: Outputs the results of the structured defect record and quality statistics report to generate sorting control signals.

[0044] Thirdly, this application provides a machine vision-based intelligent detection device for surface defects of reinforcing bars, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the steps of the machine vision-based intelligent detection method for surface defects of reinforcing bars.

[0045] Fourthly, this application provides a storage medium storing computer program instructions, which are read and executed by a processor to perform the steps of a machine vision-based intelligent detection method for surface defects in reinforcing bars.

[0046] Fifthly, this application provides a computer program product, including a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the steps of implementing a machine vision-based intelligent detection method for surface defects of reinforcing bars are implemented.

[0047] The beneficial effects of this application are: This application employs an industrial linear array camera to acquire raw images of the rebar surface, performs directional texture enhancement to obtain directional enhanced images, segments candidate defect regions to obtain connected region marker maps, extracts and fuses multi-dimensional features to generate vectors, identifies defect quantification indicators using a predefined rule base, and outputs recording and sorting control signals after integrated evaluation. This effectively solves the problem in existing technologies where traditional image processing methods and conventional feature extraction methods struggle to accurately identify minute scratches with consistent texture direction and small grayscale contrast differences in high-speed production lines, leading to high false negative rates. This application achieves accurate detection of minute scratches on the rebar surface during high-speed production, significantly reduces the false negative rate, improves quality control accuracy, ensures product quality and safety, and meets the quality supervision needs of efficient production.

[0048] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description and the accompanying drawings. Attached Figure Description

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

[0050] Figure 1 A flowchart illustrating the intelligent detection method for steel bar surface defects based on machine vision according to this application is shown. Figure 2A schematic diagram of the modules of the intelligent detection system for steel bar surface defects based on machine vision of this application is shown. Detailed Implementation

[0051] To address the problems raised in the background technology, this application employs an industrial linear array camera to acquire original images of the steel bar surface, performs directional texture enhancement to obtain directional enhanced images, then segments the defect candidate region to obtain a connected region marker map, extracts and fuses multi-dimensional features to generate vectors, uses a predefined rule base to identify defect quantification indicators, and outputs recording and sorting control signals after integrated evaluation.

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

[0053] In some embodiments, such as Figure 1 As shown, this application provides a machine vision-based intelligent detection method for surface defects in reinforcing bars, including: S1. Acquire the original image of the steel bar surface synchronously acquired by an industrial linear array camera, and obtain the directional enhanced image by directional texture enhancement processing of the original image of the steel bar surface.

[0054] S2. Perform defect candidate region segmentation based on the directional enhancement image to obtain a connected region label map.

[0055] S3. Perform multi-dimensional feature extraction and fusion on the connected component labeled graph to generate a fused feature vector.

[0056] S4. Use a predefined rule base to identify defects in the fused feature vectors and obtain defect quantification indicators.

[0057] S5. Integrate the results and conduct confidence assessments of the quantitative indicators of defects to form structured defect records and quality statistical reports.

[0058] S6. Output the results of the structured defect records and quality statistics reports to generate sorting control signals.

[0059] In some embodiments, S1, acquiring the original image of the rebar surface synchronously captured by an industrial linear array camera, and obtaining a directional enhanced image by directional texture enhancement processing of the original image of the rebar surface, includes: S11. Acquire the original image of the steel bar surface synchronously acquired by the industrial linear array camera.

[0060] An industrial linear array camera, synchronized with the rebar transmission speed, is used to acquire images, resulting in original images of the rebar surface that include its natural texture and potential defects.

[0061] S12. The original image of the steel reinforcement surface is processed by white balance correction based on the gray world hypothesis, and the color constant image is output.

[0062] By using white balance correction technology based on the gray-world hypothesis, the gain of the R, G, and B channels of the original image of the steel bar surface is adjusted to eliminate color cast and obtain a color constant image with stable color information.

[0063] S13. The color constant image is processed by guided filtering to obtain a texture smoothing image; wherein, the color constant image itself is used as the guide map to smooth the texture in the same direction.

[0064] Guided filtering is performed using a color constant image as the guide map to smooth the texture in the same direction as the rolling direction while preserving the edge features of the steel bars, resulting in a texture-smoothed image.

[0065] S14. Apply a directional filter designed along the steel bar rolling direction to perform convolution operation on the texture smooth image to enhance the abnormal features perpendicular to this direction, and obtain a directionally enhanced image.

[0066] In some embodiments, the directional filter designed along the steel bar rolling direction in S14 performs a convolution operation on the texture smoothing image to enhance anomalous features perpendicular to that direction, resulting in a directionally enhanced image, including: S141. Determine the orientation angle of the filter core based on the rolling direction of the steel bars, and construct a directional filter core matrix.

[0067] By analyzing the texture smoothing image, the main direction angle θ of the steel bar rolling texture is determined.

[0068] Setting the orientation angle α of the directional filter core to be equal to the angle θ of the steel bar rolling direction, i.e., α=θ, makes the filter weakest in response to features parallel to the rolling direction and strongest in response to features perpendicular to the rolling direction.

[0069] The directional filter kernel matrix K is constructed, with the core being a separable filter. It is generated by an outer product operation of a one-dimensional Gaussian smoothing kernel G and a one-dimensional difference operator D. The construction process can be represented as follows: ;in, This indicates the outer product operation.

[0070] The final matrix K is smoothed in the direction of angle α and the difference is calculated in the vertical direction (α+90°).

[0071] For example, if the rolling direction of the steel bar is the horizontal direction (θ=0°), the orientation angle α of the filter kernel is set to 0°, and a Gaussian kernel and a difference kernel D=[-1,0,1] are used to construct a kernel matrix K, where K is: .

[0072] S142. Perform a two-dimensional convolution operation on the texture-smoothed image using the directional filter kernel matrix to obtain an initial response map.

[0073] A standard two-dimensional convolution algorithm is used to perform a convolution operation on the directional filter kernel matrix and the texture-smoothed image, so as to obtain an initial response map containing the filtering response at each position.

[0074] S143. Perform a nonlinear enhancement process on the initial response map, suppress texture responses parallel to the rolling direction, and enhance abnormal feature responses perpendicular to the rolling direction, so as to obtain an enhanced response map.

[0075] The threshold T is dynamically determined according to the global statistical characteristics of the initial response map: ; where T represents the dynamic threshold, represents the mean value of all pixel values of the initial response map, represents the standard deviation of all pixel values of the initial response map, and c represents a constant multiplier, which can be determined based on Chebyshev's inequality to ensure that at least a specified proportion (e.g., 80%) of pixels are correctly classified as background texture.

[0076] The threshold T is used to distinguish background texture responses from potential defect feature responses: when |R(x,y)|<T, it is determined as a background texture response, and when , it is determined as a potential defect feature response; where represents the pixel value of the initial response map at the coordinate (x,y).

[0077] A piecewise nonlinear transformation is performed on the initial response map based on the threshold T to obtain an enhanced response map E, and the transformation rule is: if , then ; if , then ; where represents the pixel value of the enhanced response map at the coordinate (x,y), represents a suppression factor greater than 1, which is determined by testing the images of the verification set under different values and selecting the value that maximizes the contrast ratio between the defect area and the background area.

[0078] By substituting the value of each pixel in the initial response map R into the above function for calculation, the enhanced value E(x,y) at each corresponding position is obtained, and all these enhanced values together constitute the final enhanced response map E.

[0079] S144. Map the pixel values ​​of the enhanced response map to a preset image intensity range.

[0080] The pixel values ​​of the enhanced response map E are converted to the standard image intensity range [0, 255] using a linear mapping algorithm to obtain the mapped image.

[0081] S145. Perform grayscale normalization on the mapped image to obtain a direction-enhanced image.

[0082] The mapped image is processed using a normalization method, such as Z-score normalization, to obtain a final orientation-enhanced image that conforms to a standard normal distribution.

[0083] In some embodiments, S2 performs defect candidate region segmentation based on the orientation-enhanced image to obtain a connected component labeling map, including: S21. Calculate the saliency of the orientation-enhanced image based on the local gray-level variance and generate a saliency map.

[0084] Specifically, it includes the following steps: S211. Select a local window centered on the current pixel (x,y), with an odd window size, such as 5×5 or 7×7 pixels.

[0085] S212. For each pixel (x,y) in the orientation-enhanced image, execute S213 and S214.

[0086] S213. For the current pixel (x,y), calculate the variance of the gray values ​​of all pixels in its neighborhood window to obtain the significance value S(x,y) at coordinates (x,y).

[0087] S214. Each significance value S(x,y) is assigned to the pixel at the corresponding position (x,y) in the significance map S.

[0088] The saliency values ​​S(x,y) of all pixels constitute the saliency map S.

[0089] S22. An adaptive threshold segmentation algorithm is used to process the saliency map and output a binarized candidate region mask; wherein, the adaptive threshold is dynamically determined according to the overall saliency distribution of the image.

[0090] The adaptive threshold is calculated using the Otsu method. Iterate through all possible thresholds, calculate the inter-class variance between the foreground (assuming it's a defect region) and the background, and select the threshold that maximizes the inter-class variance as the adaptive threshold. Adaptive threshold It reflects the optimal separation point between the foreground and background in the current saliency map S.

[0091] For a pixel with coordinates (x, y) in the saliency map S: if its saliency value S(x, y) is greater than or equal to the adaptive threshold... In the binarized candidate region mask B, the pixel value B(x,y) at coordinates (x,y) is assigned a value of 1; if S(x,y) is less than If the value of B(x,y) is 0, then B(x,y) is assigned the value of 0; where B(x,y) represents the pixel value of the binary candidate region mask at coordinates (x,y).

[0092] The resulting image B is the binarized candidate region mask. Pixels with a value of 1 form the candidate defect region (foreground), and pixels with a value of 0 form the background region.

[0093] S23. Apply a morphological closing operation to the binarized candidate region mask, connect adjacent pixels and fill in small holes to form a connected region marker map.

[0094] In some embodiments, the morphological closing operation applied to the binarized candidate region mask in step S23, connecting adjacent pixels and filling small holes to form a connected region marker map, includes: S231. Perform dilation operation on the binarized candidate region mask using circular structuring elements, connect adjacent pixels, and form a dilated connected image.

[0095] A morphological dilation operation is performed on the binary image B using a predefined circular structuring element SE. The original foreground region is expanded outward, connecting previously adjacent but unconnected foreground pixels to obtain a dilated connected image. .

[0096] The element SE can be considered as a small binary template (such as a disk with a radius of 3 pixels). After its center point is aligned with each pixel of image B, if there is at least one foreground pixel within its coverage area, the pixel value at the corresponding center point position in the output image is set to 1.

[0097] S232. Apply the same circular structuring element to the dilated connection image for erosion processing to fill the small holes and obtain the connected region label map.

[0098] The dilated connection image is constructed using the exact same circular structuring element SE as S231. Perform morphological erosion operations to obtain the eroded image. .

[0099] For images Connectivity component analysis is performed, and a unique label is assigned to each independent foreground connected region, ultimately generating a connected region labeling map.

[0100] In some embodiments, S3 involves performing multi-dimensional feature extraction and fusion on the connected component labeling map to generate a fused feature vector, including: S31. Extract candidate region image patches from the orientation enhancement image based on the connected component labeling map, and construct a candidate region image patch set.

[0101] The connected component labeling map is analyzed to obtain each connected component with a unique label. Based on the pixel coordinates of each connected component in the image, the corresponding image region is extracted from the orientation-enhanced image.

[0102] The image data corresponding to each connected region constitutes a candidate region image block, and all extracted candidate region image blocks together form a candidate region image block set.

[0103] S32. For each candidate region image patch, calculate its gray-level co-occurrence matrix, and extract contrast, correlation and entropy attributes to construct a texture feature vector.

[0104] For each image patch in the candidate region image patch set, the gray-level co-occurrence matrix method is used for texture feature analysis.

[0105] Specifically, the gray-level co-occurrence matrix of the image is calculated based on the preset direction and distance, and three key texture features—contrast, correlation, and entropy—are extracted from the matrix.

[0106] Among them, contrast is used to measure the sharpness of an image and the depth of its texture grooves, correlation is used to measure the similarity of image textures in the row or column direction, and entropy is used to measure the complexity or irregularity of image textures.

[0107] The feature values ​​calculated from different directions are combined to construct a texture feature vector containing multiple texture attributes for each candidate region image patch; the combination can be performed by taking the mean or the maximum value.

[0108] S33. Extract the minimum bounding rectangle from each candidate region image block, calculate the aspect ratio of the rectangle and the ratio of the region area to the rectangle area, and generate a morphological feature vector.

[0109] For each binarized image patch in the candidate region image patch set, morphological analysis is performed. Specifically, the minimum bounding rectangle of the region is calculated, and the aspect ratio, region area, and area percentage are calculated to obtain a morphological feature vector containing the aspect ratio, region area, and area percentage.

[0110] S34. Concatenate the texture feature vector and morphological feature vector of the same candidate region to obtain the fused feature vector.

[0111] In some embodiments, step S4 involves using a predefined rule base to identify defects in the fused feature vector to obtain a defect quantification index, including: S41. Input the fused feature vector into the preset rule reasoning engine and output preliminary true and false defect identification; wherein, the engine integrates logical conditions based on expert experience for judging the authenticity of defects.

[0112] The rule-based reasoning engine predefines a series of logical judgment conditions summarized by domain experts, which directly affect each dimension of the fused feature vector.

[0113] For example, the rule could be: if the area of ​​the region is less than the area threshold. If the aspect ratio is greater than the aspect ratio threshold, it is identified as a false defect; And the area ratio is less than the density threshold. If the contrast is less than the contrast threshold, it is identified as a false defect. And the entropy is greater than the entropy threshold. If it is, it is marked as a false defect.

[0114] Among them, threshold The threshold is determined based on the pixel area corresponding to the minimum physical size of noise in practical applications. and The threshold is determined based on the statistical differences in morphology between real and spurious defects. and It can be determined based on the difference in texture characteristics between the background texture and the actual defect.

[0115] After the fused feature vector is input into the engine, it will be matched with all the rules in turn, and the output result is a preliminary true or false label for each candidate region.

[0116] S42. For defects that are identified as true, their fused feature vectors are matched with the nearest neighbor of the predefined defect type feature template to obtain the preliminary classification result of the defect type.

[0117] The predefined defect type feature template library stores feature vector templates for typical defects (such as cracks, scabs, scratches, etc.). .

[0118] For each fused feature vector identified as a true defect, calculate its relationship with each template in the template library. Euclidean distance , which represents the degree of difference between the current defect feature and the template of the k-th type of defect. The defect type corresponding to the template with the smallest distance is selected as the preliminary classification result.

[0119] S43. Based on the classification results, call the corresponding size measurement algorithm to calculate the actual physical length and width of the defect and obtain the defect quantification index.

[0120] Specifically, for linear defects, an algorithm based on the minimum bounding rectangle is invoked, with the length... Defined as the length of the longest side and the width of the smallest bounding rectangle. Defined as the length of the shorter side; for planar defects, an algorithm based on region area is used to estimate the equivalent length by converting the region area into a rectangle of equal area. and equivalent width Linear defects include cracks and scratches, while planar defects include scars and patches.

[0121] By multiplying by a pixel equivalent S determined in advance through camera calibration, the calculated pixel size is converted into the actual physical length and width: This yields a defect quantification index that includes both physical length and physical width; among which, Represents physical length. Represents the physical width.

[0122] In some embodiments, S5 integrates the results and performs confidence assessments on the quantitative indicators of defects to form structured defect records and quality statistical reports, including: S51. Determine whether the defect meets the physical constraints of the defect type based on the defect quantification index, complete the result verification, and obtain the final confirmed defect type and size.

[0123] The physical properties of the defects are used to perform a secondary verification of the preliminary classification results, ensuring their reasonableness. A predefined physical constraint library stores typical size ranges and non-compliance conditions for different types of defects based on materials science and production experience. For example, since the width of a true microcrack is usually extremely small, a width of 2.0 mm is more consistent with the characteristics of a macroscopic scratch. For a defect initially classified as a "crack", the physical constraint could be: if the physical width is greater than or equal to 2.0 mm, it is reclassified as a "scratch".

[0124] From a physics perspective, extremely small features have no engineering significance and may be false positives. For any defect, the physical constraint can be: if the physical length is less than 0.1 mm or the physical width is less than 0.05 mm, it is marked as an "invalid defect".

[0125] Only defects that pass all constraint checks will have their type and size finally confirmed, i.e., the final confirmed defect type and size will be obtained.

[0126] S52. Bind the finally confirmed defect type and size with the corresponding rebar location code and inspection timestamp execution data to generate a structured defect record.

[0127] The unique location code of the currently inspected steel bar obtained from the production line monitoring system and the current inspection timestamp of the system are associated with the finally confirmed defect type, physical length, physical width and other data to form a complete defect record, resulting in a structured defect record, which ensures the traceability of the data.

[0128] S53. Perform statistical analysis on structured defect records, calculate the defect rate of the current production batch, and output a quality statistical report.

[0129] Aggregate and analyze all structured defect records generated in the current production batch or within a specified time period to calculate the core indicator, the defect rate. ;in, Represents the defect rate. This represents the number of steel bars that have at least one confirmed defect. This represents the total number of steel bars inspected.

[0130] The report may also include defect type distribution, defect size distribution, trend analysis, etc., to provide a basis for decision-making in production quality management.

[0131] In some embodiments, S6 outputs the results of the structured defect record and quality statistics report to generate a sorting control signal, including: S61. Convert structured defect records and quality statistical reports into the standard format of industrial communication protocols to generate standardized output data.

[0132] S62. Standardized output data is sent to the host computer quality management system and the on-site human-machine interface via industrial Ethernet to realize data reporting and display.

[0133] The host computer quality management system is used for long-term data storage, in-depth analysis, and production report generation. The on-site human-machine interface is used to display information such as test results, current defect rate, and defect location on the on-site control screen in real time, providing operators with intuitive production status feedback.

[0134] S63. Generate equipment control instructions based on the defect information in the standardized output data to obtain sorting control signals.

[0135] The received standardized output data is parsed to extract key control information, mainly the rebar location code and its corresponding final confirmed defect type.

[0136] According to the preset sorting strategy, such as "all steel bars with crack defects need to be sorted out", when the system determines that the code of a steel bar is bound to the defect record and its defect type meets the sorting conditions, it will generate a corresponding control instruction. The instruction usually contains standardized signals of steel bar location code and action command.

[0137] Sorting control signals can be sent to sorting actuators on the production line, such as robotic arms, push rods, and marking devices, via industrial I / O modules or fieldbuses, triggering their actions to automatically remove defective products from the production line, thus achieving automated quality sorting based on vision inspection.

[0138] In some embodiments, such as Figure 2 As shown, this application provides a machine vision-based intelligent detection system for surface defects in reinforcing bars, comprising: Image acquisition and enhancement module: Acquires the original image of the steel bar surface synchronously acquired by the industrial linear scan camera, and obtains the directional enhanced image by directional texture enhancement processing of the original image of the steel bar surface.

[0139] Defect region segmentation module: Performs defect candidate region segmentation based on the directional enhancement image to obtain a connected region label map.

[0140] Feature extraction and fusion module: Performs multi-dimensional feature extraction and fusion on the connected component labeled map to generate a fused feature vector.

[0141] Defect identification and analysis module: Uses a predefined rule base to identify defects in the fused feature vectors and obtains quantitative indicators of defects.

[0142] Results Evaluation Report Module: Integrates and assesses the confidence level of quantitative defect indicators to generate structured defect records and quality statistical reports.

[0143] Output control signal module: Outputs the results of structured defect records and quality statistics reports to generate sorting control signals.

[0144] In some embodiments, this application provides a machine vision-based intelligent detection device for surface defects of reinforcing bars, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the steps of the machine vision-based intelligent detection method for surface defects of reinforcing bars.

[0145] In some embodiments, this application provides a storage medium storing computer program instructions, which are read and executed by a processor to perform the steps of a machine vision-based intelligent detection method for surface defects in reinforcing bars.

[0146] In some embodiments, this application provides a computer program product, including a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the steps of implementing a machine vision-based intelligent detection method for surface defects in reinforcing bars are provided.

[0147] Any references to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.

[0148] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0149] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A machine vision-based intelligent detection method for surface defects in reinforcing bars, characterized in that, include: The original image of the steel bar surface is acquired synchronously by an industrial linear array camera, and the original image of the steel bar surface is processed by directional texture enhancement to obtain a directional enhanced image; The process of obtaining the directional enhancement image includes: Acquire raw images of the steel reinforcement surface simultaneously captured by an industrial linear array camera; The original image of the steel bar surface is processed using white balance correction based on the gray world hypothesis, and a color-constant image is output. The color constant image is processed by guided filtering to obtain a texture smoothing image; wherein the color constant image itself is used as a guide map to smooth textures in the same direction. A directional filter designed along the steel bar rolling direction is applied to the texture smoothing image to perform a convolution operation, thereby enhancing the abnormal features perpendicular to this direction and obtaining the directionally enhanced image; Based on the directional enhancement image, defect candidate region segmentation is performed to obtain a connected region labeling map; Multi-dimensional feature extraction and fusion are performed on the connected component map to generate a fused feature vector; Defects are identified by using a predefined rule base to obtain a defect quantification index; The process of obtaining the defect quantification index includes: The fused feature vector is input into a preset rule-based reasoning engine, which outputs preliminary true / false defect identifiers; wherein, the engine integrates logical conditions based on expert experience for judging the authenticity of defects; For defects identified as true, their fused feature vectors are matched with the nearest neighbor of a predefined defect type feature template to obtain a preliminary defect type classification result. Based on the classification results, the corresponding size measurement algorithm is invoked to calculate the actual physical length and width of the defect, thereby obtaining the defect quantification index. The results of the aforementioned defect quantification indicators are integrated and confidence level assessed to generate structured defect records and quality statistical reports; The structured defect records and quality statistics reports are output to generate sorting control signals.

2. The intelligent detection method for steel bar surface defects based on machine vision according to claim 1, characterized in that, Based on the directional enhancement image, defect candidate region segmentation is performed to obtain a connected component labeling map, including: The saliency of the direction-enhanced image is calculated based on the local gray-level variance to generate a saliency map; An adaptive threshold segmentation algorithm is used to process the saliency map and output a binarized candidate region mask; wherein, the adaptive threshold is dynamically determined according to the overall saliency distribution of the image; A morphological closing operation is applied to the binarized candidate region mask to connect adjacent pixels and fill small holes, forming the connected region marker map.

3. The intelligent detection method for surface defects of reinforcing bars based on machine vision according to claim 1, characterized in that, Multi-dimensional feature extraction and fusion are performed on the connected component labeling map to generate a fused feature vector, including: Based on the connected component labeling map, candidate region image patches are extracted from the directional enhancement image to construct a candidate region image patch set; For each candidate region image patch, calculate its gray-level co-occurrence matrix, and extract contrast, correlation, and entropy attributes to construct a texture feature vector; Extract the minimum bounding rectangle from each candidate region image patch, calculate the rectangle's aspect ratio and the ratio of the region area to the rectangle area, and generate a morphological feature vector. The texture feature vector and morphological feature vector of the same candidate region are concatenated to obtain the fused feature vector.

4. The intelligent detection method for surface defects of reinforcing bars based on machine vision according to claim 1, characterized in that, The results of the aforementioned defect quantification indicators are integrated and confidence levels are assessed to generate structured defect records and quality statistical reports, including: Based on the aforementioned defect quantification indicators, determine whether the physical constraints of this type of defect are met, complete the result verification, and obtain the final confirmed defect type and size; The final confirmed defect type and size are bound to the corresponding rebar location code and inspection timestamp execution data to generate the structured defect record; The structured defect records are statistically analyzed to calculate the defect rate of the current production batch and output a quality statistics report.

5. The intelligent detection method for surface defects of reinforcing bars based on machine vision according to claim 1, characterized in that, The structured defect records and quality statistics reports are output to generate sorting control signals, including: The structured defect records and quality statistical reports are converted into the standard format of industrial communication protocols to generate standardized output data; The standardized output data is sent to the host computer quality management system and the on-site human-machine interface via industrial Ethernet to realize data reporting and display. Based on the defect information in the standardized output data, equipment control instructions are generated to obtain the sorting control signal.

6. The intelligent detection method for surface defects of reinforcing bars based on machine vision according to claim 1, characterized in that, A directional filter designed along the steel bar rolling direction is applied to the texture smoothing image to perform a convolution operation, enhancing anomalous features perpendicular to this direction, resulting in the directionally enhanced image, including: The orientation angle of the filter core is determined based on the direction of steel bar rolling, and a directional filter core matrix is ​​constructed. The texture-smoothed image is subjected to a two-dimensional convolution operation using the directional filter kernel matrix to obtain a preliminary response map; The preliminary response map is subjected to nonlinear enhancement processing to suppress the texture response parallel to the rolling direction and enhance the abnormal feature response perpendicular to the rolling direction, thus obtaining an enhanced response map. The pixel values ​​of the enhanced response map are mapped to a preset image intensity range; The mapped image is then subjected to grayscale normalization to obtain the direction-enhanced image.

7. The intelligent detection method for surface defects of reinforcing bars based on machine vision according to claim 2, characterized in that, A morphological closing operation is applied to the binarized candidate region mask to connect adjacent pixels and fill small holes, forming the connected region marker map, including: A circular structuring element is used to perform a dilation operation on the binarized candidate region mask, connecting adjacent pixels to form a dilated connected image. The same circular structuring element is applied to the dilated connection image for erosion processing to fill the small holes, thus obtaining the connected region marker map.

8. A machine vision-based intelligent detection system for surface defects in reinforcing bars, characterized in that, include: Image acquisition and enhancement module: acquires the original image of the steel bar surface synchronously acquired by an industrial linear array camera, and obtains a directional enhanced image by performing directional texture enhancement processing on the original image of the steel bar surface; The process of obtaining the directional enhancement image includes: Acquire raw images of the steel reinforcement surface simultaneously captured by an industrial linear array camera; The original image of the steel bar surface is processed using white balance correction based on the gray world hypothesis, and a color-constant image is output. The color constant image is processed by guided filtering to obtain a texture smoothing image; wherein the color constant image itself is used as a guide map to smooth textures in the same direction. A directional filter designed along the steel bar rolling direction is applied to the texture smoothing image to perform a convolution operation, thereby enhancing the abnormal features perpendicular to this direction and obtaining the directionally enhanced image; Defect region segmentation module: Performs defect candidate region segmentation based on the directional enhancement image to obtain a connected region label map; Feature extraction and fusion module: performs multi-dimensional feature extraction and fusion on the connected component map to generate a fused feature vector; Defect identification and analysis module: Uses a predefined rule base to identify defects in the fused feature vector and obtains defect quantification indicators; The process of obtaining the defect quantification index includes: The fused feature vector is input into a preset rule-based reasoning engine, which outputs preliminary true / false defect identifiers; wherein, the engine integrates logical conditions based on expert experience for judging the authenticity of defects; For defects identified as true, their fused feature vectors are matched with the nearest neighbor of a predefined defect type feature template to obtain a preliminary defect type classification result. Based on the classification results, the corresponding size measurement algorithm is invoked to calculate the actual physical length and width of the defect, thereby obtaining the defect quantification index. Results Evaluation Report Module: Performs results integration and confidence assessment on the aforementioned defect quantification indicators to generate structured defect records and quality statistical reports; Output control signal module: Outputs the results of the structured defect record and quality statistics report to generate sorting control signals.

Citation Information

Patent Citations

  • Deformed steel bar abnormity judgment method based on attention mechanism

    CN114998323A

  • Multi-field part size and appearance defect intelligent detection system

    CN120525832A