A method, system, electronic device and storage medium for identifying steel bar spacing

Through Mask R-CNN algorithm and binocular vision technology, combined with parallax calculation, efficient and accurate identification of steel bar spacing is achieved, and the high cost and low coverage problems of manual inspection in the existing technology are solved, and it is suitable for steel bar construction quality inspection in large scenarios.

CN117058240BActive Publication Date: 2025-08-15SHANGHAI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311104788.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-08-15
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

In the prior art, steel bar detection has problems such as high labor cost, low detection coverage, large errors, and difficult recording and traceability. In addition, traditional machine vision methods cannot obtain three-dimensional information, high equipment costs, and image segmentation methods can only be measured at a fixed distance.

Method used

Mask R-CNN algorithm and binocular vision technology are used to obtain the image set taken by the binocular camera, and the trained Mask R-CNN network model is used to segment the steel bar instances, and the actual position coordinates of the steel bars are calculated based on the parallax, and the spacing between adjacent steel bars is calculated.

Benefits of technology

It realizes efficient and accurate identification of steel bar spacing, improves inspection coverage, saves labor costs, automatically records the test results, and is widely applicable, and is suitable for steel bar construction quality inspection in large scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058240B_ABST
    Figure CN117058240B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, electronic device, and storage medium for identifying steel bar spacing, relating to the technical field of steel bar spacing identification. The method comprises: acquiring a first image set and a second image set; segmenting each image using a trained Mask R-CNN network model to obtain steel bar instance segmentation results corresponding to each image; calculating the actual position coordinates of each steel bar using parallax based on the steel bar instance segmentation results; and calculating the spacing between adjacent vertical steel bars and the spacing between adjacent horizontal steel bars in a target steel mesh based on the actual position coordinates of each steel bar. The present invention can accurately identify all steel bar spacings within a target range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of steel bar spacing recognition, and in particular to a steel bar spacing recognition method, system, electronic device and storage medium based on the Mask R-CNN algorithm and binocular vision. Background Art

[0002] Inspection of rebar construction quality in large-scale scenarios involves a vast amount of steel, and is primarily conducted through manual spot checks and measurements. The number and spacing of rebars are key areas of inspection. The steel construction acceptance standards require that the spacing between rebars should deviate from the design value by less than 1 cm.

[0003] The current problems with manual sampling and measurement methods are: (1) The inspection work is simple and repetitive, labor costs are increasing, and human errors are difficult to control. (2) The inspection coverage rate of the sampling method is low, which poses risks. (3) Record tracing is difficult, and there is a possibility of omissions and misreporting.

[0004] Researchers have proposed a series of automated rebar detection methods based on computer vision to detect rebar spacing. These methods include traditional machine vision methods based on edge detection and threshold segmentation, point cloud data processing methods based on machine learning, and image segmentation methods based on the Mask R-CNN deep learning algorithm. However, traditional machine vision methods do not utilize artificial intelligence technology and can only identify rebar against simple backgrounds, failing to obtain three-dimensional information about the rebar. Point cloud data processing methods require the use of laser scanners for scanning at multiple measuring stations, which has drawbacks such as high equipment costs and complex measurement procedures. Although the Mask R-CNN algorithm is used in the image segmentation method, it is not combined with other methods to obtain three-dimensional information about the rebar and can only measure rebar at a fixed distance. Summary of the Invention

[0005] In order to achieve a simple, accurate, easy-to-use and more widely applicable intelligent recognition effect of steel bar spacing, the present invention provides a steel bar spacing recognition method, system, electronic device and storage medium based on the Mask R-CNN algorithm and binocular vision.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] In a first aspect, the present invention provides a method for identifying steel bar spacing, comprising:

[0008] Acquire a first image set and a second image set; the images in the first image set are the left and right images of the target steel mesh obtained by the first binocular camera; the images in the second image set are the left and right images of the target steel mesh obtained by the second binocular camera; the second binocular camera is a binocular camera obtained by rotating the first binocular camera 90° around the optical axis; the vertical steel bars in the image captured by the first binocular camera are the horizontal steel bars in the image captured by the second binocular camera;

