Method for detecting steel reinforcing elements based on machine vision

By using machine vision technology to process images of rebar units, the problems of low efficiency and poor accuracy of manual measurement are solved, and high-precision and fast rebar unit detection is achieved.

CN116823715BActive Publication Date: 2026-01-23CCCC SECOND HARBOR ENGINEERING CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310322449.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-01-23
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

Manually measuring the length and bending angle of reinforcing bars is labor-intensive, inefficient, and inaccurate, making it difficult to meet the needs of large-scale, high-precision testing in engineering projects.

Method used

Machine vision technology is used to acquire and process images of steel reinforcement units. Through steps such as distortion correction, perspective correction, and Zhang-Suen parallel fast skeletonization algorithm, the start and end points and inflection points of the steel reinforcement are identified, and the length and angle are calculated to achieve high-precision measurement.

Benefits of technology

It achieves high-precision measurement of rebar units, with a length error of ≤0.5mm and an angle error of ≤0.1°. The measurement time is short, and it can quickly detect the length and bending angle of a single rebar, making it suitable for mass production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116823715B_ABST
    Figure CN116823715B_ABST
Patent Text Reader

Abstract

The application provides a steel bar unit detection method based on machine vision, and the detection process is image acquisition, picture correction, feature recognition, data processing and result presentation. The adopted technologies are distortion correction, perspective correction, Zhang-Suen parallel fast skeletonization algorithm, screening of key points according to pixel features and probability Hough straight line detection. The detection device comprises a tripod, an industrial camera and a light supplement lamp. The application can quickly collect unit size information after steel bar unit processing and production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of steel bar unit size inspection, and in particular to a machine vision-based method for steel bar unit size inspection. Background Technology

[0002] After steel bars are processed and formed, the traditional method for checking their length and bending angle is to use a simple ruler and visual inspection. After marking the steel bar's projection, a protractor is used to measure the bending angle; a tape measure is used to measure the intersection of the two projections to obtain the length; and angle steel is used to make auxiliary fixtures to roughly determine whether there are significant manufacturing errors in the unit. This manual measurement method is labor-intensive, inefficient, and has poor inspection accuracy. Furthermore, it can only be used for small-batch sampling inspections, making it difficult to meet the needs of large-scale, high-precision steel bar inspection in engineering projects.

[0003] To reduce the number of personnel required for rebar inspection and improve inspection efficiency and accuracy, automated inspection processes are gradually being applied to rebar engineering. A machine vision-based method and device for inspecting the quality of rebar mesh in power utility tunnels (CN 105956942A) has been proposed. The device includes a telescopic tripod, a double-tube guide rail, a stepper motor, a level, and a pan-tilt unit equipped with an ultra-high-definition camera. It employs image stitching and Hough transform line detection techniques to count the number of rebars within a meter gauge. Edge extraction technology is used, and the least squares method is used to fit each rebar, calculating the spacing between adjacent rebars. The least squares method is then used to fit the double boundaries of each rebar to obtain its diameter. However, this device and technology cannot obtain the length and bending angle of a single rebar.

[0004] To check whether the installation dimensions and positions of reinforcing bars meet the drawing requirements, a reinforcing bar installation inspection method based on 3D laser scanning has been proposed (CN 115014198A). First, based on a BIM design model, measurement stations are planned using a line-of-sight detection algorithm. Then, a ground-based 3D laser scanner is used for scanning. The data obtained from each measurement station are coordinate-transformed and stitched together to form a complete reinforcing bar mesh. Based on the effective data range, the complete reinforcing bar mesh is divided into multiple measurement zones. Next, the point cloud data of the reinforcing bars in each measurement zone is analyzed separately, and the reinforcing bar models for each zone are reconstructed based on diameter, position, spacing, and protective layer thickness. Finally, the reinforcing bar models from each measurement zone are stitched together and integrated into a complete reinforcing bar mesh model. Finally, the actual reinforcing bar model is compared with the reinforcing bar BIM design model. This patent is mainly used to detect the installation accuracy of the reinforcing bar mesh, but it cannot accurately measure the length and bending angle of individual reinforcing bars. Summary of the Invention

[0005] The main objective of this invention is to provide a machine vision-based method for inspecting steel reinforcement units, which solves the problems of large workload, low efficiency, poor inspection accuracy, and the fact that manual measurement methods can only perform small-batch sampling inspections, making it difficult to meet the needs of large-scale, high-precision steel reinforcement inspection in engineering projects.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for detecting steel bar unit components based on machine vision, characterized in that: machine vision detects the steel bar length and the steel bar bending angle of the steel bar unit, firstly acquires an image of the steel bar to be measured, and then performs image correction on the acquired image to obtain a digital image of accurate measurement;

