An image-based method for measuring the cross-sectional dimensions of construction steel pipes

By applying a combination method of convolutional neural network and Hough circle detection in the edge detection of building steel pipes, the problem of insufficient robustness of traditional edge detection operators when dealing with building steel pipes is solved, and higher measurement accuracy and robustness are achieved.

CN115082422BActive Publication Date: 2025-06-03NORTH CHINA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210839990.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2025-06-03
Estimated Expiration
2042-07-18

AI Technical Summary

Technical Problem

When traditional edge detection operators deal with building steel pipes, the detection effect is poor due to edge wear and messy texture, and convolutional neural networks are difficult to accurately extract features and calculate radius.

Method used

The edge detection model based on convolutional neural network is adopted, including backbone network, deep supervision module and feature fusion module, combined with corrosion, connectivity domain processing and optimized Hough circle detection algorithm, the edge characteristics of building steel pipes are extracted and their radius is calculated.

Benefits of technology

It improves the accuracy and robustness of cross-sectional dimension measurement of building steel pipes, reduces the impact of messy textures, and ensures the accuracy of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082422B_ABST
    Figure CN115082422B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for measuring the cross-sectional size of a building steel pipe. The image of the building steel pipe is input into a trained edge detection model for edge detection. The edge detection model includes a backbone network, a deep supervision module, and a feature fusion module. After obtaining the edge information of the image, the edge image is subjected to erosion and connected component processing. Finally, for the processed edge image, the initial radius and center of the circle detected by the Hough circle detection are first obtained. The eight-neighborhood of the initial center is taken, the distances from all points on the image to the eight centers are calculated, and the average value is taken as the radius. Eight circles are made with the radii calculated from the centers of the eight-neighborhood, and the repetition degrees of these eight circles and the circle obtained by initially using the Hough circle detection with the circle in the image are respectively calculated. The circle with the highest coincidence degree is used to determine the diameter size of the cross-section of the steel pipe. The present invention solves the problems of high environmental requirements and poor universality of the method in the actual application of building steel pipe detection, and expands the application scenarios of the present invention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to image edge detection and image processing, belonging to the technical field of image processing, and particularly relates to a method for measuring the cross-sectional size of building steel pipes based on images. Background Art

[0002] When applying machine vision to measure dimensions, the edge extraction of an object is an essential step. By extracting the edge image of the object and then using the pixel equivalent to convert the pixel distance in the edge image into the actual physical distance, the actual size of the object can be measured. The development of traditional edge detection operators is relatively mature and the operation is simple, but it has certain limitations in the actual application environment. 1. In actual applications, the edges of building steel pipes are worn in many places and the cross-sectional information is relatively messy. Using traditional edge detection operators, these influences cannot be avoided and the detection effect is not good. 2. Directly using the existing convolutional neural network technology cannot accurately extract the feature image, and the extracted edge information is relatively messy and the radius cannot be directly calculated. 3. For images with thick edges, the results obtained by directly using the Hough circle detection technology deviate greatly from the actual results. Through the above analysis, requirements are put forward for the edge detection algorithm, and an edge detection method suitable for building steel pipes is explored, so that the influence of the messy texture features of the cross-section of the building steel pipe is small and only the desired edge information is output. At the same time, in order to accurately measure the cross-sectional size of the building steel pipe, the extracted thick edge image is processed to further obtain a more accurate edge size. Summary of the Invention

[0003] The purpose of the present invention is to overcome the above-mentioned deficiencies in the prior art and propose a method for measuring the cross-sectional size of building steel pipes based on images.

[0004] The present invention adopts the following technical solutions: A method for measuring the cross-sectional size of building steel pipes based on images, which inputs the image of the building steel pipe into a trained edge detection model for edge detection. The edge detection model includes a backbone network, a deep supervision module, and a feature fusion module; after obtaining the edge information of the image, the edge image is subjected to erosion and connected component processing. Finally, based on the Hough circle detection of the processed edge image, the initial radius and center of the Hough circle detection are first obtained, the eight-neighborhood of the initial center is taken, the distances from all points on the image to the eight centers are calculated, and the average value is taken as the radius; eight circles are made with the radius calculated from the centers of the eight-neighborhood, and the repetition degrees of these eight circles and the circle obtained by initially using the Hough circle detection and the circle in the image are calculated respectively, and the circle with the highest coincidence degree is used to determine the diameter size of the steel pipe cross-section.

