Next Article in Journal
Effects of Micro-Lectures on Junior High School Students’ Achievements and Learning Satisfaction in Mathematics Lessons
Next Article in Special Issue
Analyzing the Passenger Flow of Urban Rail Transit Stations by Using Entropy Weight-Grey Correlation Model: A Case Study of Shanghai in China
Previous Article in Journal
Covariance Matrix Adaptation Evolution Strategy for Improving Machine Learning Approaches in Streamflow Prediction
Previous Article in Special Issue
Analysis of the Complex Network of the Urban Function under the Lockdown of COVID-19: Evidence from Shenzhen in China
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Automatic Extraction Method of Rebar Processing Information Based on Digital Image

1
Department of Civil Engineering and Architecture, Xi’an University of Technology, Xi’an 710048, China
2
Department of Computer Science and Engineering, Xi’an University of Technology, Xi’an 710048, China
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(16), 2974; https://doi.org/10.3390/math10162974
Submission received: 25 July 2022 / Revised: 11 August 2022 / Accepted: 16 August 2022 / Published: 17 August 2022
(This article belongs to the Special Issue Mathematical Modeling and Numerical Simulation in Engineering)

Abstract

:
Reinforced steel is one of the most important building materials in civil engineering and improving the intelligence of steel reinforcement engineering can greatly promote the intelligent development of the construction industry. This research addressed the problems of the slow speed and poor accuracy of manually extracting rebar processing information, which leads to a low degree of rebar processing intelligence. Firstly, based on digital image processing technology, image preprocessing methods such as binarization and grayscale were used to eliminate redundant information in a detail drawing of a rebar. An image segmentation method based on pixel statistics was proposed to store the geometric and non-geometric information of the detail drawing of the rebar separately. Next, the bending angle was extracted by line thinning and corner detection, and the bending direction of the steel bar was determined based on the mathematical characteristics of the vector product. Finally, the non-geometric information was extracted by combining the morphological algorithm and the Optical Character Recognition (OCR) engine. According to the characteristics of the information sequence, an information mapping method was proposed to realize the integration of geometric and non-geometric information. The applicability and accuracy of this method for extracting the steel bar’s information were tested by experiments, and it was shown that the method also provides a theoretical basis for realizing the intelligentization and informatization of steel bar processing.

1. Introduction

With the advancement of the informatization and intelligentization of the construction industry, promoting the lean and efficient application of building materials through information technology has become a major development direction for the modernization, transformation and upgrading of the construction industry in order to improve quality and efficiency. As one of the most important building materials in civil engineering, steel bars account for more than 30% of the cost. It is of great significance to improve the intelligence of steel bar projects for the advancement of intelligence in the construction industry. At this stage, the processing of steel bars is mainly based on manual processing. Even the most advanced semi-automatic numerical control processing (CNC) equipment still needs manual extraction of the processing information of steel bars from the detail drawing of the rebar [1,2,3]. The main reason is that the steel bar processing information is stored in the form of the detail drawing of the rebar, but the equipment cannot directly identify the detail drawing to extract the steel bar’s processing information, resulting in low processing efficiency of the steel bar.
In order to realize fully automated steel bar processing, the primary problem is to solve the extraction, storage and transmission of the steel bar’s processing information. Evtyukov [4] pointed out that in the United States before the 1980s, the processing of steel bars was mainly manual. In the mid-1980s, with the advent of CNC steel bar cutting and bending machines, steel bar processing entered the era of semi-automation. The processing data input from the control terminal is input to the controller by the operator before actual production. Aram et al. [5] analyzed the information flow process model of the reinforced concrete supply chain, revealing that in the processing stage, the steel processing information can be exported as parts by establishing the information flow to the production machine, e.g., by using Tekla Structures and Allplan Precast software. The standard used in rebar cutting and bending machines is coded in BVBS (Bundesverband Bausoftware, version 2.0, Dr.-Ing. Ines Prokop, Berlin, Germany.) format. The result is a text file in ASCII format with a file name extension abs. With the development of information technology, the American Society for Applied Systems developed the ASA rebar application [6], which can be used for material tracking for production automation, marking and barcode scanning. The ASA has cooperated with major steel bar equipment manufacturers to develop the production software interface for their equipment, extracting steel bars’ processing information through the software and directly transferring it to the equipment to realize automatic processing.
Through the analysis of the development and changes in reinforcement engineering, it can be seen that the automatic extraction of the steel bar processing information can effectively connect the information fault between the processing equipment and the blanking plan. This can realize the information flow of the plan to the equipment, which is of great positive significance for reducing the work intensity of steel bar processing workers and improving the processing efficiency.

2. Related Work

There are many studies on the automatic extraction of rebar processing information, and intermediate data formats are also a solution. Navona et al. [7] proposed a method using an intermediate data format, namely Rebar Data File (RDF) format, to convey a rebar’s processing information. The method is based on construction drawings and uses “2BARS” to carry out automatic detailed designs of steel bars. Combined with the established graphic database, the information is directly extracted and stored as an RDF file. Finally, the incoming numerical control of the steel bar processing equipment is parsed through the NC interface. Navona et al. [8] also proposed a computer-aided design and manufacturing system to automate the design and manufacture of steel bars. The system was designed on the basis of the ROBCAD graphic simulation system, which can automatically extract the data required for processing from the graphic design database, process these data and transmit them to the rebar processing equipment. It is foreseeable that mechanical processing could replace human labor. Studies by Lee et al. [9] have shown that with the release of the standard construction machinery method for construction engineering in Korea, systems gradually converted to on-site machining methods. Lee et al. also analyzed the current situation of steel bar processing in Korea and proposed using Bar in Coil (BIC) to improve the problems of low steel bar processing efficiency and serious loss and analyzed its impact on steel bar manufacturing. BIC is a new concept rebar that can provide many advantages such as maximization of production efficiency through the automated system, reduction of labor costs, reduction of processing losses and the amount of use of steel, better inventory management and efficient use of space for storage.
For the extraction of steel bar processing information, the Technical Specifications for the Application of Rebar for Concrete Structures JGJ366-2015 stipulates that the cutting of the steel bar should be comprehensively designed before the steel bar is processed [10]. In many studies [11,12,13,14], most of the processing information is directly extracted via Building Information Modeling (BIM). However, there is a lack of in-depth research on the connection between the blanking scheme and the numerical control equipment, especially on how to extract, integrate, store and transmit the processing information in the blanking scheme. It is urgent to study the information extraction, storage and transmission mechanism of steel bar processing based on the blanking scheme, and to propose relevant methods to reduce the workload of the control personnel and to improve the processing efficiency of steel bars.
At the same time, artificial intelligence technologies, represented by image processing and image recognition, have been widely applied in many aspects of the construction industry. Image processing techniques implement algorithms based on mathematical functions to transform an image. Filters, threshold segmentation, edge detection and matching are commonly used techniques [15,16]. Although these techniques are highly accurate, they are limited by specific conditions such as a constant lightning and background, or special camera requirements. Zhang et al. [17] proposed a method for automatically counting steel bars based on the cross-sectional images of steel bars, which effectively solved the problem of the difficulty of counting steel bars at construction sites. Yan et al. [18] proposed a single multi-classification of the connected regions based on feature matching. Zhu et al. [19] utilized convolutional neural networks to distinguish rebars’ end-face localization and segmentation. Ying et al. [20] combined the Sobel operator and Otsu to obtain the foreground and used the Hough transform to enhance gray values in order to localize the steel bars. Su et al. [21] adopted the modified gradient Hough circle transform to localize the steel bars. Wang et al. [22] proposed a new segmentation method based on a quasi-circular assumption to count the bounded steel bars.
Similar to these studies, the detail drawing of a rebar contains sufficient semantic information to meet the data requirements of rebar processing. Therefore, how to realize the automatic extraction of the steel bar’s processing information based on image processing technology was the focus of this study. In this study, because of both the specific needs of steel bar processing and the shortcomings of the current steel bar processing methods, an automatic identification and extraction method for steel bar processing information is proposed, based on image processing technology. The method extracts geometric and non-geometric features based on a single detail drawing of a rebar, which can realize the calculation of the processing angle of the steel bar, determine the bending direction of the steel bar and extract the length label information of the steel bar, and finally encode it in a predetermined format. The core of the automatic extraction method is to use computer technology and image processing technology to replace labor, and extract and transmit the steel bar processing information that cannot be directly identified by the equipment to the steel bar processing equipment, which will accelerate the liberation of a lot of manual work, thereby improving the information transmission efficiency and steel bar processing. It promotes the development of informatization in the construction industry and provides meaningful technologies and methods for the transformation and upgrading of the industry.