[0007] Further feature recognition is performed on the digital image to identify the start and end points of the reinforcing bars. The identified image is then processed, and the data annotation dimension information is mapped onto the outline of the reinforcing bars.

[0008] In the preferred scheme, the specific steps of the detection method are as follows:

[0009] S1. Image acquisition: Place the steel reinforcement unit on a solid color background with a large contrast to the steel reinforcement color, use lighting to supplement the light, and use an industrial camera to acquire images of the steel reinforcement body and its clear outline.

[0010] S2. Image Correction: Preprocessing digital images: First, distortion correction, then perspective correction, to convert the original digital image into a digital image that can be used for precise measurement;

[0011] S3. Feature Recognition: First, filter out the outline of the steel bars, then extract the skeleton to highlight the main shape information of the unit. Based on the Zhang-Suen parallel fast skeletonization algorithm: Erosion is performed on target pixels that meet specific conditions, and the process is iterated until no new pixels are eroded in the current round of operation after the previous erosion. The algorithm ends then.

[0012] Based on the skeleton map, extract the coordinates of the start and end points;

[0013] The actual rebar endpoint is located at D / 2 outside the triangular point. Once the coordinates of the triangular point and the straight line parameters are known, the start and end points of the rebar can be obtained. By traversing all pixels and filtering out all triangular points according to features, the rebar can be found.

[0014] Based on the skeleton map, extract the coordinates of the inflection points;

[0015] S5. Data processing: Connect key points sequentially, calculate angles and lengths of each segment, and correct the positions of the start and end points;

[0016] S6. Result Presentation: Based on the key point information, redraw the shape of the reinforcing bar, annotate the dimension information, and map it onto the reinforcing bar outline.

[0017] In the preferred scheme, the steps for extracting inflection point coordinates based on the skeletal diagram are as follows:

[0018] A1. Use the HoughLinesP algorithm for line detection;

[0019] A2. Specify any start or end point as the starting point;

[0020] A3. Calculate the coordinates of the centroid point O of the steel reinforcement skeleton;

[0021] A4. Connect O to the midpoint of each detected straight line, and calculate the angle by which OS rotates counterclockwise to the same direction as the straight line.

[0022] A5. Renumber all detected straight lines according to the ascending order of this angle value;

[0023] A6. Calculate the angle between the recompiled line i and i+1, set a threshold, and if the angle is greater than the threshold, consider that the steel bar has bent.

[0024] A7. For two adjacent straight lines that are identified as having a bend, calculate the coordinates of the intersection point;

[0025] A8. Determine whether the re-edited line #1 passes through the starting point. If not, swap the starting and ending points.

[0026] In the preferred scheme, the specific steps of the Zhang-Suen parallel fast skeletonization algorithm are as follows:

[0027] B1. The middle of the 8-neighborhood of a pixel is P1, and the top of P1 is P2. The remaining pixels are arranged clockwise.

[0028] B2. Loop through all foreground pixels and mark the pixels to be deleted according to the following conditions, where the grayscale value is 0;

[0029] A.2≤N(pl)≤6, the number of target pixels with a grayscale value of 1 around the center pixel P1 is between 2 and 6;

[0030] For BS(P1) = 1, in the 8-neighborhood pixels, the number of times two adjacent pixels change from 0 to 1 in a clockwise direction is 1.

[0031] C.P2×P4×P6=0; P4×P6×P8=0;

[0032] B3. Conditions A and B are the same as B2, but condition C is different. Pixel P1 that meets the following conditions is marked for deletion:

[0033] P2×P4×P8=0,P2×P6×P8=0

[0034] Repeat steps B3, B2, and B3 until there are no pixels left to "delete" in the image. The output is the image after refining the rebar target.

[0035] In the preferred scheme, the specific method for determining the start and end points of the reinforcing bars after obtaining the coordinates of the three-way intersection and the straight line parameters is as follows:

[0036] The center of the 8-neighborhood of a pixel is d0, and the remaining pixels are arranged clockwise from d1 to d8.

[0037] After binarization, the foreground pixel value is 1 and the background pixel value is 0. Therefore, the T value corresponding to each foreground pixel in the image is:

[0038]

[0039] Wherein: where, d i (i = 1, 2, 8) represents the value at the i-th pixel. When there are three pixels with a value of 1 in the outer ring of d0 in the 8-neighborhood, it is a triangular feature.

