Bare steel bar identification method based on machine vision
Based on machine vision recognition methods, use drones to shoot the side images of the building and perform image processing, identify the naked steel bars in the building frame, solve the problem of durability and load -bearing capacity caused by naked steel bars, and realize the efficiency of naked steel bars. Recognize and early warning.
Patent Information
- Application Number
- CN202411212697.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-24
AI Technical Summary
The exposed steel bars in the building structure are susceptible to natural environment erosion and external forces, resulting in corrosion and reduced strength of the steel bars, which in turn affects the structural durability and load-bearing capacity of the building.
Adopt a machine visual recognition method, shoot the side images of the building framework through the drone, use the Canny algorithm and edge density to calculate the edge extraction and dual -value segmentation, identify the beams and build a naked reinforcement identification model, and judge the existence and length of naked steel bars Essence
Effectively identify the presence and length of exposed steel bars in the building frame, and generate alarm signals to provide quality and safe support for the building structure.
Smart Images

Figure CN119360233A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of machine vision, and in particular to a method for identifying exposed steel bars based on machine vision. Background Art
[0002] With the rapid development of my country's national economy, urban construction has also developed rapidly, and people's living standards have continued to improve. On this basis, people have put forward higher requirements for buildings, not only requiring them to meet basic functions such as life, work, and residence, but also paying more attention to the appearance, shape, and compatibility of buildings with the surrounding environment. In order to meet various requirements, building structures have become more complex. The quality of building structures has also received more attention.
[0003] Exposed steel bars in buildings, especially those exposed to the air for a long time, are easily eroded by natural factors such as weathering and acid rain, which can lead to corrosion of steel bars, reduced strength, and reduced bearing capacity of buildings, thus affecting the structural durability of buildings. At the same time, exposed steel bars are easily impacted by external forces and easily damaged by artificial impact, thus damaging the bearing capacity and stability of buildings.
[0004] Therefore, for the safety of the building structure, it is necessary to inspect the exposed steel bars of the building. Summary of the invention
[0005] The object of the present invention is to provide a method for identifying exposed steel bars based on machine vision, comprising the following steps:
[0006] 1) Get the number of floors n of the building frame and the height f of each floor a , and input to the control terminal; a=1, 2, …, n;
[0007] 2) The building frame is equivalent to a rectangular parallelepiped structure, and the side of the rectangular parallelepiped structure that contacts the ground is recorded as d b ; b = 1, 2, 3, 4;
[0008] 2) The control terminal calculates the total height of the building frame And determine the total height f of the building frame total >f max Is it true? If so, go to step 4), otherwise, go to step 3); f max The maximum recorded altitude of a single shot taken by the drone;
[0009] 3) Control terminal with building frame edge b The midpoint of is the origin of coordinates, a two-dimensional coordinate system is constructed, and the moving target point m of the UAV is generated. b0 =(s,y b0 ), s is the shortest lateral distance between the drone and the coordinate origin, y b0is the longitudinal distance between the UAV and the coordinate origin;
[0010] Use the positioning system to obtain the geographic coordinates of the coordinate origin and the current geographic coordinates of the drone;
[0011] Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal h b0 ={h b01 ,h b02 ,h b03}, thereby controlling the drone to move to the drone moving target point m b0 ;h b01 h is the lateral movement control signal of the UAV; b02 h is the control signal for the longitudinal movement of the UAV; b03 Provide turning control signals for drones;
[0012] Use the camera carried by the drone to capture the b-side image of the building frame I b0 , and transmit it to the control terminal;
[0013] Among them, the b-th side image of the building frame I b0 As shown below:
[0014]
[0015] In the formula, Represents the b-th side image of the building frame I b0 The pixel value corresponding to the pixel point (G, F) in the middle; F×G is the b-th side image of the building frame I b0 The image size;
[0016] 4) Determine whether b≥4 is true. If not, set b=b+1 and return to step 3). If so, take the four side images I of the building frame 10 ,I 20 ,I 30 ,I 40 As the building frame image to be identified, and jump to step 8);
[0017] 5) Control terminal with building frame edge b The midpoint of is taken as the origin, a two-dimensional coordinate system is constructed, and the UAV moving target point vector M = {m b0 ,m b1 ,...,m bg}, is the number of photos taken by the drone; ceil() is the upward rounding function; where the drone moves to the target point m bk =(s,y bk ); longitudinal distance y bk =ybk-1 +Δy; Δy is the altitude of the drone in a single shot; k = 0, 2, ..., g;
[0018] Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal vector H b , thereby controlling the UAV to move to the UAV moving target point m in sequence b0 ,m b1 ,...,m bg ;
[0019] Among them, the UAV control signal vector H b As shown below:
[0020]
[0021] In the formula, h bg Indicates controlling the drone to move from the target point m bg-1 Move to the moving target point m bg The control signal of g≠0; h b0 Indicates controlling the drone to move from the current geographic location to the moving target point m b0 The control signal of bg1 ,h bg2 ,h bg3 They represent the UAV lateral movement control signal, the UAV longitudinal movement control signal, and the UAV turning control signal respectively;
[0022] Every time the drone moves to a drone moving target point, it takes a b-th side image of the building frame and transmits it to the control terminal;
[0023] The b-th side image vector of the building frame photographed by the drone is denoted as I b = {I b0 ,I b1 ,...,I bg},Right now:
[0024]
[0025] In the formula, I bg The b-side image of the g-th building frame taken by the drone; Represents the b-th side image of the building frame I bg The pixel value corresponding to the pixel point (G, F);
[0026] 6) Determine whether b≥4 is true. If not, set b=b+1 and return to step 5). If yes, jump to step 7);
[0027] 7) According to the time sequence of image shooting, the image vector I of the bth side of the building frame isb = {I b0 ,I b1 ,...,I bg} to obtain the images of the building frame to be identified on the four sides of the building frame;
[0028] 8) Identifying the beams in each building frame image to be identified, the steps include:
[0029] 8.1) Use the Canny algorithm to extract the edge of the building frame image to be identified, obtain the edge image, and calculate the edge density ρ of the edge image, that is:
[0030]
[0031] Where X is the length of the edge image, Y is the width of the edge image, and p ij Represents the value of the pixel (i, j) in the edge image, p ij =1 indicates edge, p ij =0 indicates background;
[0032] 8.2) Taking the Q×Q region centered at each pixel as the template, calculate the edge density ρ of each pixel ij ,Right now:
[0033]
[0034] 8.3) According to the edge density ρ of each pixel ij , perform binary segmentation on the image of the building frame to be identified, segment the beam area and the non-beam area, and thus obtain a binary image; during segmentation, if ρ ij <ρ, then set the value of the pixel (i, j) to 255. ij ≥ρ, then set the value of the pixel (i, j) to 0;
[0035] 8.4) performing an erosion and dilation operation on the binary image to obtain a binary segmented image;
[0036] 8.5) Masking the original building frame image based on the binary segmentation image to obtain a beam recognition image;
[0037] 9) Crop the beams in the beam recognition image and number the beam images from bottom to top to obtain the beam image matrix E, that is:
[0038]
[0039] In the formula, E ba It is the beam image of the a-th floor on the b-th side of the building frame;
[0040] 10) Constructing an exposed steel bar identification model includes the following steps:
[0041] 10.1) Obtaining a data set: collecting beam images with exposed steel bars and beam images without exposed steel bars to construct a beam image data set;
[0042] 10.2) Preprocessing and expanding the beam image, and annotating the expanded beam image, so as to construct a beam image input data set; the annotation includes whether the beam image has exposed steel bars; if the beam image has exposed steel bars, the annotation also includes the location information of the exposed steel bars, and the actual length and pixel length of the exposed steel bars;
[0043] 10.3) Based on the Alexnet structure, a bare steel bar recognition network is established; the bare steel bar recognition network is trained using the beam image input data set to obtain a bare steel bar recognition model;
[0044] 11) Input the beam images in the beam image matrix E into the exposed steel bar recognition model in sequence to determine whether the beam image has exposed steel bars and the actual length of the exposed steel bars L = β0 + β1l + β2l 2 +...+β w l w ; l is the pixel length of the exposed steel bar in the beam image; β0, β1, β2, β w is the fitting coefficient; w is the number of fitting items;
[0045] If there is exposed steel bar, and the actual length L of the exposed steel bar is greater than the preset length L max , the control end determines the floor and position of the beam based on the beam number, and generates an alarm signal containing the floor, position and actual length of the exposed steel bars of the beam.
[0046] Furthermore, the building frame includes cross beams and columns; the cross beams include I-shaped steel beams, steel cages, and cast-in-place concrete layers covering the I-shaped steel beams and the steel cages.
[0047] Furthermore, the height of each floor of the building frame is measured by a laser ranging sensor;
[0048] In step 10.2), the actual length of the exposed steel bar is measured by a laser ranging sensor.
[0049] Furthermore, the center point of the drone shooting frame and the line connecting the drone are perpendicular to the bth side of the building frame.
[0050] Furthermore, the shortest lateral distance s between the drone and the coordinate origin is as follows:
[0051]
[0052] Where D is half of the diagonal length of the frame captured by the drone camera; FOV is the diagonal field of view of the drone camera; f max The maximum recorded altitude of a single shot taken by the drone.
[0053] Furthermore, the step of preprocessing the beam image is: converting the format of the beam image and cropping the beam image to convert the image into an image with the same format and size.
[0054] Furthermore, methods for expanding the beam image include horizontal rotation, mirroring, and adding noise.
[0055] Furthermore, tools for labeling the expanded beam image include LabelImg software.
[0056] Furthermore, the preset length L max =50mm.
[0057] Furthermore, for each side of the building frame, the image vector I b = {I b0 ,I b1 ,...,I bg}When splicing, according to the b-th side image vector I of the building frame b = {I b0 ,I b1 ,...,I bg} shooting time, and stitching is achieved in order from bottom to top.
[0058] The technical effect of the present invention is unquestionable. The present invention can effectively identify whether there are exposed steel bars in the building frame, as well as the length of the exposed steel bars, and issue an early warning, thereby providing strong support for the quality and safety of the building frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 The flowchart of the method is shown in FIG. DETAILED DESCRIPTION
[0060] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0061] Embodiment 1:
[0062] See also Figure 1 , a method for identifying exposed steel bars based on machine vision, comprising the following steps:
[0063] 1) Get the number of floors n of the building frame and the height f of each floora , and input to the control terminal; a=1, 2, …, n;
[0064] 2) The building frame is equivalent to a rectangular parallelepiped structure, and the side of the rectangular parallelepiped structure that contacts the ground is recorded as d b ; b = 1, 2, 3, 4;
[0065] 2) The control terminal calculates the total height of the building frame And determine the total height f of the building frame total >f max Is it true? If so, go to step 4), otherwise, go to step 3); f max It is the maximum recorded altitude of a single shot taken by the drone, which is determined by the camera parameters of the camera carried by the drone;
[0066] 3) Control terminal with building frame edge b The midpoint of is the origin of coordinates, a two-dimensional coordinate system is constructed, and the moving target point m of the UAV is generated. b0 =(s,y b0 ), s is the shortest lateral distance between the drone and the coordinate origin, is the longitudinal distance between the UAV and the coordinate origin;
[0067] Use the positioning system to obtain the geographic coordinates of the coordinate origin and the current geographic coordinates of the drone;
[0068] Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal h b0 ={h b01 ,h b02 ,h b03}, thereby controlling the drone to move to the drone moving target point m b0 ;h b01 h is the lateral movement control signal of the UAV; b02 h is the control signal for the longitudinal movement of the UAV; b03 It is a turning control signal for the drone, so that the drone camera faces the bth side of the building frame;
[0069] Use the camera carried by the drone to capture the b-side image of the building frame I b0 , and transmit it to the control terminal; the camera is facing the building frame.
[0070] Among them, the b-th side image of the building frame I b0 As shown below:
[0071]
[0072] In the formula, Represents the b-th side image of the building frame I b0 The pixel value corresponding to the pixel point (G, F) in the middle; F×G is the b-th side image of the building frame I b0 The image size;
[0073] 4) Determine whether b≥4 is true. If not, set b=b+1 and return to step 3). If so, take the four side images I of the building frame 10 ,I 20 ,I 30 ,I 40 As the building frame image to be identified, and jump to step 8);
[0074] 5) Control terminal with building frame edge b The midpoint of is taken as the origin, a two-dimensional coordinate system is constructed, and the UAV moving target point vector M = {m b0 ,m b1 ,...,m bg}, is the number of photos taken by the drone; ceil() is the upward rounding function; where the drone moves to the target point m bk =(s,y bk ); longitudinal distance y bk =y bk-1 +Δy; Δy is the altitude of the drone in a single shot; k = 0, 2, ..., g;
[0075] Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal vector H b , thereby controlling the UAV to move to the UAV moving target point m in sequence b0 ,m b1 ,...,m bg ;
[0076] Among them, the UAV control signal vector H b As shown below:
[0077]
[0078] In the formula, h bg Indicates controlling the drone to move from the target point m bg-1 Move to the moving target point m bg The control signal of g≠0; h b0 Indicates controlling the drone to move from the current geographic location to the moving target point m b0 The control signal of bg1 ,h bg2 ,h bg3 They represent the UAV lateral movement control signal, the UAV longitudinal movement control signal, and the UAV turning control signal respectively;
[0079] Every time the drone moves to a drone moving target point, it takes a b-th side image of the building frame and transmits it to the control terminal;
[0080] The b-th side image vector of the building frame photographed by the drone is denoted as I b = {I b0 ,I b1 ,...,I bg},Right now:
[0081]
[0082] In the formula, I bg The b-side image of the g-th building frame taken by the drone; Represents the b-th side image of the building frame I bg The pixel value corresponding to the pixel point (G, F);
[0083] 6) Determine whether b≥4 is true. If not, set b=b+1 and return to step 5). If yes, jump to step 7);
[0084] 7) According to the time sequence of image shooting, the image vector I of the bth side of the building frame is b = {I b0 ,I b1 ,...,I bg} to obtain the images of the building frame to be identified on the four sides of the building frame;
[0085] 8) Identifying the beams in each building frame image to be identified, the steps include:
[0086] 8.1) Use the Canny algorithm to extract the edge of the building frame image to be identified, obtain the edge image, and calculate the edge density ρ of the edge image, that is:
[0087]
[0088] Where X is the length of the edge image, Y is the width of the edge image, and p ij Represents the value of the pixel (i, j) in the edge image, p ij =1 indicates edge, p ij =0 indicates background;
[0089] 8.2) Taking the Q×Q region centered at each pixel as the template, calculate the edge density ρ of each pixel ij ,Right now:
[0090]
[0091] 8.3) According to the edge density ρ of each pixel ij , perform binary segmentation on the image of the building frame to be identified, segment the beam area and the non-beam area, and thus obtain a binary image; during segmentation, if ρ ij <ρ, then set the value of the pixel (i, j) to 255. ij ≥ρ, then set the value of the pixel (i, j) to 0;
[0092] 8.4) performing an erosion and dilation operation on the binary image to obtain a binary segmented image;
[0093] 8.5) Masking the original building frame image based on the binary segmentation image to obtain a beam recognition image;
[0094] 9) Crop the beams in the beam recognition image and number the beam images from bottom to top to obtain the beam image matrix E, that is:
[0095]
[0096] In the formula, E ba It is the beam image of the a-th floor on the b-th side of the building frame;
[0097] 10) Constructing an exposed steel bar identification model includes the following steps:
[0098] 10.1) Obtaining a data set: collecting beam images with exposed steel bars and beam images without exposed steel bars to construct a beam image data set;
[0099] 10.2) Preprocessing and expanding the beam image, and annotating the expanded beam image, so as to construct a beam image input data set; the annotation includes whether the beam image has exposed steel bars; if the beam image has exposed steel bars, the annotation also includes the location information of the exposed steel bars, and the actual length and pixel length of the exposed steel bars;
[0100] 10.3) Based on the Alexnet structure, a bare steel bar recognition network is established; the bare steel bar recognition network is trained using the beam image input data set to obtain a bare steel bar recognition model;
[0101] 11) Input the beam images in the beam image matrix E into the exposed steel bar recognition model in sequence to determine whether the beam image has exposed steel bars and the actual length of the exposed steel bars L = β0 + β1l + β2l 2 +...+β w l w ; l is the pixel length of the exposed steel bar in the beam image; β0, β1, β2, β w is the fitting coefficient; w is the number of fitting items;
[0102] If there is exposed steel bar, and the actual length L of the exposed steel bar is greater than the preset length L max , the control end determines the floor and position of the beam based on the beam number, and generates an alarm signal containing the floor, position and actual length of the exposed steel bars of the beam.
[0103] The building frame includes cross beams and columns; the cross beams include I-shaped steel beams, steel cages, and cast-in-place concrete layers covering the I-shaped steel beams and the steel cages.
[0104] The height of each floor of the building frame is measured by a laser ranging sensor;
[0105] In step 10.2), the actual length of the exposed steel bar is measured by a laser ranging sensor.
[0106] The center point of the drone shooting frame, the line connecting the drone and the bth side of the building frame are perpendicular.
[0107] The shortest lateral distance s between the drone and the coordinate origin is as follows:
[0108]
[0109] Where D is half of the diagonal length of the frame captured by the drone camera; FOV is the diagonal field of view of the drone camera; f max It is the maximum recorded height of a single shot by the drone, that is, the length of the frame captured by the drone camera.
[0110] The steps of preprocessing the beam image are: converting the format of the beam image and cropping the beam image to convert the image into an image with the same format and size.
[0111] Methods for expanding the beam image include horizontal rotation, mirroring, and adding noise.
[0112] Tools for labeling the expanded beam images include LabelImg software.
[0113] Preset length L max =50mm.
[0114] Image vector I for each side of the building frame b = {I b0 ,I b1 ,...,I bg}When splicing, according to the b-th side image vector I of the building frame b = {I b0 ,I b1 ,...,I bg} shooting time, and stitching is achieved in order from bottom to top.
[0115] Embodiment 2:
[0116] A method for identifying exposed steel bars based on machine vision comprises the following steps:
[0117] 1) Get the number of floors n of the building frame and the height f of each floor a , and input to the control terminal; a=1, 2, …, n;
[0118] 2) The building frame is equivalent to a rectangular parallelepiped structure, and the side of the rectangular parallelepiped structure that contacts the ground is recorded as d b ; b = 1, 2, 3, 4;
[0119] 2) The control terminal calculates the total height of the building frame And determine the total height f of the building frame total >f max Is it true? If so, go to step 4), otherwise, go to step 3); f max The maximum recorded altitude of a single shot taken by the drone;
[0120] 3) Control terminal with building frame edge b The midpoint of is the origin of coordinates, a two-dimensional coordinate system is constructed, and the moving target point m of the UAV is generated. b0 =(s,y b0 ), s is the shortest lateral distance between the drone and the coordinate origin, y b0 is the longitudinal distance between the UAV and the coordinate origin;
[0121] Use the positioning system to obtain the geographic coordinates of the coordinate origin and the current geographic coordinates of the drone;
[0122] Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal h b0 ={h b01 ,h b02 ,h b03}, thereby controlling the drone to move to the drone moving target point m b0 ;h b01 h is the lateral movement control signal of the UAV; b02 h is the control signal for the longitudinal movement of the UAV; b03 Provide turning control signals for drones;
[0123] Use the camera carried by the drone to capture the b-side image of the building frame I b0 , and transmit it to the control terminal;
[0124] Among them, the b-th side image of the building frame I b0 As shown below:
[0125]
[0126] In the formula, Represents the b-th side image of the building frame I b0 The pixel value corresponding to the pixel point (G, F) in the middle; F×G is the b-th side image of the building frame I b0 The image size;
[0127] 4) Determine whether b≥4 is true. If not, set b=b+1 and return to step 3). If so, take the four side images I of the building frame 10 ,I 20 ,I 30 ,I 40 As the building frame image to be identified, and jump to step 8);
[0128] 5) Control terminal with building frame edge b The midpoint of is taken as the origin, a two-dimensional coordinate system is constructed, and the UAV moving target point vector M = {m b0 ,m b1 ,...,m bg}, is the number of photos taken by the drone; ceil() is the upward rounding function; where the drone moves to the target point m bk =(s,y bk ); longitudinal distance y bk =y bk-1 +Δy; Δy is the altitude of the drone in a single shot; k = 0, 2, ..., g;
[0129] Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal vector H b , thereby controlling the UAV to move to the UAV moving target point m in sequence b0 ,m b1 ,...,m bg ;
[0130] Among them, the UAV control signal vector H b As shown below:
[0131]
[0132] In the formula, h bg Indicates controlling the drone to move from the target point m bg-1 Move to the moving target point m bg The control signal of g≠0; h b0 Indicates controlling the drone to move from the current geographic location to the moving target point m b0 The control signal of bg1 ,hbg2 ,h bg3 They represent the UAV lateral movement control signal, the UAV longitudinal movement control signal, and the UAV turning control signal respectively;
[0133] Every time the drone moves to a drone moving target point, it takes a b-th side image of the building frame and transmits it to the control terminal;
[0134] The b-th side image vector of the building frame photographed by the drone is denoted as I b = {I b0 ,I b1 ,...,I bg},Right now:
[0135]
[0136] In the formula, I bg The b-side image of the g-th building frame taken by the drone; Represents the b-th side image of the building frame I bg The pixel value corresponding to the pixel point (G, F);
[0137] 6) Determine whether b≥4 is true. If not, set b=b+1 and return to step 5). If yes, jump to step 7);
[0138] 7) According to the time sequence of image shooting, the image vector I of the bth side of the building frame is b = {I b0 ,I b1 ,...,I bg} to obtain the images of the building frame to be identified on the four sides of the building frame;
[0139] 8) Identifying the beams in each building frame image to be identified, the steps include:
[0140] 8.1) Use the Canny algorithm to extract the edge of the building frame image to be identified, obtain the edge image, and calculate the edge density ρ of the edge image, that is:
[0141]
[0142] Where X is the length of the edge image, Y is the width of the edge image, and p ij Represents the value of the pixel (i, j) in the edge image, p ij =1 indicates edge, p ij =0 indicates background;
[0143] 8.2) Taking the Q×Q region centered at each pixel as the template, calculate the edge density ρ of each pixel ij ,Right now:
[0144]
[0145] 8.3) According to the edge density ρ of each pixel ij , perform binary segmentation on the image of the building frame to be identified, segment the beam area and the non-beam area, and thus obtain a binary image; during segmentation, if ρ ij <ρ, then set the value of the pixel (i, j) to 255. ij ≥ρ, then set the value of the pixel (i, j) to 0;
[0146] 8.4) performing an erosion and dilation operation on the binary image to obtain a binary segmented image;
[0147] 8.5) Masking the original building frame image based on the binary segmentation image to obtain a beam recognition image;
[0148] 9) Crop the beams in the beam recognition image and number the beam images from bottom to top to obtain the beam image matrix E, that is:
[0149]
[0150] In the formula, E ba It is the beam image of the a-th floor on the b-th side of the building frame;
[0151] 10) Constructing an exposed steel bar identification model includes the following steps:
[0152] 10.1) Obtaining a data set: collecting beam images with exposed steel bars and beam images without exposed steel bars to construct a beam image data set;
[0153] 10.2) Preprocessing and expanding the beam image, and annotating the expanded beam image, so as to construct a beam image input data set; the annotation includes whether the beam image has exposed steel bars; if the beam image has exposed steel bars, the annotation also includes the location information of the exposed steel bars, and the actual length and pixel length of the exposed steel bars;
[0154] 10.3) Based on the Alexnet structure, a bare steel bar recognition network is established; the bare steel bar recognition network is trained using the beam image input data set to obtain a bare steel bar recognition model; the purpose of training the bare steel bar recognition network is to enable the bare steel bar recognition model to distinguish between beams with exposed steel bars and beams without exposed steel bars, and to fit β0, β1, β2, …, β w The value of .
[0155] 11) Input the beam images in the beam image matrix E into the exposed steel bar recognition model in sequence to determine whether the beam image has exposed steel bars and the actual length of the exposed steel bars L = β0 + β1l + β2l 2 +...+β w l w ; l is the pixel length of the exposed steel bar in the beam image; β0, β1, β2, β w is the fitting coefficient, which is obtained by fitting the exposed steel bar pixel length in the input data set with the actual length; w is the number of fitting items;
[0156] If there is exposed steel bar, and the actual length L of the exposed steel bar is greater than the preset length L max , the control end determines the floor and position of the beam based on the beam number, and generates an alarm signal containing the floor, position and actual length of the exposed steel bars of the beam.
[0157] Embodiment 3:
[0158] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as that of Example 2. Furthermore, the building frame includes beams and columns; the beams include I-shaped steel beams, steel cages, and a cast-in-place concrete layer covering the I-shaped steel beams and the steel cages.
[0159] Embodiment 4:
[0160] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Embodiments 2-3, and further, the height of each layer of the building frame is measured by a laser ranging sensor;
[0161] In step 10.2), the actual length of the exposed steel bar is measured by a laser ranging sensor.
[0162] Embodiment 5:
[0163] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Examples 2-4, and further, the center point of the drone shooting frame and the line connecting the drone are perpendicular to the bth side of the building frame.
[0164] Embodiment 6:
[0165] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Embodiments 2-5, and further, the shortest lateral distance s between the drone and the coordinate origin is as follows:
[0166]
[0167] Where D is half of the diagonal length of the frame captured by the drone camera; FOV is the diagonal field of view of the drone camera.
[0168] Embodiment 7:
[0169] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Examples 2-6. Further, the step of preprocessing the beam image is: format conversion and cropping of the beam image to convert the image into an image of the same format and size.
[0170] Embodiment 8:
[0171] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Examples 2-7. Furthermore, the method for expanding the beam image includes horizontal rotation, mirroring, and adding noise.
[0172] Embodiment 9:
[0173] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Examples 2-8. Furthermore, a tool for annotating the expanded beam image includes LabelImg software.
[0174] Embodiment 10:
[0175] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Embodiments 2-9, further, the preset length L max =50mm.
[0176] Embodiment 11:
[0177] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Embodiments 2-10, and further, an image vector I of each side of the building frame is b = {I b0 ,I b1 ,...,I bg}When splicing, according to the b-th side image vector I of the building frame b = {I b0 ,I b1 ,...,I bg}, and stitching is performed in a bottom-up order. When stitching, the pixel values of each point are used to determine whether there is an overlapping area. If so, the overlapping area is removed.
[0178] Embodiment 12:
[0179] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Examples 2-11. Furthermore, when the side images taken by the drone are one or more, the center point of the drone frame and the line connecting the drone should be perpendicular to the photographed building surface, and the line is the shortest straight-line distance S between the drone and the building frame.
[0180] For example, if the diagonal FOV provided by the drone camera is 78°, the photo aspect ratio is 4:3, and the length of the drone camera frame is A, the shortest straight line distance S is as follows:
[0181]
[0182] Embodiment 13:
[0183] A method for identifying exposed steel bars based on machine vision, the technical content of which is the same as any one of Embodiments 2-12, and further, the steps of beam identification are as follows:
[0184] 1) Use the Canny algorithm to extract the edge of the building frame image to obtain the edge image. Then use the following formula to calculate the edge density ρ of the edge image:
[0185]
[0186] Where X is the length of the image, Y is the width of the image, and p ij Represents the value of the pixel (i, j) in the edge binary image, p ij =1 indicates edge, p ij =0 indicates background;
[0187] Using the following formula, take the Q×Q area centered on each pixel as the template and calculate the edge density ρ of each pixel ij :
[0188]
[0189] Where Q is the size of the selected template, and here Q=25;
[0190] 2) According to the edge density ρ of each pixel ij , perform binary segmentation on the building frame image to segment the rigid beam area and the non-rigid beam area: If ρ ij <ρ, then set the value of the pixel (i, j) to 255. ij ≥ρ, then set to 0;
[0191] 3) performing corrosion and expansion operations on the binary image segmented in step 2) to obtain a binary segmented image;
[0192] 4) The binary segmentation image segmented in step 3) is masked on the original building frame image to obtain a rigid beam recognition image.
[0193] Embodiment 14:
[0194] A method for identifying exposed steel bars based on machine vision, the technical content is the same as any one of Embodiments 2-13. Further, during the identification process, the floor where the drone is located is judged by the following method:
[0195] The total height of the selected floor is fmax, denoted as h t is the height of the t-th floor, F(t) is the total height of the first t floors, the flight height of the drone is H, and the number of times the horizontal height of the drone is changed is j, with the first time recorded as j = 1. The calculation methods of F(t) and H are as follows
[0196] F(t)=h1 + h2 + … + h t
[0197]
[0198] If F(t - 1)<H ≤ F(t), it can be determined that the current floor where the drone is located is t.
[0199] Embodiment 15:
[0200] A method for identifying exposed steel bars based on machine vision, the technical content is the same as any one of Embodiments 2-14. Further, the steps for constructing the exposed steel bar recognition model are as follows:
[0201] 1) Obtain the dataset: Collect steel bar exposed images and normal stiffened beam images to obtain a stiffened beam image dataset;
[0202] 2) Preprocess the stiffened beam images, convert the images into images with the same format, size, and clarity; then use methods such as horizontal rotation, mirroring, and adding noise to perform data augmentation on the stiffened beam images. Then use the LabelImg software to manually annotate all the datasets to save the position information of the exposed steel bars and obtain the input dataset. Finally, randomly divide the input dataset into a training set and a test set at a ratio of 9:1.
[0203] 3) Based on the Alexnet structure, establish an exposed steel bar recognition network. Calculate the length of the exposed steel bars by using the ratio of the pixel point length and area to the actual length and area, where a laser rangefinder is used to record the corresponding actual length of the picture;
[0204] 4) Use the preprocessed training set to train the exposed steel bar recognition network, randomly extract test set images to test the exposed steel bar recognition model, and obtain a trained exposed steel bar recognition model.
Claims
1. A method for identifying exposed steel bars based on machine vision, characterized in that: The following steps are involved: 1) Obtain the number of floors n of the building frame and the height f of each floor a , and input to the control terminal; a=1, 2,…, n. 2) The building frame is equivalent to a rectangular parallelepiped structure, and the side of the rectangular parallelepiped structure that contacts the ground is recorded as d b ; b = 1, 2, 3, 4; 2) The control terminal calculates the total height of the building frame And determine the total height f of the building frame total >f max Is it true? If so, go to step 4), otherwise, go to step 3); f max The maximum recorded altitude of a single shot taken by the drone; 3) Control terminal with building frame edge b The midpoint of is the origin of coordinates, a two-dimensional coordinate system is constructed, and the moving target point m of the UAV is generated. b0 =(s,y b0 ), s is the shortest lateral distance between the drone and the coordinate origin, y b0 is the longitudinal distance between the UAV and the coordinate origin; Use the positioning system to obtain the geographic coordinates of the coordinate origin and the current geographic coordinates of the drone; Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal h b0 ={h b01 ,h b02 ,h b03 }, thereby controlling the drone to move to the drone moving target point m b0 ;h b01 h is the lateral movement control signal of the UAV; b02 h is the control signal for the longitudinal movement of the UAV; b03 Provide turning control signals for drones; Use the camera carried by the drone to capture the b-side image of the building frame I b0 , and transmit it to the control terminal; Among them, the b-th side image of the building frame I b0 As shown below: In the formula, Represents the b-th side image of the building frame I b0 The pixel value corresponding to the pixel point (G, F) in the middle; F×G is the b-th side image of the building frame I b0 The image size; 4) Determine whether b≥4 is true. If not, set b=b+1 and return to step 3). If so, take the four side images I of the building frame 10 ,I 20 ,I 30 ,I 40 As the building frame image to be identified, and jump to step 8); 5) Control terminal with building frame edge b The midpoint of is taken as the origin, a two-dimensional coordinate system is constructed, and the UAV moving target point vector M = {m b0 ,m b1 ,...,m bg }, is the number of photos taken by the drone; ceil() is the upward rounding function; where the drone moves to the target point m bk =(s,y bk ); longitudinal distance y bk =y bk-1 +Δy; Δy is the altitude of the drone in a single shot; k = 0, 2, ..., g; Based on the geographic coordinates of the coordinate origin, the current geographic coordinates of the drone, and the coordinates of the drone's moving target point, the control terminal generates the drone control signal vector H b , thereby controlling the UAV to move to the UAV moving target point m in sequence b0 ,m b1 ,...,m bg ; Among them, the UAV control signal vector H b As shown below: In the formula, h bg Indicates controlling the drone to move from the target point m bg-1 Move to the moving target point m bg The control signal; g≠0; h b0 Indicates controlling the drone to move from the current geographic location to the moving target point m b0 The control signal of bg1 ,h bg2 ,h bg3 They represent the UAV lateral movement control signal, the UAV longitudinal movement control signal, and the UAV turning control signal respectively; Every time the drone moves to a drone moving target point, it takes a b-th side image of the building frame and transmits it to the control terminal; The b-th side image vector of the building frame photographed by the drone is denoted as I b = {I b0 ,I b1 ,...,I bg },Right now: In the formula, I bg The b-side image of the g-th building frame taken by the drone; Represents the b-th side image of the building frame I bg The pixel value corresponding to the pixel point (G, F); 6) Determine whether b≥4 is true. If not, set b=b+1 and return to step 5). If yes, jump to step 7); 7) According to the time sequence of image shooting, the image vector I of the bth side of the building frame is b = {I b0 ,I b1 ,...,I bg } to obtain the images of the building frame to be identified on the four sides of the building frame; 8) Identifying the beams in each building frame image to be identified, the steps include: 8.1) Use the Canny algorithm to extract the edge of the building frame image to be identified, obtain the edge image, and calculate the edge density ρ of the edge image, that is: Where X is the length of the edge image, Y is the width of the edge image, and p ij Represents the value of the pixel (i, j) in the edge image, p ij =1 indicates edge, p ij =0 indicates background; 8.2) Taking the Q×Q region centered at each pixel as the template, calculate the edge density ρ of each pixel ij ,Right now: 8.3) According to the edge density ρ of each pixel ij , perform binary segmentation on the image of the building frame to be identified, segment the beam area and the non-beam area, and thus obtain a binary image; during segmentation, if ρ ij <ρ, then set the value of the pixel (i, j) to 255. ij ≥ρ, then set the value of the pixel (i, j) to 0; 8.4) performing an erosion and dilation operation on the binary image to obtain a binary segmented image; 8.5) Masking the original building frame image based on the binary segmentation image to obtain a beam recognition image; 9) Crop the beams in the beam recognition image and number the beam images from bottom to top to obtain the beam image matrix E, that is: In the formula, E ba It is the beam image of the a-th floor on the b-th side of the building frame; 10) Constructing an exposed steel bar identification model includes the following steps: 10.1) Obtaining a data set: collecting beam images with exposed steel bars and beam images without exposed steel bars to construct a beam image data set; 10.2) Preprocessing and expanding the beam image, and annotating the expanded beam image, so as to construct a beam image input data set; the annotation includes whether the beam image has exposed steel bars; if the beam image has exposed steel bars, the annotation also includes the location information of the exposed steel bars, and the actual length and pixel length of the exposed steel bars; 10.3) Based on the Alexnet structure, a bare steel bar recognition network is established; the bare steel bar recognition network is trained using the beam image input data set to obtain a bare steel bar recognition model; 11) Input the beam images in the beam image matrix E into the exposed steel bar recognition model in sequence to determine whether the beam image has exposed steel bars and the actual length of the exposed steel bars L = β0 + β1l + β2l 2 +...+β w l w ; l is the pixel length of the exposed steel bar in the beam image; β0, β1, β2, β w is the fitting coefficient; w is the number of fitting items; If there is exposed steel bar, and the actual length L of the exposed steel bar is greater than the preset length L max , the control end determines the floor and position of the beam based on the beam number, and generates an alarm signal containing the floor, position and actual length of the exposed steel bars of the beam.
2. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: The building frame includes cross beams and columns; the cross beams include I-shaped steel beams, steel cages, and cast-in-place concrete layers covering the I-shaped steel beams and the steel cages.
3. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: The height of each floor of the building frame is measured by a laser ranging sensor; In step 10.2), the actual length of the exposed steel bar is measured by a laser ranging sensor.
4. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: The center point of the drone shooting frame, the line connecting the drone and the bth side of the building frame are perpendicular.
5. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: The shortest lateral distance s between the drone and the coordinate origin is as follows: Where D is half of the diagonal length of the frame captured by the drone camera; FOV is the diagonal field of view of the drone camera; f max The maximum recorded altitude of a single shot taken by the drone.
6. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: The steps of preprocessing the beam image are: converting the format of the beam image and cropping the beam image to convert the image into an image with the same format and size.
7. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: Methods for expanding the beam image include horizontal rotation, mirroring, and adding noise.
8. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: Tools for labeling the expanded beam images include LabelImg software.
9. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: Preset length L max =50mm.
10. The method for identifying exposed steel bars based on machine vision according to claim 1, characterized in that: Image vector I for each side of the building frame b = {I b0 ,I b1 ,...,I bg }When splicing, according to the b-th side image vector I of the building frame b = {I b0 ,I b1 ,...,I bg } shooting time, and stitching is achieved in order from bottom to top.