3. Framework for Extracting Rebars’ Processing Information

The information required for steel bar processing mainly includes the number of steel bars, and the grades, diameters and shape information stored in the detail drawing of the rebar. The steel bar’s grade and diameter are used to control the raw material conveying production line to supply suitable raw materials, and the number of steel bars and the detail drawing of the rebar are used to control the CNC steel bar processing equipment for finished steel bar processing. Since the number, grade and diameter of steel bars are already specific data, the CNC steel bar processing equipment can read the data directly through the CNC interface, but the detail drawings of the rebars are displayed in jpg, png and other image formats, and the equipment cannot directly read the information from it, and thus it often requires manual identification and input by a special person. The steel bar blanking table of a building often contains hundreds of thousands of lines of steel bar information. Manually extracting the processing information line by line is slow and has low precision. Therefore, an automated method is urgently needed in engineering to accurately and efficiently extract the information required for processing rebars from the detail drawings.
The general style of the detail drawings of the rebars is shown in Figure 1, including the bending shape and length of the steel bar. The information stored in the detail drawing can be divided into geometric and non-geometric information. The geometric information includes the size and direction of the bending angle, and the non-geometric information mainly refers to the length annotation information in the drawing. The focus of this research was to accurately extract the geometric and non-geometric information contained in the detail drawing of the rebar and establish the corresponding mapping relationship to integrate the final shape processing information of the rebar. Figure 2 shows the framework for extracting the steel bar processing information based on a detail drawing of a rebar.

3.1. Preprocessing of Rebar Detail Drawing

The detailed image of the rebar extracted from the design scheme is a color image, that is, a three-channel image composed of three color components (R, G and B). The RGB color space is a color model that represents multiple colors by superimposing three primary colors (R: red, G: green, B: blue). It can be expressed as a three-dimensional coordinate space structure with R, G and B as the x, y and z axes, respectively. For an image where each component has an 8-bit depth, the gray level can reach 28, that is, 256 levels.
Obviously, processing color images requires processing three channels of data at the same time, which is a great challenge for research on recognizing a large number of detail drawings of rebars. For this study, the presence or absence of color information does not affect the extraction of the rebars’ processing information, so it is a good choice to convert it to grayscale rather than color images. Compared with color images, grayscale images only contain the brightness attributes and discard the two color attributes of hue and saturation.
From the perspective of digital image processing, the dimension of the image matrix is reduced from three-dimensional to one-dimensional after conversion to grayscale, but the preservation of key features such as gradient information can greatly improve the running speed of image processing. However, for this study, the gray level of the grayscale image did not need to be segmented too finely. The research only needed to segment the foreground and background and process the information of the foreground image. Therefore, it was necessary to process the grayscale image further into a binary image.
The binary image is the most compact model of an image, and the corresponding pixel value has only two states, 0 or 1. We used 0 to represent black (the background image) and 1 to represent the white foreground. At the same time, digital image processing based on binary images can reduce the amount of computation to a minimum, so the study first performed grayscale and binarization processing on the detailed images of the rebars.

3.2. Grayscale Image Processing

The object of image grayscale is color images. At this stage, the grayscale conversion of color images can be carried out mainly by combining the following principles:
  • Maximum priority principle
The maximum value priority principle is to take the maximum value of the three color components corresponding to a pixel to represent the gray value of the point in the grayscale image, which can be expressed by the following formula:
F x , y = max R x , y , G x , y , B x , y ,
where the gray value at the pixel point whose coordinate is x , y in the grayscale image is expressed as F x , y ,   R x , y , G x , y , B x , y represents each component at the pixel.
  • The principle of substitution of average values
The average value substitution principle is that the average value of the color components at a pixel point represents the gray value of the point, which can be expressed by the following formula:
F x , y = R x , y + G x , y + B x , y 3 ,
  • Weighted Average Substitution Principle
The main principle of the weighted average substitution principle is to assign different weights to the three components of R, G, and B according to research needs, project needs and other factors, and calculate the weighted average of the components through the weights to replace the gray value of the pixel. It can be expressed by the formula:
F x , y = W r R x , y + W g G x , y + W b B x , y 3 ,
where W r , W g , and   W b are the weights of components R, G, and B, respectively. W r , W g , and W b are constants between 0 and 1, and W r + W g + W b = 1.
By selecting different weight values, different grayscale algorithms are generated, thereby generating different grayscale images. Based on the Human Visual System (HVS), the sensitivity of the human eye to the three primary colors is green, red, and blue, so the weights need to be set according to the principle of W r > W g > W b . The original 1953 color NTSC specification, still part of the United States Code of Federal Regulations, defined the colorimetric values of the system as shown in Table 1. After many experiments and analyses, some studies have obtained the weight setting of W r = 0.299, W g = 0.587, and W b = 0.114 through coefficient validation experiments, as shown in Formula (4). The image grayscale algorithm set with this parameter has been adopted by the MATLAB software as a function, that is, I = rgb2gray (RGB). It describes the conversion of a color image RGB to a grayscale image I.
F x , y = 0.299 R x , y + 0.587 G x , y + 0.114 B x , y 3 ,
Among the above-mentioned image grayscale algorithms, the maximum value priority method is simple to operate and requires the least amount of computation, but the principle of replacing with the maximum value will cause the image to be too bright; the average value method makes full use of the color component information of three channels. However, after many tests in the research, it was found that the results could not meet the project requirements; the weighted average method is based on the HVS system, and the parameter settings are reasonable. In the experiment, grayscale images that meet the requirements can be obtained. The overall effect is good and can meet the project requirements. Therefore, the study adopts the weighted average method to grayscale the rebar detail image.

3.3. Binary Image Processing