[0040] When there are two pixels with a value of 1 in the outer ring of d0 in the 8-neighborhood, it is a point feature on a straight line;

[0041] An endpoint feature is defined as a pixel with a value of 1 on the outer edge of d0 in an 8-neighborhood.

[0042] This invention provides a machine vision-based method for detecting steel reinforcement unit components, which has the following advantages:

[0043] 1. High measurement accuracy: length ≤ 0.5mm, angle ≤ 0.1°;

[0044] 2. The measurement method is simple and easy to operate, and the measurement time is short, with a single unit component measurement time of no more than 1 second;

[0045] 3. The measured actual length and angle can be displayed on the interface, and can be compared and analyzed with theoretical parameters, showing the length deviation and angle deviation;

[0046] 4. When the deviation exceeds the predetermined range, the system can issue an alarm, thereby allowing for real-time adjustments at the processing site and effectively ensuring the processing quality of the reinforcing bars. Attached Figure Description

[0047] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0048] Figure 1 This invention relates to a machine vision-based inspection process for steel reinforcement unit components.

[0049] Figure 2 This is a schematic diagram of image acquisition according to the present invention;

[0050] Figure 3 This is a single-pixel skeleton extraction image of the present invention;

[0051] Figure 4 This is a schematic diagram of the skeleton mapping onto the steel reinforcement outline of the present invention;

[0052] Figure 5 This is the key pixel feature map of the present invention;

[0053] Figure 6 This is a diagram showing the key information points of the reinforcing bars in this invention;

[0054] Figure 7 This is a machine vision measured dimension diagram of the present invention.

[0055] In the picture: 1. Fill light; 2. Industrial camera; 3. Rebar to be tested. Detailed Implementation

[0056] like Figures 1-7 As shown, a machine vision-based method for detecting rebar unit components is characterized by: machine vision detecting the length and bending angle of the rebar unit; first, acquiring an image of the rebar to be tested (3); then, performing image correction on the acquired image to obtain a precisely measured digital image; further feature recognition on the digital image to identify the start and end points of the rebar; then, data processing on the identified image, and mapping the data-annotated dimensional information onto the rebar outline. The detection process includes image acquisition, image correction, feature recognition, data processing, and result presentation, as illustrated in the flowchart below. Figure 1 As shown. The technologies employed include distortion correction, perspective correction, Zhang-Suen parallel fast skeletalization algorithm, key point selection based on pixel features, and probabilistic Hough line detection. The detection device includes a tripod, an industrial camera, and supplementary lighting. This invention enables rapid collection of dimensional information for steel rebar units after processing and production. It allows for high-precision measurement of the length and bending angle of steel rebar units, achieving large-scale, high-efficiency, and high-precision detection of steel rebar units.

[0057] In the preferred scheme, the specific steps of the detection method are as follows:

[0058] S1. Image acquisition: Place the steel reinforcement unit on a solid color background with a large contrast to the steel reinforcement color, use lighting to supplement the light, and use industrial camera 2 to acquire images of the steel reinforcement body and its clear outline.

[0059] S2. Image Correction: Preprocessing digital images: First, distortion correction, then perspective correction, to convert the original digital image into a digital image that can be used for precise measurement;

[0060] S3. Feature Recognition: First, filter out the outline of the steel bars, then extract the skeleton to highlight the main shape information of the unit. Based on the Zhang-Suen parallel fast skeletonization algorithm: Erosion is performed on target pixels that meet specific conditions, and the process is iterated until no new pixels are eroded in the current round of operation after the previous erosion. The algorithm ends then.

[0061] Based on the skeleton map, extract the coordinates of the start and end points;

[0062] The actual rebar endpoint is located at D / 2 outside the triangular point. Once the coordinates of the triangular point and the straight line parameters are known, the start and end points of the rebar can be obtained. By traversing all pixels and filtering out all triangular points according to features, the rebar can be found.

[0063] Based on the skeleton map, extract the coordinates of the inflection points;

[0064] The triangular point feature is extracted based on image thinning. The extracted triangular point information is actually a collection of multiple adjacent feature points of the same type. When extracting directional information, these points need to be clustered into a single point.

[0065] This paper selects three consecutive frames from a video for processing to obtain a binary image that meets the requirements. Specifically, it takes three adjacent frames, calculates the difference between the two preceding and following frames and the middle frame, and then performs a bitwise AND operation on these two differences to obtain the moving target information. This paper uses the initial frames of the video as a temporary "template," and periodically selects video frames in the video sequence that are close to the template to update the template as time progresses. This allows the background template to adapt to various changes and interferences in the scene, improving the accuracy of detection.