[0009] Using the trained Mask R-CNN network model, each image is segmented to obtain the steel bar instance segmentation results corresponding to each image. The steel bar instance segmentation results include multiple sub-images, the number of steel bars corresponding to each sub-image, the target detection box position of each steel bar, and the RGB color value of the area where each steel bar is located.

[0010] Calculating the actual position coordinates of each steel bar by parallax according to the steel bar instance segmentation result;

[0011] According to the actual position coordinates of each steel bar, the spacing between adjacent vertical steel bars and the spacing between adjacent transverse steel bars in the target steel mesh are calculated.

[0012] Optionally, before executing the step of calculating the actual position coordinates of each steel bar by parallax based on the steel bar instance segmentation result, the method further includes:

[0013] According to the steel bar instance segmentation result, determining whether the number of steel bars in the left image and the number of steel bars in the right image in the same image set are the same;

[0014] If so, the actual position coordinates of the steel bars are calculated by parallax based on the steel bar instance segmentation results corresponding to each image in the same image set;

[0015] If not, when the number of steel bars in the left image in the same image set is N more vertical steel bars than the number of steel bars in the right image, the leftmost N vertical steel bars in the left image will not be included in the calculation of the actual position coordinates of the steel bars; or when the number of steel bars in the left image in the same image set is N less vertical steel bars than the number of steel bars in the right image, the rightmost N vertical steel bars in the right image will not be included in the calculation of the actual position coordinates of the steel bars.

[0016] Optionally, according to the steel bar instance segmentation result, the actual position coordinates of each steel bar are calculated by parallax, specifically including:

[0017] Perform the first operation on the subgraph involved in the calculation of the actual position coordinates of the reinforcement bars;

[0018] The first operation is: first, in the sub-image involved in the calculation of the actual position coordinates of the steel bars, determine the area where each vertical steel bar is located; secondly, use the OpenCV straight line fitting function to fit the area where the vertical steel bars are located to obtain the straight line equation, and calculate the coordinates of the midpoints of each segment of the same vertical steel bar based on the straight line equation; then take the average of the coordinates of the midpoints of each segment of the same vertical steel bar to obtain the pixel coordinates of each vertical steel bar in the sub-image; finally, based on the pixel coordinates of each vertical steel bar, calculate the actual position coordinates of each steel bar by parallax.

[0019] Optionally, the actual position coordinates of each vertical steel bar are calculated by parallax based on the pixel coordinates of each vertical steel bar, specifically including:

[0020] When the sub-image belongs to the first image set, the actual position coordinates of each vertical steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar in each sub-image;

[0021] When the sub-image belongs to the second image set, the actual position coordinates of each transverse steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar in each sub-image.

[0022] Optionally, the calculation formula for the actual position coordinates is:

[0023]

[0024] Among them, the actual position coordinates are (x, y); P is the baseline length of the binocular system, f is the focal length of the camera, L is the width of the left camera or the right camera, L1 is the distance between the image of the steel bar on the left camera and the edge of the left camera, L2 is the distance between the image of the steel bar on the right camera and the edge of the right camera, and L1 and L2 are determined according to the pixel coordinates of the steel bar; the binocular system is a system composed of a left camera and a right camera.

[0025] In a second aspect, the present invention provides a steel bar spacing identification system, comprising:

[0026] An image acquisition module is configured to acquire a first image set and a second image set; the images in the first image set are the left and right images obtained by photographing the target steel mesh with the first binocular camera; the images in the second image set are the left and right images obtained by photographing the target steel mesh with the second binocular camera; the second binocular camera is a binocular camera obtained by rotating the first binocular camera 90° around the optical axis; the vertical steel bars in the images photographed by the first binocular camera are the horizontal steel bars in the images photographed by the second binocular camera;

[0027] The steel bar instance segmentation result determination module is used to segment each image using the trained Mask R-CNN network model to obtain the steel bar instance segmentation result corresponding to each image; the steel bar instance segmentation result includes multiple sub-images, the number of steel bars corresponding to each sub-image, the target detection box position of each steel bar, and the RGB color value of the area where each steel bar is located;

[0028] An actual position coordinate calculation module, configured to calculate the actual position coordinates of each steel bar by parallax based on the steel bar instance segmentation result;