The binary image can minimize the amount of data in the image while saving the target edge contour, which is beneficial to improve the speed of image processing. The key to image binarization lies in the selection of the threshold. Some studies use the gray histogram method for image segmentation [23]. This method can often achieve better results in the ideal situation where the gray level difference between the foreground and background is obvious. In an ideal situation, the foreground and background constitute two peaks in the gray histogram, and a valley will be generated at the intersection of the two peaks in the middle. Selecting a threshold near the valley can generally achieve better binary image conversion. However, for most images, it is usually difficult to accurately detect the valley, and especially when the image is noisy or the heights of the two peaks are very different, there will not be an obvious valley. As a result, the effect of this algorithm in practical applications is not significant.
Maximum between-class variance method (OTSU) [24], proposed by Nobuyuki OTSU in 1978, determines the optimal threshold by maximizing the between-class variance of gray levels in the foreground and background. Since it was proposed, it has attracted the attention of many related scholars due to its advantages of small calculation amount, strong robustness and good applicability. Based on these advantages, many scholars have improved the OTSU method for their own fields [25,26]. In this study, the grayscale image of the rebar detail image will be binarized based on the improved OTSU method.
First, set the grayscale image to contain L grayscale levels: 0 ,   1 ,     ,     L 1 , where the total number of pixels with a grayscale value of level “i” is denoted as n i , then the total number of pixels in the image can be expressed as: N = n 0 + n 1 + + n L 1 . At the same time, the gray histogram is normalized and regarded as a probability distribution, and the probability of the pixel point of the i level gray value is:
p i = n i N ,     p i 0 , i = 0 L 1 p i = 0 ,
Suppose the image is divided into foreground part C 0 and background part C 1 , C 0   by threshold k , which represents the pixel points with gray level 0 ,   1 ,   , k , C 1 represents the gray level is k + 1 ,   , L 1 of pixels. Let ω 0 represent the probability of the pixel in the foreground area, and ω 1 represent the probability of the pixel in the background area. The formula is as follows:
ω 0 = P C 0 = i = k + 1 L 1 P i ,
ω 1 = P C 1 = i = 0 k P i = 1 ω 0   ,
Then the average gray value μ 0 ,     μ 1 ,     μ T of the foreground area, background area and the whole image can be calculated by the following formulas, respectively:
μ 0 = i = k + 1 L 1 i P i ω 0 ,
μ 1 = i = 0 k i P i ω 1   ,
μ T = i = 0 L 1 i P i   ,
Based on the above values, the variance σ 0 2 of the foreground region and the variance σ 1 2 of the background region can be calculated.
σ 0 2 = i = k + 1 L 1 i μ 0 P i ω 0 ,
σ 1 2 = i = 0 k i μ 1 P i ω 1   ,
And the intra-class variance σ W 2 , the inter-class variance σ B 2 , and the total variance σ T 2 for the foreground and background:
σ W 2 = ω 0 σ 0 2 + ω 1 σ 1 2 ,
σ B 2 = ω 0 μ 0 μ T 2 + ω 1 μ 1 μ T 2 = ω 0 ω 1 μ 0 μ 1 2 ,
σ T 2 = i = 0 L 1 i μ T 2 P i ,
Meanwhile, there are three judgment criteria as follows:
λ = σ B 2 σ W 2 ,
κ = σ B 2 σ W 2 ,
η = σ B 2 σ T 2 ,
For grayscale rebar detail image, maximizing the inter-class variance can obtain a better threshold to achieve image binarization, while minimizing the intra-class variance can ensure that the foreground and background each obtain a more uniform grayscale conversion. Therefore, the study adopts the first judgment criterion: λ = σ B 2 σ W 2 , When there is a threshold k that makes λ the largest, this threshold k is the best threshold for binarization of the rebar detail image.
Finally, compare the pixel value of each point in the grayscale image of the rebar detail image with k , set the foreground pixels larger than the threshold k to 1, and set the background points smaller than the threshold k to 0. Obtain the binary map of the rebar detail image.

4. Extraction of the Rebars’ Processing Information

4.1. Design of a Segmentation Algorithm for Feature Regions of the Rebars’ Detail Drawing

In order to realize the accurate extraction of steel bar processing information, an important step is to perform image segmentation. Image segmentation refers to the process of dividing an image into multiple segments and extracting regions of interest based on similarity criteria such as color, brightness or texture [27,28]. Image segmentation can help computers better understand images and extract the corresponding information or objects. Since the results of image segmentation are affected by many factors, such as image homogeneity, image continuity, image texture, image content, spatial characteristics, etc., this study analyzed the principles of common image segmentation algorithms:
  • Image segmentation based on thresholds
The threshold-based image segmentation algorithm is easy to operate but is still effective. It is mainly used to segment images with bright objects on dark backgrounds. If f represents the grayscale image, g represents the binary image and T represents the threshold, the threshold segmentation is equivalent to the following transformation from f   to g :
g x , y = 1         f x , y T 0         f x , y < T ,
Threshold setting is the core of threshold segmentation. According to different image processing requirements, it can be divided into global threshold, local threshold and dynamic threshold. The factors that affect the selection of the threshold can be expressed by the following formula:
T = M x , y , p x , y , f x , y ,
where f x , y represents the gray value at the point x , y , p x , y represents the local attribute of the point.
  • Image segmentation based on edge detection
An edge is a set of connected pixels between different areas. There are generally significant discontinuities between different regions, such as grayscale changes, color sharpness, textural changes and so on. Image segmentation can be achieved by detecting these discontinuities. It can be solved by the grayscale histogram method, which is used to describe the distribution of pixel values in the image. Taking the gray value as the abscissa and the total number of pixels of the gray value in the figure as the ordinate, the proportion of pixels of each gray value can be visually displayed.
Generally, in an image, the pixel values of the foreground and background will be significantly different. In this case, we can use two Gaussian curves to fit the grayscale histogram of the image. P 1 x   and P 2 x represent the fitting curves of the foreground and background, respectively, and the intersection of the two curves is the optimal threshold T of the image, as shown in Figure 3.
Different image segmentation algorithms can achieve good results in specific conditions and fields, but relevant experimental results have shown that a general image segmentation algorithm has not yet been found to be suitable for all image segmentation scenarios. Therefore, the main direction at this stage is to develop corresponding image segmentation algorithms according to specific engineering scenarios. According to the specific requirements of extracting steel bars’ processing information, this research comprehensively analyzed the mathematical and physical characteristics of a detail drawing of a rebar and proposed an image segmentation algorithm that is suitable for separating geometric and non-geometric information.
A comprehensive analysis of the master drawings of reinforcement found that the number and line segment areas are independent, belonging to different connected areas, and the area of each number-connected area is much smaller than the area of the line areas. In addition, the contour aspect ratio of each number is close, and the width is less than the height (that is, the aspect ratio is less than 1) and the aspect ratio of the line outline is much greater than 1. These two characteristics can distinguish the number areas and the line segment areas. To ensure the strong robustness of the method, an image segmentation method based on the area and contour aspect ratio of the connected area was proposed, based on these characteristics.
The method was initially based on the two-pass algorithm to mark and classify each connected area. If we take Figure 4 as an example, there are 11 connected areas. The pixels in each connected area are counted and sorted from large to small. Next, based on the pixel coordinate set of each connected area obtained from the previous connected area statistics, the minimum external rectangle of each connected area is calculated as follows.
Let the set of pixel coordinates of a connected area be: {( x 1 ,   y 1 ), ( x 2 ,   y 2 ), ( x 3 ,   y 3 ), …, ( x n 1 ,   y n 1 ), ( x n ,   y n )}, then the contour outer rectangular equation of the connected region is:
f x , y = m i n x 1 , x 2 , , x n ,     m i n y 1 , y 2 , , y n < y < m a x y 1 , y 2 , , y n m i n y 1 , y 2 , , y n ,     m i n x 1 , x 2 , , x n < x < m a x x 1 , x 2 , , x n m a x x 1 , x 2 , , x n ,     m i n y 1 , y 2 , , y n < y < m a x y 1 , y 2 , , y n m a x y 1 , y 2 , , y n ,     m i n x 1 , x 2 , , x n < x < m a x x 1 , x 2 , , x n
Therefore, the aspect ratio of the connected area:
w h = max x 1 , x 2 , , x n min x 1 , x 2 , , x n max y 1 , y 2 , , y n min y 1 , y 2 , , y n ,
The connecting area and contour aspect ratio of each connected area are calculated, and the connecting area with the largest connected area is taken out to determine whether its aspect ratio is also the largest. If these two conditions are met, the connected area is retained, and the other connected areas are deleted. If the connected area with the largest area of the connecting area does not have the largest aspect ratio, the connected area with a large area of the connecting area is preferentially retained, and the other areas are deleted. The final identification result regarding the type of reinforcement needs to be marked through a subsequent check.
The operation described above produces an image containing only lines after all the digital annotation information has been deleted. We can ultimately use the initial binary image to make different images, as one can obtain two binary images of shape and number annotation that are separate from each other, as shown in Figure 5a,b.