[0066] S5. Data processing: Connect key points sequentially, calculate angles and lengths of each segment, and correct the positions of the start and end points;

[0067] S6. Result Presentation: Based on the key point information, redraw the shape of the reinforcing bar, annotate the dimension information, and map it onto the reinforcing bar outline.

[0068] In the preferred scheme, the steps for extracting inflection point coordinates based on the skeletal diagram are as follows:

[0069] A1. Use the HoughLinesP algorithm for line detection;

[0070] A2. Specify any start or end point as the starting point;

[0071] A3. Calculate the coordinates of the centroid point O of the steel reinforcement skeleton;

[0072] A4. Connect O to the midpoint of each detected straight line, and calculate the angle by which OS rotates counterclockwise to the same direction as the straight line.

[0073] A5. Renumber all detected straight lines according to the ascending order of this angle value;

[0074] A6. Calculate the angle between the recompiled line i and i+1, set a threshold, and if the angle is greater than the threshold, consider that the steel bar has bent.

[0075] A7. For two adjacent straight lines that are identified as having a bend, calculate the coordinates of the intersection point;

[0076] A8. Determine whether the re-edited line #1 passes through the starting point. If not, swap the starting and ending points.

[0077] In the preferred scheme, the specific steps of the Zhang-Suen parallel fast skeletonization algorithm are as follows:

[0078] B1. The middle of the 8-neighborhood of a pixel is P1, and the top of P1 is P2. The remaining pixels are arranged clockwise.

[0079] B2. Loop through all foreground pixels and mark the pixels to be deleted according to the following conditions, where the grayscale value is 0;

[0080] A.2≤N(pl)≤6, the number of target pixels with a grayscale value of 1 around the center pixel P1 is between 2 and 6;

[0081] For BS(P1) = 1, in the 8-neighborhood pixels, the number of times two adjacent pixels change from 0 to 1 in a clockwise direction is 1.

[0082] C.P2×P4×P6=0; P4×P6×P8=0;

[0083] B3. Conditions A and B are the same as B2, but condition C is different. Pixel P1 that meets the following conditions is marked for deletion:

[0084] P2×P4×P8=0,P2×P6×P8=0

[0085] B3, looping through B2 and B3 until no pixels can be "deleted" in the image, the output is the refined image of the rebar target. In the experiment, after a series of processing steps on the original video, a noise-removed binary image and a skeletalized image of the rebar unit target can be obtained. The cvContourArea function is used to draw and calculate the approximate outline of the rebar unit. In the original video frame, according to the condition M:2≤p2+p3+p4+p5+p6+p7+p8+p9≤6, the method of finding endpoints and intersections from the filtered skeletalized image is used to mark the feature points cv::Point that meet the conditions with circles, and the coordinates C(z,y) of these feature points are obtained. The feature points are counted and normalized to obtain four points with the largest azimuth offsets: Co(x,y), C,rlght(x,y), Cuottom(x,y), and Cra(x,y). Under normal circumstances, these four feature points can be roughly considered to represent the coordinates of the two endpoints and corner positions of the target rebar unit, respectively, based on the degree of difference in the coordinates of these four feature points.

[0086] In the preferred scheme, the specific method for determining the start and end points of the reinforcing bars after obtaining the coordinates of the three-way intersection and the straight line parameters is as follows:

[0087] The center of the 8-neighborhood of a pixel is d0, and the remaining pixels are arranged clockwise from d1 to d8.

[0088] After binarization, the foreground pixel value is 1 and the background pixel value is 0. Therefore, the T value corresponding to each foreground pixel in the image is:

[0089]

[0090] Wherein: where, d i (i = 1, 2, 8) represents the value at the i-th pixel. When there are three pixels with a value of 1 in the outer ring of d0 in the 8-neighborhood, it is a triangular feature.

[0091] When there are two pixels with a value of 1 in the outer ring of d0 in the 8-neighborhood, it is a point feature on a straight line;

[0092] An endpoint feature is defined as a pixel with a value of 1 on the outer edge of d0 in an 8-neighborhood.

[0093] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.

Claims

1. A machine vision-based method for detecting steel reinforcement unit components, characterized by: Machine vision detects the length of steel bars and the bending angle of steel bars in steel bar units. First, it acquires the image of the steel bar to be measured (3), and then performs image correction on the acquired image to obtain a digital image of accurate measurement. Further feature recognition is performed on the digital image to identify the start and end points of the reinforcing bars. The identified image is then processed, and the data annotation dimension information is mapped onto the outline of the reinforcing bars. The specific steps of the detection method are as follows: S1. Image acquisition: Place the steel reinforcement unit on a solid color background with a large contrast to the steel reinforcement color, use lighting to supplement the light, and use an industrial camera (2) to acquire images of the steel reinforcement body and its clear outline. S2. Image Correction: Preprocessing digital images: First, distortion correction, then perspective correction, to convert the original digital image into a digital image that can be used for precise measurement; S3. Feature Recognition: First, filter out the outline of the steel bars, then extract the skeleton to highlight the main shape information of the unit. Based on the Zhang-Suen parallel fast skeletonization algorithm: Erosion is performed on target pixels that meet specific conditions, and the process is iterated until no new pixels are eroded in the current round of operation after the previous erosion. The algorithm ends then. Based on the skeleton map, extract the coordinates of the start and end points; The actual rebar endpoint is located at D / 2 outside the triangular point. Once the coordinates of the triangular point and the straight line parameters are known, the start and end points of the rebar can be obtained. By traversing all pixels and filtering out all triangular points according to features, the rebar can be found. Based on the skeleton map, extract the coordinates of the inflection points; S5. Data processing: Connect key points sequentially, calculate angles and lengths of each segment, and correct the positions of the start and end points; S6. Result Presentation: Based on the key point information, redraw the shape of the reinforcing bar, annotate the dimension information, and map it onto the reinforcing bar outline.

2. The method for detecting steel reinforcement unit components based on machine vision according to claim 1, characterized in that: Based on the skeleton map, the steps to extract the coordinates of the inflection points are as follows: A1. Use the HoughLinesP algorithm for line detection; A2. Specify any start or end point as the starting point; A3. Calculate the coordinates of the centroid point O of the steel reinforcement skeleton; A4. Connect O to the midpoint of each detected straight line, and calculate the angle by which OS rotates counterclockwise to the same direction as the straight line. A5. Renumber all detected straight lines according to the ascending order of this angle value; A6. Calculate the angle between the recompiled line i and i+1, set a threshold, and if the angle is greater than the threshold, consider that the steel bar has bent. A7. For two adjacent straight lines that are identified as having a bend, calculate the coordinates of the intersection point; A8. Determine whether the re-edited line #1 passes through the starting point. If not, swap the starting and ending points.

3. The method for detecting steel reinforcement unit components based on machine vision according to claim 1, characterized in that: The specific steps of Zhang-Suen's parallel fast skeletonization algorithm are as follows: B1. The middle of the 8-neighborhood of a pixel is P1, and the top of P1 is P2. The remaining pixels are arranged clockwise. B2. Loop through all foreground pixels and mark the pixels to be deleted according to the following conditions, where the grayscale value is 0; A.2≤N(pl)≤6, the number of target pixels with a grayscale value of 1 around the center pixel P1 is between 2 and 6; In the neighborhood of BS(P1) = 1, the number of times two adjacent pixels change from 0 to 1 in a clockwise direction is 1. C.P2 × P4 × P6=0; P4 ×P6 × P8=0; B3. Conditions A and B are the same as B2, but condition C is different. Pixel P1 that meets the following conditions is marked for deletion: P2 × P4 × P8=0, P2 × P6 × P8=0; Repeat steps B3, B2, and B3 until there are no pixels left to "delete" in the image. The output is the image after refining the rebar target.

4. The method for detecting steel reinforcement unit components based on machine vision according to claim 1, characterized in that: The specific method for determining the start and end points of the reinforcing bar after obtaining the coordinates of the triangular point and the straight line parameters is as follows: The center of the 8-neighborhood of a pixel is Arrange the remaining points clockwise. - ; After binarization, the foreground pixel value is 1 and the background pixel value is 0. Therefore, the T value corresponding to each foreground pixel in the image is: Among them: ( i = 1,2,8) represents the value at the i-th pixel, in the 8-neighborhood. A triangular feature is defined when the outer ring has three pixels with a value of 1. In the 8-neighborhood When the outer ring has two pixels with a value of 1, it represents a point feature on a straight line; In the 8-neighborhood An endpoint feature is defined as a pixel with a value of 1 on the outer edge.

Citation Information

Patent Citations

  • Detection method for quality of electric power pipe gallery reinforcing steel bar mesh based on machine vision and detection device

    CN105956942A

  • Steel bar installation detection method based on three-dimensional laser scanning

    CN115014198A

  • Line structured light based 360-degree profile measurement device and method

    CN107747914A

  • Welding groove size and welding gun relative pose high-precision detection method and device

    CN114792337A