[0029] The reinforcement spacing determination module is used to calculate the spacing between adjacent vertical reinforcements and the spacing between adjacent transverse reinforcements in the target reinforcement mesh according to the actual position coordinates of each reinforcement.

[0030] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for identifying steel bar spacing according to the first aspect.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for identifying steel bar spacing described in the first aspect.

[0032] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0033] The present invention uses the Mask R-CNN algorithm and binocular vision technology to accurately identify all steel bar spacings within the target range, with high detection coverage, eliminating potential risks, and efficiently replacing manual inspection methods, saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 A schematic diagram of a process for identifying steel bar spacing provided by an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the actual installation position of the binocular camera provided in an embodiment of the present invention;

[0037] Figure 3 A diagram illustrating a steel bar segmentation example provided in an embodiment of the present invention;

[0038] Figure 4 A diagram showing the principle of disparity calculation coordinates provided by an embodiment of the present invention;

[0039] Figure 5 A flow chart of parallax calculation of steel bar coordinates provided in an embodiment of the present invention;

[0040] Figure 6 A detailed flow chart of the method for identifying steel bar spacing provided by an embodiment of the present invention;

[0041] Figure 7 A schematic diagram of the structure of a steel bar spacing identification system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] Example 1

[0045] like Figure 1 and Figure 6 As shown, an embodiment of the present invention provides a method for identifying steel bar spacing based on the Mask R-CNN algorithm and binocular vision, which includes the following steps.

[0046] Step 100: Acquire a first image set and a second image set; the images in the first image set are the left and right images obtained by the first binocular camera photographing the target steel mesh; the images in the second image set are the left and right images obtained by the second binocular camera photographing the target steel mesh; the second binocular camera is a binocular camera obtained by rotating the first binocular camera 90° around the optical axis; the vertical steel bars in the image photographed by the first binocular camera are the horizontal steel bars in the image photographed by the second binocular camera.

[0047] An example: Use the first binocular camera arranged in parallel to shoot the steel mesh to be inspected, that is, the target steel mesh. The specific process is: first, arrange the two industrial cameras in parallel with each other and install them vertically on the ground, such as Figure 2 Then, the two industrial cameras are calibrated using the Matlab camera calibration toolbox to obtain the binocular system baseline length P. The two industrial cameras are then used to simultaneously photograph the steel mesh to be tested, obtaining one left image and one right image, which is the first image set.

[0048] Similarly, after rotating the first binocular camera 90° around the optical axis, the steel mesh to be tested is photographed simultaneously to obtain one left image and one right image, which is the second image set.

[0049] Step 200: Use the trained Mask R-CNN network model to segment each image to obtain the steel bar instance segmentation result corresponding to each image; the steel bar instance segmentation result includes multiple sub-images, the number of steel bars corresponding to each sub-image, the target detection box position of each steel bar, and the RGB color value of the area where each steel bar is located.

[0050] An example is: input the left and right steel bar images obtained in the previous step into the trained Mask R-CNN network model for prediction. The image output result is as follows: Figure 3 As shown, two text files, num_record.txt and color_record.txt, are output simultaneously. num_record.txt records the number of rebars in each image, while color_record.txt records the position of the target detection box for each rebar and the RGB color value of the mask. This gives you the number of rebars in each image.

[0051] Step 300: Calculate the actual position coordinates of each steel bar through parallax based on the steel bar instance segmentation result.

[0052] Since the left and right cameras are installed in different positions, the number of rebars in the captured images may be different. To address this issue, an embodiment of the present invention provides a specific implementation method that can achieve automatic compatibility when the left image has one more or one less rebar than the right image. For example: when the left image has one more vertical rebar than the right image, the leftmost rebar in the left image has no corresponding rebar in the right image and is therefore not included in the calculation. When the left image has one less vertical rebar than the right image, the rightmost vertical rebar in the right image has no corresponding rebar in the left image and is therefore not included in the calculation.