4.2. Extraction of the Rebar’s Bending Angle Information

For the segmented shape line image, the process of extracting the bending angle information for steel bar processing is the most important. This information mainly includes the bending angle and the bending direction. The extraction of the bending angle size and bending direction information needs to be based on the feature points in the shape’s lines, that is, the endpoints and corners, to perform inference calculations, so an accurate corner detection algorithm is essential. The detection of corners and endpoints needs to be based on lines. Lines with multiple pixel widths cannot ensure the accuracy of feature point detection. Therefore, image thinning operations are required for the shape’s line images.

4.2.1. Refinement of the Rebar’s Shape Area Image

The shape and line width in the image of the detail drawing of a rebar is usually 2 to 4 pixels wide. The endpoints and corners extracted on this basis can only be guaranteed to be in an approximate range and cannot reach pixel-level accuracy. In order to improve the accuracy of the information extraction process, this research used the image thinning algorithm to process the detailed image of the rebar.
The thinning operation for the rebar’s shape line image was carried out in two stages. Before studying the thinning operation, we first defined the pixel neighborhood and direction as follows, as shown in Figure 6.
Where P 1 represents the currently processed pixel point, and its coordinates are i , j , and P 2 to P 9 represent the pixel points of different orientations in the eight neighborhoods of P 1 .
In the refinement operation, the pixel points in the eight neighborhoods of the current pixel point are generally determined by the determination criterion, and the deletion or retention of the current pixel point is determined.
In the binary image of the rebar detail drawing, the foreground image is a black line, the pixel value is 0, the background is white, and the pixel value is 255. There are only two possibilities for the selection of pixel values. For a computer with a binary storage mechanism, storing 0 as “00000000” and storing 255 as “11111111” requires 8-bit encoding, which is actually just to distinguish two numbers, which is too wasteful of storage space. Therefore, in general research, the mapping relationship between “0–255” and “0–1” is established, that is, the binary image is converted into a simple binary image form containing only two values of 0 and 1. This study will take this expression, with 0 for black and 1 for white.
In order to facilitate the refinement operation, the research firstly inverts the color and hue of the binary image of the rebar shape and line and maps it to the binary space of 0–1, as shown in Figure 7.
In the first stage of refinement, the source image “Source _IMG” is first copied as a temporary image “Temporary _IMG”, and all pixels in Temporary _IMG are judged based on the following judgment criteria. If the pixels in Temporary _IMG meet the following conditions, then set the pixel value at the corresponding coordinate in the Source _IMG to 0:
2 B P 1 6 ,
A P 1 = 1 ,
P 2 P 4 P 6 = 0 ,
P 4 P 6 P 8 = 0 ,
Among them, in Condition 23, B P 1 = P 2 + P 3 + P 4 + + P 8 + P 9 , Condition 1.a can ensure that the endpoints of the lines are not deleted after thinning. In Condition 1.b, A P 1 is defined as the number of 0–1 patterns in the eight neighborhoods of the image, which is expressed as a closed loop from P 2 ,     P 3 ,     P 4 ,   ,   P 8 ,   P 9 to P 2 , the pixel point The total number of transformations from 0 to 1, as shown in Figure 8a, in the eight neighborhoods of point P 1 , the number of occurrences of the 0–1 pattern is 2, that is, A P 1 = 2 . Condition 1.b is used as the deletion condition, which can ensure that the middle point of the line after thinning is not deleted, which ensures the connectivity of the thinning result. As shown in Figure 8b–d, A P 1 is greater than 1. If this point is deleted, the continuity of the line will be affected.
Condition 1.c and 1.d can be solved simultaneously to obtain P 4 = 0 or P 6 = 0 or P 2 = P 8 = 0 According to the definition of the direction of each pixel neighborhood, the deleted points are the eastern boundary point, the southern boundary point or northwest corner point.
In the second stage, based on the updated source image Source _IMG in the first stage, a temporary image Temporary _IMG is also copied, and the pixels in the Temporary _IMG are determined based on the following criteria to select whether the pixels in the corresponding positions in the Source _IMG are placed. 0:
2 B P 1 6
A P 1 = 1 ,
P 2 P 4 P 8 = 0 ,
P 2 P 6 P 8 = 0 ,
Conditions 2.a and 2.b are the same as in the first stage, and conditions 2.c and 2.d are calculated for the problem that only the southeast boundary point and the northwest corner point are processed in the first stage.
These two stages are the main flow of the refinement operation of the binary image of the shape and line of the steel bar. In the thinning operation, the contour points are deleted in two stages of the cycle, and the loop is terminated when no contour points that can be deleted are found during a certain stage. After finishing the thinning operation, the output image is a binary image of steel bars with a width of one pixel.

4.2.2. Detection of the Bending Feature Point

In calculating the bending angle of the steel bar, it is first necessary to accurately detect the coordinates of the feature points, which mainly include two key feature points: the endpoints and the corner points. Endpoints are generally defined as the starting or ending point of a line segment or ray, such as the two points marked by the triangle in Figure 9. On the basis of the results of these refinement operations, the endpoints of the detail drawing of the rebar can be quickly screened out. The main reason is because in a line image with a width of one pixel, the endpoints have the following characteristics: in its eight neighborhoods, only one pixel is the foreground image, that is, the sum of the pixel values of its eight neighborhoods is equal to 1. There are two endpoints of the curve, which can be expressed by Formula (31).
B P 1 = 1 ,
For the identification of the middle corner point of the curve, a variety of angle point detection algorithms can be detected. According to the different principles of corner point recognition, the existing corner point detection algorithms include corner point detection based on grayscale images and corner point detection based on contour curves. Among these, the corner point detection algorithms based on the grayscale image include the Moravec detection algorithm, the Harris detection algorithm, etc. Most algorithms conduct global angle detection through mobile windows, and the detected angles lack sorting, which cannot meet the needs of the subsequent angle calculation.
The contour curve-based angle detection method [29] performs angle detection on the contour rather than on the whole image, which can not only ensure higher accuracy, but also sort the diagonal points according to the direction of the contour, which can better meet the needs of the subsequent angle calculation. Therefore, the study used the corner point detection method based on the contour curve to detect the middle corner point of the line.
Corner point detection methods based on profile curves include corner point detection methods based on Freeman code, corner point detection methods based on the curvature scale space (CSS) and angle-based corner point detection methods, etc. Among these, the robustness and accuracy of the detection method based on Freeman code are higher than those of other algorithms [30]. Freeman chain codes are based on a rectangular array representation and represent geometric curves as a connected sequence of straight-line segments with a fixed length and orientation. Generally, 4-connected or 8-connected chain codes can be selected according to the geometric characteristics of different curves. The default ordering of the chain code is counterclockwise. According to the general orientation method, the 4-connected chain code is represented by the number set i | i = 0 , 1 , 2 , 3 , with due east (the right-hand side) taken as Point 0. The four directions are shown in Figure 10a. The angle between each direction and the 0 direction is 90 ° × i . Similarly, the 8-connected chain code represents the eight directions shown in Figure 10b as the number set i | i = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 . The angle between each direction and the 0 direction is 45 ° × i .
The most notable feature of the detail drawing of a rebar is that it is mainly a polyline composed of multiple straight-line segments, and the chain code’s composition is relatively regular compared with the complex edge contour curve. The bending angles of steel bars are different, so this research adopted the 8-connected Freeman chain code to carry out corner detection. The specific process is as follows:
(1)
Traversing pixels, based on the characteristics of the endpoint   b P n = 1 , are used to obtain the coordinates of the two endpoints. Let the starting coordinate be   D s x s , y s and the ending coordinate be D e x e , y e .
(2)
Starting from the starting point to the end point, obtain the Freeman code of the foreground pixels and form the chain code set F: { F 1 , F 2 , F 3 , , F i } in order.
(3)
For detecting the circulating body, starting from the current element of the chain code collection 1, 2 ,..., n adjacent elements are selected sequentially to form the initial circulating body for determination, and the threshold of the number of cycles is set T = 5; when the number of cycles in the current chain code sequence is greater than or equal to T, the initial circulating body is regarded as a formal circulating body.
(4)
Match the loop body along the chain code set sequence.
(5)
If the current loop body does not match a certain sequence, the current matching process ends; at the same time, the pixel corresponding to the chain code value of the last matching sequence of the current loop body is set as a corner point, and its coordinates are recorded.
(6)
Repeat Step 3 until the entire chain code set F has been searched.
(7)
Calculate the distance between adjacent corner points. Eliminate the adjacent corner points whose distance is less than the threshold.
(8)
At the end of the algorithm, according to the search order, output the corner coordinates A: {   A 1 , A 2 , A 3 ,…, A n }.
For the convenience of subsequent description. Set the start point coordinates D s ( x s , y s ), the end point coordinates D e x e , y e and the corner point coordinates A:{   A 1 , A 2 , A 3 ,…, A n } in order from the start point to the end point. Unified as the feature point coordinate set S: {   S 1 , S 2 , S 3 ,…, S n }. Among them,   S 1 represents the starting point D s , ( x s , y s ), and S n represents the end point D e ( x e , y e ).

