Reinforcement cage diameter and spacing on-line measurement method based on machine vision
The steel cage image is collected and image processing is performed by industrial cameras, and the diameter and spacing values are calculated in combination with the pixel-physical dimension conversion matrix, and the least squares method fitting is used to solve the problem of low measurement accuracy of steel cage diameter and spacing in the prior art, achieving high-precision online measurement, significantly improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202510077487.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-06-10
AI Technical Summary
The existing technology is difficult to achieve high-precision online measurement of the diameter and spacing of the steel cage. Traditional manual measurements are time-consuming and labor-intensive, with poor accuracy. The existing machine vision-based detection methods fail to directly calculate the spacing and diameter, so the accuracy cannot be guaranteed.
By using an industrial camera to acquire the rebar cage image, the camera's internal parameter matrix, external parameter matrix and distortion correction parameters are obtained, the rebar cage boundaries are extracted, the diameter and spacing values are calculated based on the pixel-physical dimension conversion matrix, and the measurement accuracy is improved through least squares fitting.
It achieves millimeter-level measurement accuracy, which is significantly better than the error range of traditional manual measurements, improves detection efficiency and accuracy, reduces system errors and random errors, and is suitable for steel cage measurement in complex construction site environments.
Smart Images

Figure CN120125640A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine vision measurement, and particularly relates to an on-line measurement method and device for the diameter and spacing of a steel reinforcement cage based on machine vision. Background Art
[0002] Currently, for the detection of the quality of steel bars at construction sites, vernier calipers or total stations are mainly used for detection. The detection process is time-consuming and laborious, and the construction site environment is complex, so only sampling and small-batch detection can be carried out. The detection efficiency and detection accuracy are both unsatisfactory, and the traditional manual detection method can no longer meet the actual detection requirements.
[0003] With the continuous improvement of digital technology and artificial intelligence level, automated detection technology has emerged to replace manual measurement. Machine vision measurement technology has been widely used in the field of construction engineering, but there are still many problems to be improved in the measurement of steel bar spacing and diameter at the construction site. In 2020, Wang Zhidan proposed a steel bar detection model based on small data in "Research on Steel Bar Detection Method Based on Small Data". Although computer vision technology is applied, it is only used for detecting the number of steel bars. The master's thesis of Jiangsu University of Science and Technology, "On-line Detection System for Welding Defects of Steel Bar Skeletons in Roll Welding Machines Based on Machine Vision", its main research field is welding defect detection, and the measurement method technology and application field are not the same as this topic. Shaanxi Ruihai Electric Power Engineering Co., Ltd. obtained the invention authorization of "Method and Detection Device for Quality Detection of Steel Bar Mesh in Power Pipe Gallery Based on Machine Vision" in 2016. This invention patent uses technologies such as image stitching and edge extraction, and through the least squares algorithm fitting, measures whether the quality of its steel bars meets the detection specifications and building safety specifications. The present invention develops an on-line machine vision measurement device that can measure the size and diameter of the steel reinforcement cage in real time, and realizes automatic extraction of the steel bar boundary and automatic measurement of the size.
[0004] The traditional method of on-site manual sampling measurement using vernier calipers and the like is time-consuming, laborious, has a high labor cost, poor accuracy, and low efficiency.
[0005] The existing applications of machine vision technology in the quality detection of steel reinforcement cages mostly focus on the detection of the number and defects of steel reinforcement cages, and do not involve the detection of the diameter and spacing of steel reinforcement cages.
[0006] There is an existing method for quality detection of steel bar mesh in power pipe gallery based on machine vision (Chinese invention patent CN105956942A). Its technical method is only to perform simple image processing and fitting on the photos taken by the camera, so as to determine whether its quality is qualified. It does not correct the internal and external parameters and distortion parameters of the camera through a calibration plate, and only ensures vertical shooting through a pan-tilt for the distortion during the shooting process. It does not directly calculate its spacing and diameter, and its accuracy cannot be guaranteed. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a high-precision online measurement method for the diameter and spacing of a steel reinforcement cage based on machine vision.
[0008] The present invention is implemented as follows: An online measurement method for the diameter and spacing of a steel reinforcement cage based on machine vision, comprising the following steps: Using an industrial camera to collect images of the steel reinforcement cage; Obtaining the internal parameter matrix, external parameter matrix and distortion correction parameters of the industrial camera by photographing calibration plates at different angles, for correcting the camera shooting error; Extracting the boundary of the steel reinforcement cage by performing image processing on the steel reinforcement cage image; Calculating the actual diameter and spacing values of the steel reinforcement cage according to the pixel size and the conversion matrix; Improving the measurement accuracy of the steel reinforcement cage by least squares fitting.
[0009] Further, the internal parameter matrix is used to describe the internal optical characteristics of the camera, including the focal length and the position of the principal point, and the calculation expression of the internal parameter matrix is: ; Where A is the internal parameter matrix, f x and f y are the focal lengths in the x-axis and y-axis directions respectively, and c x and c y are the positions of the image center point or principal point in the pixel coordinate system respectively.
[0010] Further, the external parameter matrix is obtained by measuring the distance between the camera and the calibration plate using a laser rangefinder, and the expression of the external parameter matrix is: ; Where B is the external parameter matrix, R is the camera rotation matrix, and T is the displacement vector.
[0011] Further, the distortion correction parameters are calculated by photographing calibration plates at different angles, and the distortion correction parameters are calculated according to the distortion model r 2 =x 2 +y 2 Calculated, ; ; Where k1, k2 are radial distortion parameters, p1, p2 are tangential distortion parameters, and r is the normalized radius of the point to the image center; x, y: are the normalized abscissa and ordinate of the image point without distortion in the ideal state respectively, and are obtained by converting the pixel coordinates to the camera normalized coordinate system based on the camera internal parameter matrix; , are the normalized horizontal and vertical coordinates of the points in the actual image, respectively.
[0012] Furthermore, the image processing includes noise reduction, contrast enhancement, segmentation and edge extraction.
[0013] Furthermore, the steps of image processing are: Step 1: Select at least one method of mean filtering, Gaussian filtering or median filtering in the software to reduce image noise; Step 2: Select at least one of the following methods in the software: histogram equalization, adaptive histogram equalization, or contrast stretching to enhance the image contrast; Step 3: Use Otsu threshold segmentation method to segment the steel cage to be tested; Step 4: Use the Sobel operator to detect and extract the edges of the steel cage in the image.
[0014] Furthermore, the actual diameter and spacing values of the steel cage are calculated according to the pixel size and the conversion matrix, specifically: For a given pixel coordinate (u, v), according to: ; ; Use the intrinsic and extrinsic matrix and the distortion coefficient to perform coordinate transformation, obtain the transformation matrix, and transform the normalized image coordinate system into the pixel coordinate system; The actual size of the steel cage diameter = the pixel size of the steel cage diameter × the conversion matrix, The actual size of the steel cage spacing = the pixel size of the steel cage spacing × the conversion matrix.
[0015] The advantages of the present invention are: 1. The present invention uses a calibration plate to accurately calibrate the internal and external parameters of the camera, and combines the application of a pixel-physical size conversion matrix to achieve millimeter-level measurement accuracy, which is significantly better than the error range of traditional manual measurement. It uses multi-angle image acquisition and least squares fitting to effectively reduce the systematic error and random error caused by shooting angle deviation during the measurement process.
[0016] 2. The present invention utilizes industrial cameras and automated guide rail systems to complete multi-point continuous detection in a short period of time. Compared with manual measurement, the efficiency is significantly improved. The present invention is based on non-contact machine vision measurement technology and does not require manual contact with the steel cage, greatly reducing the operator's workload. Through high-resolution industrial cameras and laser rangefinders, combined with image processing algorithms, the accuracy and stability of measurement can still be guaranteed in harsh environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0018] Figure 1 It is a flow diagram of an on-line measurement method for the diameter and spacing of steel reinforcement cages based on machine vision of the present invention. Specific implementation mode
[0019] Please refer to Figure 1 As shown, an on-line measurement method for the diameter and spacing of steel reinforcement cages based on machine vision includes the following steps: Use an industrial camera to collect images of the steel reinforcement cage; Obtain the internal parameter matrix, external parameter matrix and distortion correction parameters of the industrial camera by photographing calibration plates at different angles, which are used to correct the camera shooting error; The internal parameter matrix is used to describe the internal optical characteristics of the camera, including the focal length and the position of the principal point. The calculation expression of the internal parameter matrix A is: ; Among them, f x and f y are the focal lengths in the x-axis and y-axis directions respectively, and the unit is pixel; c x and c y are the positions of the image center point or principal point in the pixel coordinate system respectively.
[0020] The external parameter matrix is obtained by measuring the distance between the camera and the calibration plate with a laser rangefinder. The expression of the external parameter matrix B is: ; Among them, R is the camera rotation matrix and T is the displacement vector.
[0021] The distortion correction parameters are calculated by photographing calibration plates at different angles. The distortion correction parameters are calculated according to the distortion model r 2 =x 2 +y 2 It is calculated as follows, ; ; Among them, k1 and k2 are radial distortion parameters, p1 and p2 are tangential distortion parameters, and r is the normalized radius from the point to the image center; x, y: are the normalized abscissa and ordinate of the image point without distortion in the ideal state respectively, and are obtained by converting the pixel coordinates to the camera normalized coordinate system based on the camera internal parameter matrix; , are the normalized abscissa and ordinate of the point in the actual image respectively; Extract the boundary of the steel reinforcement cage by performing image processing on the image of the steel reinforcement cage; The steps of image processing are: The first step: Select at least one of mean filtering, Gaussian filtering or median filtering in the software to reduce image noise; Step 2: Select at least one of histogram equalization, adaptive histogram equalization, or contrast stretching in the software to enhance the image contrast; Step 3: Use the Otsu threshold segmentation method to segment the steel cage to be measured; Step 4: Use the Sobel operator to detect and extract the edges of the steel cage in the image.
[0022] After completing the extraction of the boundary of the steel cage, for the given pixel coordinates (u, v), according to: ; ; Use the internal and external parameter matrices and distortion coefficients to perform coordinate transformation to obtain the transformation matrix, and convert the normalized image coordinate system to the pixel coordinate system; calculate the actual diameter and spacing values of the steel cage according to the pixel size and the transformation matrix; Actual size of steel cage diameter = Pixel size of steel cage diameter × Transformation matrix; Actual size of steel cage spacing = Pixel size of steel cage spacing × Transformation matrix; Finally, fit the transformation model by the least squares method to improve the overall measurement accuracy.
[0023] In this embodiment, the hardware part for implementing the above method includes but is not limited to the relevant devices in the method and detection device for detecting the quality of the steel bar mesh in the power pipe gallery based on machine vision disclosed in Chinese invention patent 201610317303.5 (publication number CN105956942A), specifically: Industrial camera mounting bracket: That is, a combination of a slider and a pan-tilt, used to fix and adjust the shooting angle of the industrial camera. The industrial camera mounting bracket can slide smoothly along the preset guide rail and has a fine-tuning function to ensure that the camera can capture steel cage images at different angles.
[0024] Industrial camera: It has a high resolution, can take high-quality steel cage images, supports 4K ultra-high-definition video recording and high-resolution static photo shooting to meet the requirements of precise measurement.
[0025] Calibration board: Used for camera calibration. By taking calibration board images at different angles, the internal parameter matrix, external parameter matrix, and distortion correction parameters of the camera are obtained.
[0026] Guide rail system: Includes a stable guide rail and a driving mechanism (including but not limited to a stepper motor and a servo motor), used to drive the industrial camera mounting bracket to slide smoothly along the guide rail to achieve full coverage shooting of the steel cage.
[0027] Image Processing and Analysis System: Integrated in a computer, it is responsible for receiving images captured by an industrial camera, performing image processing (including noise reduction, contrast enhancement, segmentation, edge extraction, etc.), extracting the boundary of the steel reinforcement cage, and calculating the actual diameter and spacing values of the steel reinforcement cage based on pixel size and transformation matrix. At the same time, the system also has the least squares fitting function to improve the measurement accuracy.
[0028] Display and Alarm Module: Used to display the measurement results and determine whether the diameter and spacing of the steel reinforcement cage are qualified according to the preset threshold. If unqualified, it will issue a voice alarm and display the unqualified items and recommended improvement measures.
[0029] Application Description of the Above Device: Camera Calibration: First, use a calibration board to calibrate the industrial camera to obtain the internal parameter matrix, external parameter matrix, and distortion correction parameters of the camera. These parameters will be used for subsequent image correction and measurement calculations.
[0030] Image Acquisition: Install the industrial camera on the guide rail system and adjust it to an appropriate shooting angle. Then, start the drive mechanism of the guide rail system to make the industrial camera slide smoothly along the guide rail to take a full coverage of the steel reinforcement cage.
[0031] Image Processing and Analysis: Transmit the acquired images to the image processing and analysis system for processing such as noise reduction, contrast enhancement, segmentation, and edge extraction. After extracting the boundary of the steel reinforcement cage, calculate the actual diameter and spacing values of the steel reinforcement cage according to the pixel size and transformation matrix.
[0032] Result Judgment and Alarm: The image processing and analysis system compares the calculated diameter and spacing values with the preset threshold to determine whether the steel reinforcement cage is qualified. If unqualified, it will issue a voice alarm through the display and alarm module and display the unqualified items and recommended improvement measures.
[0033] Data Recording and Traceability: All measurement results and judgment information will be recorded in the computer for subsequent data traceability and analysis.
[0034] The specific parameters of the device and method in this embodiment are as follows: Device Part: Industrial Camera: Resolution 4096×2160, focal length 12 mm; Calibration Board: Black and white checkerboard calibration board, size 300 mm × 300 mm, grid size 10 mm; Laser Rangefinder: Ranging accuracy ±1 mm, measuring range 1 - 30 m; Pan-Tilt Head: 360° rotation, adjustable translation speed range 1 - 10 mm / s; Guide Rail: Length 3 m, accuracy ±0.1 mm; Drive motor: Stepper motor, step angle 1.8°. Method part: Operating system: Windows 10 64-bit.
[0035] Development environment: C# + Halcon.
[0036] Image processing algorithm: Mean filter for noise reduction + Otsu threshold segmentation + Sobel edge detection.
[0037] The specific operation steps are as follows: System installation and calibration: Lay the guide rail horizontally between the tripods on both sides of the steel cage. Install the industrial camera on the pan-tilt head and adjust the laser rangefinder to be parallel to the guide rail. Place the calibration board in the middle of the steel cage, 2 m away from the camera, and obtain the calibration data.
[0038] By photographing the calibration board, obtain the camera internal parameter matrix: ; External parameter matrix (rotation matrix R and translation vector T): ; Among them ; ; Image acquisition: The industrial camera moves along the guide rail and captures an image of the steel cage every 100 mm, for a total of 30 images.
[0039] Image processing and analysis: Noise reduction: Apply mean filter (window size 5×5) to each image.
[0040] Edge detection: Use the Sobel operator to extract the edges of the steel bars.
[0041] Size calculation: According to the edge detection results, obtain: The pixel diameter of the steel bar Dpixel = 150 = 150 pixels; The pixel pitch is Ppixel = 500 pixels.
[0042] Physical size calculation: Through calibration, obtain the pixel-physical conversion coefficient S = 0.02.
[0043] Actual diameter and pitch calculation: Dreal = Dpixel × S = 150 × 0.02 = 3.0 mm Preal = Ppixel × S = 500 × 0.02 = 10.0 mm Measurement result output and verification The measured values are displayed in real time through the PC terminal and compared with the manually measured values: Manually measured values: The diameter of the steel bar D = 3.01 mm, and the spacing P = 10.02 mm.
[0044] Relative error: The diameter error = ∣3.01−3.0∣÷3.01×100%≈0.33% The spacing error = ∣10.02−10.0∣÷10.02×100%≈0.2% As can be seen from the above, the accuracy: The measurement errors of both the diameter and the spacing are less than 0.5%.
[0045] Efficiency: The whole measurement process takes 3 minutes, saving 70% of the time compared with traditional manual measurement.
[0046] Applicability: It can be used for the measurement of steel cage in complex construction site environments, reducing labor intensity and improving detection efficiency and accuracy.
[0047] Accuracy: The measurement errors of both the diameter and the spacing are less than 0.5%. Efficiency: The whole measurement process takes 3 minutes, saving 70% of the time compared with traditional manual measurement. Applicability: It can be used for the measurement of steel cage in complex construction site environments, reducing labor intensity and improving detection efficiency and accuracy.
[0048] The present invention can achieve on-line accurate measurement of the diameter and spacing of the steel cage, improving production efficiency and product quality. At the same time, the device also has the advantages of easy operation and low maintenance cost, and is suitable for the quality inspection requirements of various steel cage production lines. By accurately calibrating the internal and external parameters of the camera through the calibration board and applying the pixel-physical size conversion matrix, millimeter-level measurement accuracy is achieved, which is significantly better than the error range of traditional manual measurement. By using multi-angle image acquisition and least squares fitting, systematic errors and random errors caused by shooting angle deviation during the measurement process are effectively reduced.
[0049] Traditional manual measurement requires a large amount of time for single-point sampling, while the present invention uses an industrial camera and an automated guide rail system to complete multi-point continuous detection in a short time. Compared with manual measurement, the efficiency is significantly improved. The present invention is based on non-contact machine vision measurement technology and does not require manual contact with the steel cage, greatly reducing the work burden of the operator; The present invention uses a high-resolution industrial camera and a laser rangefinder, combined with image processing algorithms (such as noise suppression, distortion correction, etc.), to ensure the accuracy and stability of measurement even in harsh environments.
[0050] The present invention is not only applicable to the on-line measurement of the diameter and spacing of the steel cage, but also can be extended to other scenarios requiring high-precision measurement, such as steel mesh detection, welding quality assessment, etc.
[0051] The above embodiments and drawings do not limit the product form and style of the present invention. Any appropriate changes or modifications made by those of ordinary skill in the art shall be considered as not departing from the patent scope of the present invention.
Claims
1. A method for online measurement of steel cage diameter and spacing based on machine vision, characterized in that: The steps include: Use industrial cameras to capture images of steel cages; By shooting calibration plates at different angles, the intrinsic parameter matrix, extrinsic parameter matrix and distortion correction parameters of the industrial camera are obtained to correct the camera shooting error; Extracting the steel cage boundary by performing image processing on the steel cage image; Calculate the actual diameter and spacing of the steel cage based on the pixel size and the transformation matrix; The measurement accuracy of steel cage is improved through least squares fitting.
2. The online measurement method for steel cage diameter and spacing based on machine vision according to claim 1 is characterized in that: The intrinsic parameter matrix is used to describe the optical characteristics inside the camera, including focal length and principal point position. The calculation expression of the intrinsic parameter matrix is: ; Among them, A is the internal parameter matrix, f x and f y are the focal lengths in the x-axis and y-axis directions, c x and c y are the positions of the image center or principal point in the pixel coordinate system, respectively.
3. The online measurement method for steel cage diameter and spacing based on machine vision according to claim 1 is characterized in that: The external parameter matrix is obtained by measuring the distance between the industrial camera and the calibration plate using a laser rangefinder. The expression of the external parameter matrix is: ; Among them, B is the external parameter matrix, R is the camera rotation matrix, and T is the displacement vector.
4. The online measurement method for steel cage diameter and spacing based on machine vision according to claim 1 is characterized in that: The distortion correction parameters are calculated by photographing the calibration plate at different angles. The distortion correction parameters are calculated based on the distortion model r 2 =x 2 +y 2 Calculated, ; ; Among them, k1 and k2 are radial distortion parameters, p1 and p2 are tangential distortion parameters, and r is the normalized radius from the point to the center of the image; x, y: the normalized horizontal and vertical coordinates of the ideal undistorted image point, respectively, obtained by converting the pixel coordinates into the camera normalized coordinate system based on the camera intrinsic parameter matrix; , are the normalized horizontal and vertical coordinates of the points in the actual image, respectively.
5. The online measurement method for steel cage diameter and spacing based on machine vision according to claim 1 is characterized in that: The image processing includes noise reduction, contrast enhancement, segmentation and edge extraction.
6. The online measurement method for steel cage diameter and spacing based on machine vision according to claim 5 is characterized in that: The steps of image processing are: Step 1: Select at least one method of mean filtering, Gaussian filtering or median filtering in the software to reduce image noise; Step 2: Select at least one of the following methods in the software: histogram equalization, adaptive histogram equalization, or contrast stretching to enhance the image contrast; Step 3: Use Otsu threshold segmentation method to segment the steel cage to be tested; Step 4: Use the Sobel operator to detect and extract the edges of the steel cage in the image.
7. The online measurement method for steel cage diameter and spacing based on machine vision according to claim 1 is characterized in that: The actual diameter and spacing values of the steel cage are calculated based on the pixel size and the conversion matrix, specifically: For a given pixel coordinate (u, v), according to: ; ; Use the intrinsic and extrinsic matrix and the distortion coefficient to perform coordinate transformation, obtain the transformation matrix, and transform the normalized image coordinate system into the pixel coordinate system; The actual size of the steel cage diameter = the pixel size of the steel cage diameter × the conversion matrix, The actual size of the steel cage spacing = the pixel size of the steel cage spacing × the conversion matrix.
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
Machine Vision-Based Method and Device for Quality Inspection of Steel Mesh in Power Pipe Corridors
CN105956942B