[0053] In view of this, before executing the step of calculating the actual position coordinates of each steel bar by parallax based on the steel bar instance segmentation result, the method provided by the embodiment of the present invention further includes: (1) judging whether the number of steel bars in the left image and the number of steel bars in the right image in the same image set are the same based on the steel bar instance segmentation result; (2) if so, calculating the actual position coordinates of the steel bars by parallax based on the steel bar instance segmentation result corresponding to each image in the same image set; (3) if not, when the number of steel bars in the left image in the same image set is N more than the number of steel bars in the right image, the leftmost N vertical steel bars in the left image are not included in the calculation of the actual position coordinates of the steel bars; or when the number of steel bars in the left image in the same image set is N less than the number of steel bars in the right image, the rightmost N vertical steel bars in the right image are not included in the calculation of the actual position coordinates of the steel bars.

[0054] The principle of parallax algorithm is as follows Figure 4 As shown, taking the first binocular camera as an example, O is the optical center of the left camera, P is the baseline length of the binocular system, f is the focal length of the camera, L is the width of the left or right camera, (x, y) is the coordinate of a steel bar perpendicular to the screen direction in the coordinate system shown, L1 is the distance between the image of the steel bar on the left camera and the edge of the left camera, L2 is the distance between the image of the steel bar on the right camera and the edge of the right camera, and L1 and L2 are determined based on the pixel coordinates of the steel bar. Among them, x and y are unknown quantities, and the rest are known quantities or can be calculated based on pixel coordinates. The binocular system is a system composed of a left camera and a right camera.

[0055] The calculation formula of the actual position coordinates is:

[0056] In view of this, step 300 described in the embodiment of the present invention specifically includes:

[0057] The first operation will be performed on the sub-graph that will participate in the calculation of the actual position coordinates of the reinforcement.

[0058] The first operation is: Figure 5 As shown in the figure, first, in the sub-graph involved in the calculation of the actual position coordinates of the steel bars, the area where each vertical steel bar is located is determined; secondly, the OpenCV straight line fitting function is used to fit the area where the vertical steel bars are located to obtain the straight line equation, and the coordinates of the midpoints of each segment of the same vertical steel bar are calculated based on the straight line equation; then the coordinates of the midpoints of each segment of the same vertical steel bar are averaged to obtain the pixel coordinates of each vertical steel bar in the sub-graph; finally, based on the pixel coordinates of each vertical steel bar, the actual position coordinates of each steel bar are calculated by parallax.

[0059] Furthermore, the actual position coordinates of each vertical steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar, specifically including: (1) when the sub-image belongs to the first image set, the actual position coordinates of each vertical steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar in each sub-image; (2) when the sub-image belongs to the second image set, the actual position coordinates of each horizontal steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar in each sub-image.

[0060] Step 400: Calculate the spacing between adjacent vertical steel bars and the spacing between adjacent transverse steel bars in the target steel mesh based on the actual position coordinates of each steel bar.

[0061] When taking the first binocular camera as an example, the steel bar coordinates (x, y) have been obtained in the previous step, and the coordinate system is Figure 4 The coordinate system shown in Figure 1 is shown in Figure 1. The x coordinate represents the horizontal position of the reinforcement, and the difference between the x coordinates of each reinforcement is used as the vertical reinforcement spacing.

[0062] Taking the second binocular camera as an example, the steel bar coordinates (x, y) have been obtained in the previous step, and the coordinate system is Figure 4 The modified coordinate system shown is Figure 4 The x-axis of the coordinate system shown is changed to the y-axis, Figure 4 The y-axis of the coordinate system shown is changed to the x-axis. The coordinate x represents the vertical position of the steel bar, and the difference between the x-coordinates of each steel bar is used as the horizontal steel bar spacing.

[0063] Furthermore, the embodiment of the present invention further includes: comparing the spacing between adjacent vertical steel bars and the spacing between adjacent transverse steel bars in the target steel mesh with design data, and issuing a test report.

[0064] Example 2

[0065] In order to execute the method corresponding to the above-mentioned embodiment 1 and achieve the corresponding functions and technical effects, a steel bar spacing identification system is provided below.

[0066] like Figure 7 As shown, an embodiment of the present invention provides a steel bar spacing identification system, comprising:

[0067] Image acquisition module 1 is used to acquire a first image set and a second image set; the images in the first image set are the left image and the right image obtained by the first binocular camera shooting the target steel mesh; the images in the second image set are the left image and the right image obtained by the second binocular camera shooting the target steel mesh; the second binocular camera is a binocular camera obtained by rotating the first binocular camera 90° around the optical axis; the vertical steel bars in the image shot by the first binocular camera are the horizontal steel bars in the image shot by the second binocular camera.

[0068] The steel bar instance segmentation result determination module 2 is used to use the trained Mask R-CNN network model to segment each image and obtain the steel bar instance segmentation result corresponding to each image; the steel bar instance segmentation result includes multiple sub-images, the number of steel bars corresponding to each sub-image, the target detection box position of each steel bar, and the RGB color value of the area where each steel bar is located.

[0069] The actual position coordinate calculation module 3 is used to calculate the actual position coordinates of each steel bar through parallax according to the steel bar instance segmentation result.

[0070] The reinforcement spacing determination module 4 is used to calculate the spacing between adjacent vertical reinforcements and the spacing between adjacent transverse reinforcements in the target reinforcement mesh according to the actual position coordinates of each reinforcement.

[0071] Example 3

[0072] An embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the steel bar spacing identification method of embodiment 1.

[0073] Optionally, the above-mentioned electronic device may be a server.

[0074] In addition, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the method for identifying steel bar spacing of the first embodiment when executed by a processor.

[0075] Compared with the prior art, the present invention has the following beneficial effects:

[0076] (1) Efficiently replace manual inspection methods and save labor costs.

[0077] (2) All steel bars within the target range can be detected with high detection coverage, eliminating potential risks.

[0078] (3) The test results are automatically recorded, intuitive, complete and traceable.

[0079] (4) The present invention has a comprehensive recognition speed of approximately 1.25 bars per second. Under suitable lighting conditions, combined with mechanical structures such as a robotic arm, it can operate automatically around the clock, offering the advantage of simple and rapid large-scale detection. The present invention can also become part of an intelligent construction system for steel bar engineering, promoting the further development and application of intelligent construction technology.

[0080] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0081] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A method for identifying steel bar spacing, characterized in that: include: Acquire a first image set and a second image set; the images in the first image set are the left and right images of the target steel mesh obtained by the first binocular camera; the images in the second image set are the left and right images of the target steel mesh obtained by the second binocular camera; the second binocular camera is a binocular camera obtained by rotating the first binocular camera 90° around the optical axis; the vertical steel bars in the image captured by the first binocular camera are the horizontal steel bars in the image captured by the second binocular camera; Using the trained Mask R-CNN network model, each image is segmented to obtain the steel bar instance segmentation results corresponding to each image. The steel bar instance segmentation results include multiple sub-images, the number of steel bars corresponding to each sub-image, the target detection box position of each steel bar, and the RGB color value of the area where each steel bar is located. According to the steel bar instance segmentation result, determining whether the number of steel bars in the left image and the number of steel bars in the right image in the same image set are the same; If so, the actual position coordinates of the steel bars are calculated by parallax based on the steel bar instance segmentation results corresponding to each image in the same image set; If not, then when the number of steel bars in the left image is N more than the number of steel bars in the right image in the same image set, the leftmost N vertical steel bars in the left image are excluded from the calculation of the actual steel bar position coordinates; or when the number of steel bars in the left image is N less than the number of steel bars in the right image in the same image set, the rightmost N vertical steel bars in the right image are excluded from the calculation of the actual steel bar position coordinates; According to the steel bar instance segmentation result, the actual position coordinates of each steel bar are calculated by parallax, specifically including: Perform the first operation on the subgraph involved in the calculation of the actual position coordinates of the reinforcement bars; The first operation is as follows: first, in the sub-graph involved in calculating the actual position coordinates of the steel bars, determine the area where each vertical steel bar is located; second, use the OpenCV straight line fitting function to fit the area where the vertical steel bars are located to obtain the straight line equation, and calculate the coordinates of the midpoints of each segment of the same vertical steel bar based on the straight line equation; then, average the coordinates of the midpoints of each segment of the same vertical steel bar to obtain the pixel coordinates of each vertical steel bar in the sub-graph; finally, calculate the actual position coordinates of each vertical steel bar based on the pixel coordinates of each vertical steel bar by parallax; According to the actual position coordinates of each steel bar, the spacing between adjacent vertical steel bars and the spacing between adjacent transverse steel bars in the target steel mesh are calculated.