4.2.3. Rebar Bending Angle Calculation

Based on the above ordered feature point set S: {   S 1 , S 2 , S 3 , …, S n }, select the adjacent three points to construct the vector S i S i + 1 :   x i + 1 x i , y i + 1 y i , S i + 1 S i + 2 :   x i + 1 x i , y i + 1 y i ( i = 1 , 2 , 3 n ). According to the formula of the cosine value of the vector included angle, the vector included angle θ can be obtained.
θ = cos 1 x 1 x 2 + y 1 y 2 x 1 2 + y 1 2 x 2 2 + y 2 2 ,
As shown in Figure 11, the vector included angle θ is equal to the supplementary angle of ∠ABC, that is, ∠ABE, then θ is the final bending angle.
Finally, the angle is corrected according to the common angle modulus set in the specification. Commonly used angle moduli are D = {30, 45, 60, 90, 135, 180}, forming the difference between θ and the angle modulus and taking the absolute value. When there is an angle difference within   ± 5 ° , the modulus corresponding to the smallest absolute value is selected to correct θ. When it exceeds the range of ± 5 ° , it is output directly without correction.
σ = m i n θ D i + θ ,     m i n θ D i 5 θ ,     m i n θ D i > 5 ,

4.2.4. Determine the Bending Direction of the Steel Bar

For the processing information of steel bars, the calculation of the angle size only determines the value of the bending angle. However, the bending direction (i.e., clockwise or counterclockwise) is also key information for processing steel bars. By combining the characteristics of steel bar processing equipment, a method for determining the direction (clockwise and counterclockwise) based on the vector product is proposed.
For this, the two end points and all the intermediate inflection points of the bending of the steel bar have been established. The study combined the coordinates of the adjacent three points in any segment. Let us consider the method of determining the direction based on the vector product, assuming that the coordinates of the adjacent three points are A: ( x 1 , y 1 ), B: ( x 2 , y 2 ), C: ( x 3 , y 3 ) .
In order to determine the bending direction of the AB segment relative to the BC segment, the CB vector: ( x 2 x 3 , y 2 y 3 ) and the CA vector: ( x 1 x 3 , y 1 y 3 ) can be constructed, respectively. According to the definition of vector product,   C B is cross multiplied by C A . The result is a third-dimension vector perpendicular to C B and C A . The direction is determined by the right-hand spiral rule. Therefore, the third dimension is derived. As shown in Figure 12, if i ,   j ,   k are the unit vectors in the X, Y, Z directions, then there is Formula (34).
k is the unit vector. Therefore, its size and direction are determined. Therefore, the direction of the vector product of C B and C A is only related to x 2 x 3 y 1 y 3 x 1 x 3 y 2 y 3 . Combined with the right-hand screw rule: When the four fingers of the right hand turn from C B at a turning angle of no more than 180 degrees to C A , the direction of the thumb up is the direction of C B × C A It can be concluded that if the direction from C B to C A is clockwise, the direction of C B × C A is opposite to the unit vector k , namely: x 2 x 3 y 1 y 3 x 1 x 3 y 2 y 3 < 0 . If the steering is counterclockwise, the opposite is true. Suppose ∠ABC is α , counterclockwise is α , and clockwise is α , then there is Formula (6). Based on the coordinate of the characteristic point, the direction of the bar bending needle can be calculated by Formula (35).
C B × C A = i j k x 2 x 3 y 2 y 3 0 x 1 x 3 y 1 y 3 0 = x 2 x 3 y 1 y 3 x 1 x 3 y 2 y 3 k
f x 1 , x 2 , x 3 , y 1 , y 2 , y 3 , α = α ,     x 2 x 3 y 1 y 3 x 1 x 3 y 2 y 3 > 0 α ,     x 2 x 3 y 1 y 3 x 1 x 3 y 2 y 3 < 0
.
Finally, output the revised set of bending angles of steel bars with directions:   α 1 , α 2 ,   α 3 , , α n

4.3. Extract the Rebar’s Labeling Information

Extracting the label information involves identifying the value of the label length. The previous processing step is shown in Figure 13. The label length’s identification only contains the length label’s information. The requirements for the identification of the detail drawing of the rebar include: (1) accurately identifying the labeling information, and (2) extracting the coordinate positions of the labeling information. The importance of recognizing the labeling information is self-evident, as it is related to the processing length of the subsequent steel bars. The coordinates are extracted to establish the mapping relationship between the angle information and the length information; otherwise, it will cause multiple angle information and length information mismatches.
In the icon annotation information map of the detail drawing of the rebar, there are multiple label information areas, and each label information area contains multiple numeric characters. For example, Figure 3 has three labeled information areas. Each area contains multiple characters. In order to improve the accuracy of extracting the labeling information, first, each labeling information area needs to be extracted separately.
The analysis found that the distance between the characters in each label information area is much smaller than the distance between adjacent areas. Through morphological methods, multiple characters in each labeled information area can be formed into connected domains. The circumscribed rectangle of each labeled information area is calculated by the method of calculating the circumscribed rectangle of the connected area. The coordinates of the four corner points of the circumscribed rectangle can accurately extract each label information area for subsequent identification of the label information. At the same time, the center point coordinates can be calculated on the basis of the circumscribed rectangle, denoted as P i x i , y i .
The test results found that the size of the extracted area was smaller. In order to improve the accuracy of label information recognition, it is also necessary to zoom in on each label information area. Enlarging the image will introduce some new pixels. This operation mainly used the image interpolation algorithm to assign new pixels. The mainstream interpolation algorithm at this stage was linear and non-linear interpolation. Linear interpolation is simple and easy to implement and can meet the needs of information extraction. Therefore, the research adopted a linear interpolation algorithm for the image enlargement operation.
These operations can obtain the enlarged label information area and the corresponding center point coordinates. For the segmented label information area, we only needed to perform digital recognition. Currently, many researchers have carried out studies on digital recognition [31]. Digital recognition technology is relatively mature. For example, Tesseract-OCR, which is an open-source image OCR text recognition engine, was developed by HP in 1985. It has been improved over the years to target letters, and its accuracy of digital recognition has been quite high. This research used the Python language and Tesseract-OCR for the final digital recognition and extraction. This involved passing the enlarged picture to OCR and setting the whitelist of Tesseract-OCR to a digital format (digits). The system can only match the digital library, which greatly improves the accuracy of digital recognition. The recognition process is mainly composed of two stages, which are image layout analysis and character segmentation recognition. The process of image layout analysis mainly involves layout analysis and detection of text lines and characters. The layout analysis stage will analyze the connected area of the input binary image, determine the horizontal or vertical direction of the text, and correct the direction of the text with a large difference in direction to unify the text direction. The algorithm used in the character segmentation and recognition phase is mainly composed of five parts: character segmentation, character recognition, character feature classification, word segmentation and retrieval and adaptive classifier. The difference between Tesseract-OCR and the traditional typical OCR identification process is shown in Figure 14. Firstly, the irrelevant factors such as punctuation and noise are filtered out by character segmentation, and the glued text is segmented; only the character region is extracted. Then each character is initially recognized, and the recognizable characters are regarded as training data and sent to the adaptive classifier for deep training and learning. Subsequent second recognition, mainly for the characters that were not accurate enough for the first recognition, will be re-recognized for the fuzzy part to obtain better recognition results. Finally, the recognized text information is output by combining the recognition results of the two stages. The final output length label information set was L: l 1 , l 2 , l 3 , , l n , l n + 1 , and the corresponding center point coordinates were P: P 1 , P 2 , P 3 , , P n , P n + 1 .

