CN-122023523-A - Method for measuring distance between reinforcing steel bars based on YOLOv-RL network and PCA-Hough algorithm
Abstract
And positioning a steel bar center shaft based on YOLOv-RL network and PCA-Hough algorithm, and measuring the steel bar spacing by matching with a depth map. The method has the advantages of low cost, high real-time performance and good accuracy. The YOLOv-RL network can greatly reduce the calculation cost while maintaining the accuracy of detecting the reinforcing steel bars, and the PCA-Hough algorithm can improve the calculation speed and optimize the straight line fitting effect at the same time, so that the method can meet the requirement of quick and accurate measurement of the reinforcing steel bar spacing in the power transmission and transformation extension engineering.
Inventors
- SONG JIAYIN
- HOU HAOHAO
- SONG WENLONG
- LU TENG
- ZHU QINGLIN
- LI XIANG
- ZHANG YIPENG
- WANG HUIMIN
- LIAO SHENGYI
Assignees
- 东北林业大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260128
Claims (2)
- 1. A reinforcement spacing measuring method based on YOLOv-RL network model and PCA-Hough algorithm is characterized in that a binocular camera is used for collecting reinforcement images, the images comprise RGB images and depth images, YOLOv-RL network is used for extracting a reinforcement region of interest (Region of Interest, ROI) of the reinforcement RGB images, PCA-Hough algorithm is used for fitting a reinforcement boundary line in the reinforcement ROI, three-dimensional coordinates of the reinforcement boundary line are obtained by combining the depth images, and therefore the central axis three-dimensional coordinates of each reinforcement are determined, and the reinforcement spacing is calculated by utilizing the central axis three-dimensional coordinates of the reinforcement, and the method comprises the following steps: Step 1, acquiring a steel bar image by using a binocular camera, wherein the image comprises an RGB image and a depth image, the RGB image and the depth image have pixel level alignment relation, extracting a steel bar ROI in the steel bar RGB image by using a YOLOv-RL network, wherein the YOLOv-RL network is an improved network based on YOLOv n, a self-built LB-DG module replaces a C3k2 module in the original YOLOv n to reduce the calculation cost of the network, the LB-DG module structure comprises 5 layers, namely a 1X 1 convolution layer, a DSC layer, a GCBlock layer, a 1X 1 convolution layer, a BatchNorm layer and a ReLU activation layer, the 5 layers are sequentially connected, a residual connection structure is arranged between the input end of the 1X 1 convolution layer and the output end of the 5-th ReLU activation layer, and the output of the residual structure is used as the output of the LB-DG module; and 2, fitting a reinforcing steel boundary line in the reinforcing steel bar ROI in the step 1 by adopting a PCA-Hough algorithm, wherein the reinforcing steel boundary line fitting process of the self-built PCA-Hough algorithm is as follows: (1) Generating an edge image for the steel bar ROI by using a Canny edge detection operator; (2) Extracting all boundary points in the edge image to form a point set , , For the total number of boundary points, calculate The average value of the horizontal and vertical coordinates of each boundary point is respectively 、 And calculate Covariance matrix C of the boundary points is expressed as: (1) the calculation formula of each element in the matrix C is as follows: (2) (3) Performing eigenvalue decomposition on the covariance matrix C to obtain eigenvalues , Feature vectors corresponding to the feature vectors , Will be Corresponding feature vector As the main direction of the boundary point of the region, the direction is angled The expression, the calculation formula is: (3) (4) For each boundary point At the center of the obtained angle The angle traversal is carried out in a step length of 1 DEG in the range, and each corresponding angle is expressed as , Corresponding Hough space parameters are calculated And is recorded as a Hough space parameter pair The calculation relation is as follows: (4) (5) When traversing boundary points, counting the occurrence frequency of the Hough space parameter pairs, and extracting two parameter pairs with highest occurrence frequency And (3) with Substituting formula (4) to recover two boundary lines of the steel bar, wherein the first boundary line is: (5) The second boundary line is: (6) (6) The two boundary lines of the steel bar determine the central axis of the steel bar, respectively taking the slope and the intercept median value to obtain the central axis as follows: (7) wherein x and y are respectively the horizontal and vertical coordinates of the central axis of the steel bar in the RGB image of the steel bar; Step 3, based on the central axis coordinates of the steel bars in the RGB images of the steel bars Reading three-dimensional world coordinates of the central axis of the steel bar in the depth map corresponding to the RGB image of the steel bar ; And 4, calculating the distance between two steel bars based on the central axis coordinates of the steel bars, wherein the specific steps are as follows: (1) Calculating the direction vector of each central axis, and extracting the starting point and the ending point of the central axis of each steel bar in the RGB image of the steel bar, wherein the starting point of the central axis of one steel bar is The end point is The starting point of the central axis of the other steel bar is The end point is The calculation formula of each axis direction vector is: (8) (2) The median value of the direction vectors is obtained and normalized, and the calculation formula is as follows: (9) Wherein the method comprises the steps of , Modular value operation is carried out on the vector; (3) Calculating the distance between the steel bars, wherein the calculation formula is as follows: (10) Wherein the method comprises the steps of , 。
- 2. The method for measuring the distance between steel bars based on YOLOv-RL network and PCA-Hough algorithm as claimed in claim 1, wherein the binocular camera is an electronic device capable of generating the RGB image and the depth image aligned at pixel level simultaneously.
Description
Method for measuring distance between reinforcing steel bars based on YOLOv-RL network and PCA-Hough algorithm Technical Field The invention discloses a method for measuring the distance between reinforcing steel bars based on YOLOv-RL network model and PCA-Hough algorithm by applying computer vision and deep learning technology, which aims to meet the requirement that a metal measuring tool is not allowed to be used in the scenes of transformer substation extension engineering construction and the like. Background Reinforced concrete is the most widely used building composite material at present, wherein the main function of the reinforcing steel bars is to improve the rigidity and strength of the material, and the correct installation of the reinforcing steel bars can enhance the durability of a reinforced concrete structure, reduce the strength defect and prevent the collapse of the structure. When installing the reinforcing bar, ensure that the reinforcing bar net structure is regular, the interval is even, helps strengthening the durability of structure through effective distribution load and reduction stress concentration. Unreasonable rebar installation locations can affect structural load carrying capacity. Therefore, measuring the spacing of the bars is a very important task during construction. The steel rule is used for accurately measuring the distance between the steel bars, the workload is large, the efficiency is low, in some special working environments such as the extension construction of a substation, the steel rule is strictly forbidden to be used in an electrified environment, the insulation flexible rule is used for increasing the difficulty for measuring the distance between the steel bars, and the flexible rule has tiny elasticity and also reduces the accuracy of measurement, so that a non-contact type measuring method for the distance between the steel bars, which is simple to operate, safe and efficient, is needed. The non-contact measurement of the distance between the reinforcing bars needs to determine the three-dimensional coordinates of the reinforcing bars, and generally, the three-dimensional reconstruction of the target is needed to obtain three-dimensional models such as a point cloud model and the like to determine the three-dimensional coordinates of the reinforcing bars. But generating a three-dimensional point cloud aiming at a target scene and identifying the steel bars in the three-dimensional point cloud is very complex and has extremely large calculated amount, and real-time measurement of the steel bars cannot be realized. Compared with the construction of a complex three-dimensional point cloud model, the depth map is a simpler, more convenient and flexible choice. The depth map can provide the missing depth information of the two-dimensional image, and can obtain the three-dimensional coordinate data of the object by matching with the high-precision RGB image, and the calculated amount is greatly reduced. The current common depth information generation method mainly comprises a monocular micro-motion method, a structured light method, a ToF method, a binocular vision method and the like. The principle of generating depth maps by using structured light and the ToF method is known that they are susceptible to external ambient light, and therefore are mainly applied to indoor scenes with uniform illumination intensity. The monocular movement method needs to move a camera when constructing a depth map, and shoots targets at a plurality of angles to indirectly acquire the depth map, so that the requirements of quick real-time measurement are difficult to meet, and the monocular movement method is commonly used for posture estimation research. The binocular vision method is based on the principle of similar triangles, is favorable for positioning objects in a complex environment, and is high in precision and strong in robustness. After the three-dimensional reconstruction of the steel bar, the steel bar needs to be extracted from the whole measurement scene. Because engineering has a high requirement on system instantaneity, the YOLO detection model is attracting attention at a low calculation cost with a high reasoning speed. YOLOv 11A C3k2 module and a C2PSA module are introduced in structural design, so that the feature extraction capacity and a multi-scale feature fusion mechanism are effectively enhanced, and compared with the traditional YOLO series model, the detection accuracy and the reasoning speed are remarkably improved. However, due to the high requirement of the system on real-time performance, the current YOLOv model cannot meet the measurement requirement of engineering. After coarse extraction of the YOLO detection model, the steel bars are precisely positioned, so that the boundary lines of the steel bars are required to be fitted in a straight line. In the existing straight line fitting method, hough Transform (Hough Transform) is the fitting method