2. A method for identifying steel bar spacing according to claim 1, characterized in that: Based on the pixel coordinates of each vertical steel bar, the actual position coordinates of each steel bar are calculated by parallax, including: When the sub-image belongs to the first image set, the actual position coordinates of each vertical steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar in each sub-image; When the sub-image belongs to the second image set, the actual position coordinates of each transverse steel bar are calculated by parallax according to the pixel coordinates of each vertical steel bar in each sub-image.

3. A method for identifying steel bar spacing according to claim 1, characterized in that: The calculation formula of the actual position coordinates is: Among them, the actual position coordinates are (x, y); P is the baseline length of the binocular system, f is the focal length of the camera, L is the width of the left camera or the right camera, L1 is the distance between the image of the steel bar on the left camera and the edge of the left camera, L2 is the distance between the image of the steel bar on the right camera and the edge of the right camera, and L1 and L2 are determined according to the pixel coordinates of the steel bar; the binocular system is a system composed of a left camera and a right camera.

4. A steel bar spacing identification system, characterized in that: include: An image acquisition module is configured to acquire a first image set and a second image set; the images in the first image set are the left and right images obtained by photographing the target steel mesh with the first binocular camera; the images in the second image set are the left and right images obtained by photographing the target steel mesh with the second binocular camera; the second binocular camera is a binocular camera obtained by rotating the first binocular camera 90° around the optical axis; the vertical steel bars in the images photographed by the first binocular camera are the horizontal steel bars in the images photographed by the second binocular camera; The steel bar instance segmentation result determination module is used to segment each image using the trained Mask R-CNN network model to obtain the steel bar instance segmentation result corresponding to each image; the steel bar instance segmentation result includes multiple sub-images, the number of steel bars corresponding to each sub-image, the target detection box position of each steel bar, and the RGB color value of the area where each steel bar is located; A steel bar quantity judgment module is used to judge whether the number of steel bars in the left image and the number of steel bars in the right image in the same image set are the same based on the steel bar instance segmentation result; if so, the actual position coordinates of the steel bars are calculated by parallax based on the steel bar instance segmentation result corresponding to each image in the same image set; if not, when the number of steel bars in the left image in the same image set is N more vertical steel bars than the number of steel bars in the right image, the leftmost N vertical steel bars in the left image are not included in the calculation of the actual position coordinates of the steel bars; or when the number of steel bars in the left image in the same image set is N less vertical steel bars than the number of steel bars in the right image, the rightmost N vertical steel bars in the right image are not included in the calculation of the actual position coordinates of the steel bars; The actual position coordinate calculation module is used to calculate the actual position coordinates of each steel bar by parallax based on the steel bar instance segmentation result, specifically including: Perform the first operation on the subgraph involved in the calculation of the actual position coordinates of the reinforcement bars; The first operation is as follows: first, in the sub-graph involved in calculating the actual position coordinates of the steel bars, determine the area where each vertical steel bar is located; second, use the OpenCV straight line fitting function to fit the area where the vertical steel bars are located to obtain the straight line equation, and calculate the coordinates of the midpoints of each segment of the same vertical steel bar based on the straight line equation; then, average the coordinates of the midpoints of each segment of the same vertical steel bar to obtain the pixel coordinates of each vertical steel bar in the sub-graph; finally, calculate the actual position coordinates of each vertical steel bar based on the pixel coordinates of each vertical steel bar by parallax; The reinforcement spacing determination module is used to calculate the spacing between adjacent vertical reinforcements and the spacing between adjacent transverse reinforcements in the target reinforcement mesh according to the actual position coordinates of each reinforcement.

5. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the method for identifying the spacing between steel bars according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steel bar spacing identification method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method and system for identifying number of reinforcing steel bars based on binocular camera

    CN115330855A

  • Method and apparatus for calibrating external parameters of binocular camera

    WO2023283929A1