4.4. Establish the Mapping Relationship of the Steel Processing Information

One of the keys to recognition of rebar length is the mapping between the labeling information and the line segments. Otherwise, even if the labeling information is accurately identified, if it cannot be associated with the correct line segment, it will still lead to information extraction errors. The research proposed a mapping method, which is the label information of the spatial position and the corresponding line segment. These are used to calculate the distance from the center point of the labeled information area to the corresponding line segment. The algorithm then selects the point with the smallest distance and establishes its mapping relationship.
The research calculated the distance from P i x i , y i to each line segment. At the same time, the mapping relationship between the label information and the line segment was determined. Firstly, we defined the distance from the point to the line segment. First, as shown in Figure 15a, if the intersection of the perpendicular of the straight line from the point to the line is on the line segment, the perpendicular is the distance from the point to the line, that is, the CD segment. Second, as shown in Figure 15b, if the intersection is not on the line segment, the distance from the point to the end of the line segment with a shorter distance is taken as the distance from the point to the line segment, that is, the CA segment.
In this research, for each labeled information area, the distance from the center point to a certain line segment was calculated separately. For example, Figure 9 was numbered for each feature point and center, as shown in Figure 16a–c. A is the starting point; B and C are the intermediate corner points; D is the end point; E, F, and G are the center points of each marked information area; and H is the intersection of the vertical lines. The research determined the mapping relationship between the label information area and the line segment according to the starting point A to the end point B. As shown in Figure 16a, we first determined the relationship between Points E, F and G and Segment AB. We calculated the distance from Points E, F and G to the line segment AB. The distances were in the order: EH < HF < HG. The minimum distance point was E. We established the mapping relationship between the marked information area corresponding to Point E and Segment AB. As shown in Figure 16b, we determined the mapping relationship between Points E, F and G points and Segment BC. The perpendicular line between Points E and G is the extension of line segment BC. When connecting, we selected the closest end point. this represents the distance from the point to the line segment BC. F represents the shortest distance in a vertical line. The distances were ordered as FH < EB = GC. We selected the minimum distance F and established the mapping relationship between the label information area corresponding to Point F and Segment BC. As shown in Figure 16c, the method of establishing the mapping relationship between Point G and Segment DC was the same as that for Point E.
We assumed that the lengths of the label information regions corresponding to E, F and G are l E , l F and l G . According to the established mapping relationship, the corresponding length values in sequence from A to D are { l E , l F , l G }.
According to the above mapping relationship, the order in the length labeling information set L: l 1 , l 2 , l 3 , , l n , l n + 1 extracted in Section 4 is adjusted from the starting point to the ending point. Finally, the bending angle information set α 1 , α 2 , α 3 , , α n and the adjusted length label information set l 1 , l 2 , l 3 , , l n , l n + 1 are merged. Then the final processing shape information of the steel bar can be obtained: l 1 , α 1 , l 2 , α 2 , l 3 , α 3 , , l n , α n , l n + 1 .

5. Experimental Results and Analysis

In order to verify its practicality, the system was optimized and improved. The study selected a steel bar schedule for an apartment under construction for testing. The test focused on improving the recognition stability and recognition speed.

5.1. Test Environment

This method was run in the Python 3.6 compilation environment. It was tested in environments such as the open-source computer vision library OpenCV4.1 and the open-source image OCR text recognition engine Tesseract-OCR. The computer environment used in the test was an Intel(R) Core(TM) i7-9750H CPU 2.60 GHz processor with 16 GB RAM, Windows 10 64-bits and an NVIDIA Quadro K1200 graphics card.

5.2. Experimental Procedures

  • Step 1: Get detail drawing of a rebar, input the image;
  • Step 2: Image preprocessing, grayscale the input large sample image, and then compare the pixel value of each point in the grayscale image with the threshold k. The foreground pixels larger than the threshold k are uniformly set to 1, and the background pixels smaller than the threshold k are uniformly set to 0. Get the binary image of the rebar image;
  • Step 3: Labeling and classification of connected domains for binary graphs. Take out the connected area with the largest area and determine whether its aspect ratio is also the largest. If the above two conditions are met, this area is retained, and other areas are deleted to complete image feature segmentation;
  • Step 4: Extract feature points from the image, and then judge the bending angle and direction of the steel bar. Finally, the area of rebar labeling information is divided by the morphological method, and the labeling information is extracted;
  • Step 5: By calculating the distance from the center point of the marked information area to the corresponding line segment, take the point with the smallest distance, and establish the mapping relationship between the geometric information and non-geometric information of the steel bar;
  • Step 6: Output steel bar processing information.
  • The computer is used to perform the above steps on each group of detail drawing of a rebar, and finally the extraction of rebar processing information can be completed.

5.3. Test Results

The study selected 10,000 rows in the steel bar schedule. Table 2 shows the test results for some different shapes. The recognition results are displayed in a coded form with specific rules. The encoding, from left to right, shows the results of the key recognition of the detailed image of the rebars from the starting point on the left to the right. A comma is used as the interval, and the odd numbers are the length of each section of the steel bar. The even digits are the bending angles between the adjacent ends. When the angle is greater than 0, the bend is clockwise, and when the angle is less than 0, the bend is counterclockwise. The test results are shown in Table 3. The selected 10,000 rows of the steel bar schedules were divided into five groups for overall testing.
According to a comprehensive analysis of all the test results, the algorithm’s recognition speed was relatively stable. The average recognition speed of each picture can be controlled within 0.2 s. The average recognition accuracy was around 99%. In Table 2, the incorrect identification was for a special-shaped steel bar or the detail drawing of rebars that had other influencing factors. For regular-shaped steel bars, the overall recognition accuracy of the system was relatively high. The automatic method of extracting steel bar processing information proposed in this study achieved satisfactory results for detail drawings of rebars with conventional shapes. However, for some special-shaped steel bars, such as detail drawings of rebars with additional leads, labels and other related elements added separately, the identification results will be affected to a certain extent. In future research, targeted identification strategies with additional factors will need to be introduced to achieve more comprehensive extraction of processing information.

6. Conclusions