[0005] The backbone network realizes the automatic extraction of edge features. The backbone network extracts multi-scale features of the building steel pipe image, including five layers of features ;

[0006] The deep supervision module performs supervised learning on each stage, enabling each stage to output an edge image. The deep supervision module enhances the multi-scale features extracted by the backbone network. for enhancement

[0007] After each convolutional layer in the backbone network, a 1×1-21 convolutional layer is added for dimensionality increase, and then multi-channel merging is performed through the 1×1-1 convolutional layer of the deep supervision module to achieve information interaction between different channels. Finally, deconvolution operations are performed on the information obtained after merging each layer to obtain the feature image of each layer and fully perceive the global context information.

[0008] The feature fusion module uses a 1*1 convolutional layer to fuse the feature maps generated by each stage and finally outputs the fused feature image.

[0009] Furthermore, the method for constructing and training the edge detection model and processing the rough edge image includes:

[0010] S11, dividing the pre-collected image dataset into a training set and a test set;

[0011] S12, constructing an edge detection model;

[0012] S13, using the training set to train the constructed edge detection model;

[0013] S14, using the test set to test the trained edge detection model;

[0014] S15, using erosion and connected components to process the rough edge image;

[0015] S16, using optimized Hough circle detection to accurately calculate the radius.

[0016] Furthermore, the backbone network obtains global context features. The backbone network consists of five layers of features in total, and each layer is connected by a 2×2 max-pooling layer. At the fifth layer of the backbone network, dilated convolution technology is adopted to increase the receptive field.

[0017] Furthermore, in the feature fusion module, the edge feature outputs obtained for each layer are superimposed, and then 1×1-1 convolutional multi-channel merging is performed again to achieve the ability to obtain various mixed information. The sigmoid activation function and cross-entropy loss function are used in the feature fusion module. The loss function for calculating each pixel point is expressed as:

[0018]

[0019] Where \(Y^+\) and \(Y^-\) represent the numbers of positive and negative samples respectively, and the hyperparameter \(\lambda\) is used to balance the difference in the numbers of positive and negative samples. \(X\) i represents the activation value of the neural network, and \(y\) i represents the probability value that the pixel point \(i\) in the label map is an edge point. \(W\) represents the learnable parameters in the neural network. After removing the loss calculation of the deep supervision module, the loss formula for each image is:

[0020] .

[0021] Furthermore, erode the edge image. Using the binary image erosion operation, set the erosion coefficient to 2 to obtain fine edge information.

[0022] The present invention has the following advantages over the prior art:

[0023] The present invention proposes a method for measuring the cross-sectional dimensions of building steel pipes. This method uses a convolutional neural network to extract edge features, solves the problem of the weak robustness of traditional edge detection operators, and improves the practicality of the method. Based on the problem of rough edge dimension detection, the present invention also proposes an optimized algorithm for Hough circle detection based on connected components on the basis of rough edge image processing, making the Hough circle detection algorithm better applicable to engineering detection technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is the model diagram for extracting rough edge features of the present invention;

[0025] Figure 2 is the processing flow chart of the rough edge image of the present invention;

[0026] Figure 3 is the analysis diagram of the method for measuring the cross-sectional dimensions of building steel pipes of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] The present invention will be further described below in conjunction with the drawings and embodiments.

[0028] An image-based method for measuring the cross-sectional size of construction steel pipes. The image of the construction steel pipe is input into a trained edge detection model for edge detection. The edge detection model includes a backbone network, a deep supervision module, and a feature fusion module. After obtaining the edge information of the image, the edge image is eroded and processed for connected components to obtain a more accurate and refined edge image. Finally, the processed edge image is used with an optimized Hough circle detection algorithm to determine the radius of the cross-section of the construction steel pipe. The backbone network realizes the automatic extraction of edge features. The deep supervision module performs supervised learning on each stage, enabling each stage to output an edge image. The feature fusion module uses a 1*1 convolutional layer to fuse the feature maps generated by each stage and finally outputs the fused feature image. The backbone network extracts multi-scale features of the construction steel pipe image, including five layers of features ; the deep supervision module enhances the multi-scale features extracted by the backbone network to fully perceive the global context information. The network structure of this model combines both low-level and high-level information; the feature fusion module uses a 1×1 convolutional layer to fuse the feature maps generated by each stage and finally outputs the fused feature image; the process of processing the rough edge image is to perform an erosion operation on the obtained image above, so that the obtained edge image is more refined. Then, using connected components, the two edge information in the edge image is separated, and at the same time, inaccurate edge information is removed; finally, using the optimized Hough circle detection algorithm, the radius of the cross-section of the construction steel pipe can be calculated more accurately.

[0029] In this embodiment, the method for constructing and training the edge detection model and the rough edge image processing includes:

[0030] S11, dividing the pre-collected image dataset into a training set and a test set;

[0031] S12, constructing an edge detection model;

[0032] S13, using the training set to train the constructed edge detection model; in the feature fusion module, the sigmoid activation function and the cross-entropy loss function are used. The loss function calculated for each pixel point is expressed as:

[0033]

[0034] where Y+ and Y- represent the numbers of positive and negative samples respectively, and the hyperparameter λ is used to balance the difference in the numbers of positive and negative samples. X i represents the activation value of the neural network, y i represents the probability value that the pixel point i in the label map is an edge point, and W represents the learnable parameters in the neural network. After removing the loss calculation of the deep supervision module, the loss formula for each image is:

[0035]

[0036] S14. Use the test set to test the trained edge detection model.

[0037] In this embodiment, the network model for extracting coarse edge information is as Figure 1 shown. The backbone network of this network model includes five layers of features . A 1×1-21 convolutional layer is added after each layer of the backbone network to first increase the dimension, and then the dimension is reduced through a 1×1-1 convolutional layer. Finally, a deconvolutional layer is used to obtain the feature image of each layer. The dilated convolution technique is adopted in the fifth layer of the backbone network with a dilation coefficient of 2 to increase the receptive field. In the feature fusion part, the feature images of each layer are stacked, and a 1×1-1 convolution is performed for multi-channel merging to achieve the ability to obtain various mixed information.

[0038] S15. Process the coarse edge image using erosion and connected components.

[0039] In this example, first perform erosion processing on the coarse edge image obtained in S14 to further refine the edge information of the image, thereby reducing the error of radius detection. The erosion coefficient is 2. After obtaining the eroded image, using the processing method of connected components, multiple figures can be detected simultaneously, and when detecting one circle, it will not be affected by other circles in the image.

[0040] S16. Use optimized Hough circle detection to accurately calculate the radius

[0041] In this example, first use the characteristics of Hough circle detection to detect the image processed in S15. Based on Hough circle detection, first obtain the initial radius and center of the Hough circle detection. Take the eight-neighborhood of the initial center, calculate the distances from all points on the image to the eight centers, and take their average value as the radius. Use the radius calculated from the centers of the eight-neighborhood to make eight circles, and calculate the repetition degrees of these eight circles and the circle obtained by initially using Hough circle detection with the circles in the image respectively. The circle with the highest coincidence degree is the optimal circle.

[0042] Figure 3 where a is the input original image, Figure 3 b is the coarse edge feature image obtained by using deep learning, Figure 3 c is the image processed using erosion and connected components, Figure 3 d (right) is the result image after improving Hough circle detection, Figure 3 d (left) is the image of Hough circle detection. From Figure 3 b, it can be seen that the obtained edge image is relatively rough and the circles are not regular, with some convex and concave points. However, for Figure 3For the a image, there is no messy texture on the edge of the a image in the b image, which is very beneficial for the subsequent image processing process. Figure 3 From the c image of Figure 3 , it can be seen that after the erosion treatment, the edge line of the image is finer, and under the action of the connected domain, the two obtained circles can be reasonably separated, providing advantages for the Hough circle detection. Figure 3 The image of the d (left) Hough circle detection of Figure 3 and Figure 3 Compared with the d (right) of Figure 3 , it can be seen that the right image fits the circle in the image better and has a higher coincidence degree with the circle in the image. Therefore, the present invention proposes a method for measuring the cross-sectional size of building steel pipes based on images, which can automatically detect the edge of the cross-section of building steel pipes and ensure the detection accuracy.

[0043] The above specific implementation manners are the preferred embodiments of the present invention and cannot limit the present invention. Any other changes or other equivalent replacement methods made without departing from the technical solution of the present invention are included in the protection scope of the present invention.

Claims

1. An image-based method for measuring the cross-sectional dimensions of construction steel pipes. The image of the construction steel pipe is input into a trained edge detection model for edge detection. It is characterized in that its edge detection model includes a backbone network, a deep supervision module, and a feature fusion module; after obtaining the edge information of the image, the edge image is subjected to erosion and connected component processing. Finally, based on the Hough circle detection of the processed edge image, the initial radius and center of the Hough circle detection are first obtained. Take the eight-neighborhood of the initial center, calculate the distances from all points on the image to the eight centers, and take their average value as the radius; use the radius calculated from the centers of the eight-neighborhood to make eight circles, and calculate the repetition degrees of these eight circles and the circle obtained by initially using the Hough circle detection with the circle in the image respectively. The circle with the highest coincidence degree is used to determine the diameter size of the steel pipe cross-section. The backbone network realizes the automatic extraction of edge features. The backbone network extracts multi-scale features of the building steel pipe images, including five layers of features ; The deep supervision module performs supervised learning on each stage, enabling each stage to output an edge image. The deep supervision module enhances the multi-scale features extracted by the backbone network for enhancement. After each convolutional layer of the backbone network, a 1×1-21 convolutional layer is added for dimensionality increase, and then multi-channel merging is performed through the 1×1-1 convolutional layer of the deep supervision module to achieve information interaction between different channels. Finally, deconvolution operations are performed on the information obtained after merging each layer to obtain the feature images of each layer and fully perceive the global context information. The feature fusion module uses a 1*1 convolutional layer to fuse the feature maps generated by each stage, and finally outputs the fused feature image.

2. An image-based method for measuring the cross-sectional dimensions of construction steel pipes according to claim 1, It is characterized in that the methods for constructing and training the edge detection model and the rough edge image processing include: S11, dividing the pre-collected image dataset into a training set and a test set; S12, constructing an edge detection model; S13, using the training set to train the constructed edge detection model; S14, using the test set to test the trained edge detection model; S15, using erosion and connected components to process the rough edge image; S16, using the optimized Hough circle detection to accurately calculate the radius.

3. An image-based method for measuring the cross-sectional dimensions of construction steel pipes according to claim 1, It is characterized in that the backbone network obtains global context features. The backbone network contains a total of five layers of features, and each layer is connected by a 2×2 max-pooling layer. At the fifth layer of the backbone network, dilated convolution technology is adopted to increase the receptive field.

4. An image-based method for measuring the cross-sectional dimensions of construction steel pipes according to claim 1, It is characterized in that In the feature fusion module, the edge feature outputs obtained from each layer are superimposed, and then another 1×1-1 convolutional multi-channel merging is performed to achieve the ability to obtain various mixed information. The sigmoid activation function and the cross-entropy loss function are used in the feature fusion module. The loss function of each pixel point is calculated as: where Y+ and Y- represent the numbers of positive and negative samples respectively, and the hyperparameter λ is used to balance the difference in the numbers of positive and negative samples, X i represents the activation value of the neural network, and y i represents the probability value that the pixel point i in the label map is an edge point. W represents the learnable parameters in the neural network. After removing the loss calculation of the deep supervision module, the loss formula for each image is: 。 5. An image-based method for measuring the cross-sectional dimensions of construction steel pipes according to claim 1, It is characterized in that Erode the edge image, use the binary image erosion operation, set the erosion coefficient to 2, and obtain fine edge information.

Citation Information

Patent Citations

  • Neural network-based concrete filled steel tube pure bending member bearing capacity prediction method

    CN113094999A

  • Intelligent pressure steel pipe installation construction method, device and system based on BIM (Building Information Modeling)

    CN114297753A