By combining the processing characteristics of CNC steel bar processing equipment and the specific construction requirements, this research constructed a framework for automatically extracting and coding steel bar processing information based on computer technology and digital image processing technology and proposed corresponding methods. Firstly, the information extraction research is carried out around the detail drawing of rebars. The detail drawing of rebars was preprocessed to eliminate redundant information and digitize the image. By analyzing the classical image segmentation algorithms, combined with the information extraction requirements, an image segmentation algorithm based on pixel statistics is proposed, which realizes the separate storage of geometric and non-geometric information. Then, for the extraction of geometric information, through line thinning and feature point detection, the feature point coordinate extraction is effectively realized, and the angle and direction of the bending of the steel bar can be further calculated. For the extraction of non-geometric information, the corresponding label area is segmented, and the OCR engine is used to extract label information for the label area. Finally, by defining the distance from the point to the line segment, a mapping method for the label information and the corresponding line segments based on the spatial position was proposed.
The method proposed in this study can efficiently and accurately extract the rebar’s processing information from the rebar’s processing details and may provide a basis for the intelligent development of rebar engineering. The automatic extraction method of steel bar processing information proposed in this study can achieve satisfactory results for the detail drawing of rebars with conventional shapes. However, for some special-shaped steel bars, such as a detail drawing of complex steel bars with additional leads, labels and other related elements added separately, the identification results will be affected to a certain extent. In future research, targeted identification strategies for additional factors can be introduced to achieve more comprehensive processing information extraction.

Author Contributions

Conceptualization, Z.M. and Q.Z.; methodology, Z.M.; software and T.C.; validation, Q.Z.; formal analysis, Y.Z.; investigation, Z.M. and T.C.; data curation, Y.Z.; writing—original draft preparation, Z.M. and X.H.; writing—review and editing, Q.Z. and Y.Z.; visualization, Z.M.; supervision, X.H.; project administration, Q.Z.; funding acquisition, Q.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Nature Science Foundation of China (51878556) and the Key scientific research projects of Shaanxi Provincial Department of Education (20JY049).

Institutional Review Board Statement

The study not involving humans or animals.

Informed Consent Statement

The study not involving humans or animals.

Data Availability Statement

The study did not report any data.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zheng, C.; Yi, C.; Lu, M. Integrated optimization of rebar detailing design and installation planning for waste reduction and productivity improvement. Autom. Constr. 2019, 101, 32–47. [Google Scholar] [CrossRef]
  2. Ma, Z.; Zhao, Q.; Cang, T.; Li, Z.; Zhu, Y.; Hei, X. An Intelligent Optimization Method of Reinforcing Bar Cutting for Construction Site. CMES-Comput. Modeling Eng. Sci. 2022. epub ahead of print. [Google Scholar] [CrossRef]
  3. He, H.-N.; Wang, X.-C.; Peng, G.-Z.; Xu, D.; Liu, Y.; Jiang, M.; Wu, Z.-D.; Zhang, D.; Yan, H. Intelligent logistics system of steel bar warehouse based on ubiquitous information. Int. J. Miner. Met. Mater. 2021, 28, 1367–1377. [Google Scholar] [CrossRef]
  4. Evtyukov, S. Improved Technology of Reinforcement Works and Technical Substantiation of Reinforcement Bar Oscillation Cutting. Contemp. Probl. Archit. Constr. 2014, 1020, 66–70. [Google Scholar] [CrossRef]
  5. Aram, S.; Eastman, C.; Sacks, R. Requirements for BIM platforms in the concrete reinforcement supply chain. Autom. Constr. 2013, 35, 1–17. [Google Scholar] [CrossRef]
  6. Applied Systems Associates (aSa), aSa Rebar Software, aSa Rebar Industry Partners. Available online: https://www.asahq.com/ (accessed on 6 June 2021).
  7. Navona, R.; Rubinovitzb, Y.; Cofflerc, M. Rebar computer aided design and manufacturing. Autom. Robot. Constr. 1994, 11, 155–162. [Google Scholar]
  8. Navon, R.; Rubinovitz, Y.; Coffler, M. RCCS: Rebar CAD/CAM System. Comput.-Aided Civil. Infrastruct. Eng. 1995, 10, 385–400. [Google Scholar] [CrossRef]
  9. Lee, H.S.; Kim, J.G.; Park, M.S.; Kim, H.S.; Hwang, S.J. Analysis of Bar in Coils Application to Rebar Work. Korean J. Constr. Eng. Manag. 2012, 13, 106–117. [Google Scholar] [CrossRef]
  10. Liu, Z.; Xiao, F.; Deng, Y.; Wang, Z.; Ren, J.; Li, H.; Wang, M.; Wen, J.; Zhang, G.; Yin, G.; et al. Technical Specification for Application of Fabricated Steel Bars of Concrete Structure, JGJ 366-2015.; China Architecture & Building Press: Beijing, China, 2015; pp. 6–16. [Google Scholar]
  11. Dejiang, W.; Youyang, H. Research on the Intelligent Construction of the Rebar Project Based on BIM. Appl. Sci. 2022, 12, 5596. [Google Scholar] [CrossRef]
  12. Chidambaram, S. The application of clash-detection processes in building information modelling for rebars. Smart Infrastruct. Constr. 2019, 172, 53–69. [Google Scholar] [CrossRef]
  13. Liu, Y.; Li, M.; Wong, B.; Chan, C.M.; Cheng, J.C.; Gan, V. Bim-bvbs integration with openbim standards for automatic prefabrication of steel reinforcement. Autom. Constr. 2021, 125, 103654. [Google Scholar] [CrossRef]
  14. Li, M.; Wong, B.C.; Liu, Y.; Chan, C.M.; Gan, V.J.; Cheng, J. Dfma-oriented design optimization for steel reinforcement using bim and hybrid metaheuristic algorithms. J. Build. Eng. 2021, 44, 103310. [Google Scholar] [CrossRef]
  15. Iano, Y.; Bonello, D.K.; Neto, U.B.; Dueñas, A.; Canahuire, F.; de Oliveira, G.G. Analysis of Results of Some Techniques for the Recognition of Circular Shapes in the Steel Bar Counting System Using Image Processing. In Proceedings of the 6th Brazilian Technology Symposium (BTSym’20), Campinas, Brazil, 26–28 October 2020; pp. 1006–1015. [Google Scholar]
  16. Zhao, J.; Xia, X.; Wang, H.; Kong, S. Design of real-time steel bars recognition system based on machine vision. In Proceedings of the 2016 8th International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC), Hangzhou, China, 27–28 August 2016; pp. 505–509. [Google Scholar]
  17. Zhang, D.; Xie, Z.; Wang, C. Bar Section Image Enhancement and Positioning Method in On-Line Steel Bar Counting and Automatic Separating System. Congr. Image Signal. Processing 2008, 2, 319–323. [Google Scholar]
  18. Yan, X.; Chen, X. Research on the Counting Algorithm of Bundled Steel Bars Based on the Features Matching of Connected Regions. In Proceedings of the 2018 IEEE 3rd International Conference on Image, Vision and Computing (ICIVC), Chongqing, China, 27–29 June 2018; pp. 11–15. [Google Scholar]
  19. Zhu, Y.; Tang, C.; Liu, H.; Huang, P. End-face localization and segmentation of steel bar based on convolution neural network. IEEE Access 2020, 8, 74679–74690. [Google Scholar] [CrossRef]
  20. Ying, X.; Wei, X.; Yuan, P.X.; Han, Q.D.; Chen, C.H. Research on an Automatic Counting Method for Steel Bars’ Image. In Proceedings of the 2010 International Conference on Electrical and Control Engineering, Wuhan, China, 25–27 June 2010. [Google Scholar]
  21. Su, Z.; Fang, K.; Peng, Z.; Feng, Z. Rebar automatically counting on the product line. In Proceedings of the 2010 IEEE International Conference on Progress in Informatics and Computing (PIC), Shanghai, China, 10–12 December 2010. [Google Scholar]
  22. Wang, J.; Hao, C.; Xu, X. Pattern recognition for counting of bounded bar steel. In Proceedings of the Fourth International Conference on the Applications of Digital Information and Web Technologies (ICADIWT), Stevens Point, WI, USA, 4–6 August 2011. [Google Scholar]
  23. Oliva, D.; Abd Elaziz, M.; Hinojosa, S. Image Processing. In Metaheuristic Algorithms for Image Segmentation: Theory and Applications. Studies in Computational Intelligence; Springer: Berlin, Germany, 2019; Volume 825, pp. 27–45. [Google Scholar]
  24. Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 2007, 9, 62–66. [Google Scholar] [CrossRef]
  25. Cai, H.; Yang, Z.; Cao, X.; Xia, W.; Xu, X. A New Iterative Triclass Thresholding Technique in Image Segmentation. IEEE Trans. Image Process. 2014, 23, 1038–1046. [Google Scholar] [CrossRef] [PubMed]
  26. Xue, J.H.; Titterington, D.M. T-tests, f-tests and otsu’s methods for image thresholding. IEEE Trans. Image Process. 2011, 20, 2392–2396. [Google Scholar] [PubMed]
  27. Kaut, H.; Singh, R. A Review on Image Segmentation Techniques for Future Research Study. Int. J. Eng. Trends Technol. 2016, 35, 504–505. [Google Scholar] [CrossRef]
  28. Raffo, A.; Biasotti, S. Weighted Quasi-Interpolant Spline Approximations of Planar Curvilinear Profiles in Digital Images. Mathematics 2021, 9, 3084. [Google Scholar] [CrossRef]
  29. Yu, W.; Wang, G.; Liu, C.; Li, Y.; Zhang, Z.; Liu, K. An Algorithm for Corner Detection based on Contour. In Proceedings of the Chinese Automation Congress (CAC), Shanghai, China, 6–8 November 2020. [Google Scholar]
  30. Gu, J.; Liu, W. Polygon graphic recognition based on improved fast corner detection. In Proceedings of the 2nd International Conference on Applied Machine Learning and Data Science (ICAMLDS 2020), Chengdu, China, 21–23 August 2020. [Google Scholar]
  31. Fan, C.; Zhao, C.; Gao, Z.; Zhang, H.; Zhu, X. Xilinx Zynq 7000 SoC Based Character Feature Extraction System for OCR Inspection of Integrated Circuit Chips. In Proceedings of the 11th International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 16–18 October 2020. [Google Scholar]
Figure 1. The detail drawing of the rebar. (a) The detail drawing of the distribution bar. (b) The detail drawing of the bend-up bar.
Figure 1. The detail drawing of the rebar. (a) The detail drawing of the distribution bar. (b) The detail drawing of the bend-up bar.
Mathematics 10 02974 g001
Figure 2. Information extraction framework for reinforcement processing.
Figure 2. Information extraction framework for reinforcement processing.
Mathematics 10 02974 g002
Figure 3. Threshold determination.
Figure 3. Threshold determination.
Mathematics 10 02974 g003
Figure 4. Connected area number.
Figure 4. Connected area number.
Mathematics 10 02974 g004
Figure 5. Segmentation results of feature region. (a) Label information area. (b) Rebar geometry area.
Figure 5. Segmentation results of feature region. (a) Label information area. (b) Rebar geometry area.
Mathematics 10 02974 g005
Figure 6. Definition of neighborhood and direction.
Figure 6. Definition of neighborhood and direction.
Mathematics 10 02974 g006
Figure 7. Schematic diagram of binary image.
Figure 7. Schematic diagram of binary image.
Mathematics 10 02974 g007
Figure 8. 0–1 Mode diagram. (a) The eight-neighbor pixels mode. (b) The number of 0–1 patterns is 3. (c,d) The number of 0–1 patterns is 2.
Figure 8. 0–1 Mode diagram. (a) The eight-neighbor pixels mode. (b) The number of 0–1 patterns is 3. (c,d) The number of 0–1 patterns is 2.
Mathematics 10 02974 g008aMathematics 10 02974 g008b
Figure 9. Description of feature points.
Figure 9. Description of feature points.
Mathematics 10 02974 g009
Figure 10. Neighborhood direction of Freeman chain codes. (a) The four directions of the 4-connected code chain. (b) The eight directions of the 8-connected code chain.
Figure 10. Neighborhood direction of Freeman chain codes. (a) The four directions of the 4-connected code chain. (b) The eight directions of the 8-connected code chain.
Mathematics 10 02974 g010
Figure 11. Schematic diagram of bending angle calculation.
Figure 11. Schematic diagram of bending angle calculation.
Mathematics 10 02974 g011
Figure 12. Schematic diagram of bending direction judgment.
Figure 12. Schematic diagram of bending direction judgment.
Mathematics 10 02974 g012
Figure 13. Connected region label of digital region.
Figure 13. Connected region label of digital region.
Mathematics 10 02974 g013
Figure 14. Comparison of Tesseract-OCR and typical OCR identification process. (a) Tesseract OCR identification process. (b) Typical OCR process.
Figure 14. Comparison of Tesseract-OCR and typical OCR identification process. (a) Tesseract OCR identification process. (b) Typical OCR process.
Mathematics 10 02974 g014aMathematics 10 02974 g014b
Figure 15. Diagram of the relationship between line segments and points. (a) The intersection is on-line. (b) The intersection is off-line.
Figure 15. Diagram of the relationship between line segments and points. (a) The intersection is on-line. (b) The intersection is off-line.
Mathematics 10 02974 g015
Figure 16. Schematic diagram of establishing the mapping relationships. (a) Distance from the points to Section AB. (b) Distance from the points to Section BC. (c) Distance from the points to Segment CD.
Figure 16. Schematic diagram of establishing the mapping relationships. (a) Distance from the points to Section AB. (b) Distance from the points to Section BC. (c) Distance from the points to Segment CD.
Mathematics 10 02974 g016
Table 1. NTSC—Technical Details—Colorimetry.
Table 1. NTSC—Technical Details—Colorimetry.
SMPTE “C” ColorimetryCIE 1931 xCIE 1931 y
primary red0.6300.340
primary green0.3100.595
primary blue0.1550.070
white point (CIE illuminant D65)0.31270.3290
Table 2. Some sample rebar master drawing test results.
Table 2. Some sample rebar master drawing test results.
Rebar Detail ImageRecognition ResultRecognition Speed/sRecognition Accuracy
Mathematics 10 02974 i00194000.165True
Mathematics 10 02974 i002100, 90, 31850.173True
Mathematics 10 02974 i003140, 90, 6815, 90, 2100.179True
Mathematics 10 02974 i00440, −90, 90, −90, 34350.178True
Mathematics 10 02974 i00540, 90, 90, 90, 5570, 90, 90, 90, 400.186True
Mathematics 10 02974 i006300, −90, 9723,
−45, 460, 45, 200
0.189True
Mathematics 10 02974 i007210, −90, 1555, 90, 342, 0, 1026, −79, 1200.196True
Mathematics 10 02974 i008100, 90, 31850.165False
Table 3. Overall test results statistics.
Table 3. Overall test results statistics.
Total NumberCorrect QuantityRecognition Speed/sRecognition Accuracy
20001986383.5899.30%
20001975391.7298.75%
20001981386.2799.05%
20001993376.2699.65%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ma, Z.; Zhao, Q.; Zhu, Y.; Cang, T.; Hei, X. An Automatic Extraction Method of Rebar Processing Information Based on Digital Image. Mathematics 2022, 10, 2974. https://doi.org/10.3390/math10162974

AMA Style

Ma Z, Zhao Q, Zhu Y, Cang T, Hei X. An Automatic Extraction Method of Rebar Processing Information Based on Digital Image. Mathematics. 2022; 10(16):2974. https://doi.org/10.3390/math10162974

Chicago/Turabian Style

Ma, Zhaoxi, Qin Zhao, Yiyun Zhu, Tianyou Cang, and Xinhong Hei. 2022. "An Automatic Extraction Method of Rebar Processing Information Based on Digital Image" Mathematics 10, no. 16: 2974. https://doi.org/10.3390/math10162974

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop