Recognition method and device of steel bar vector drawing, computer equipment and storage medium

By identifying and deleting lines related to the specification parameters in the reinforcement vector drawings, the problem of automatic identification of reinforcement parameters is solved, and the accurate identification of reinforcement vector drawings and automatic identification of parameters is achieved.

CN119399788APending Publication Date: 2025-02-07GLODON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411626289.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

Automatic identification of steel bar parameters in steel bar vector drawings is difficult, especially due to the mix of steel bar lines and labels, the recognition accuracy is low.

Method used

By identifying the reinforcement specification parameters in the reinforcement vector drawing, deleting lines related to these parameters, generating the target vector drawing to be identified, and then identifying the reinforcement lines and labels, and determining the correspondence between the two.

Benefits of technology

Accurate identification of steel bar vector drawings is achieved, the automatic identification efficiency of steel bar parameters is improved, and the need for manual review is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399788A_ABST
    Figure CN119399788A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of constructional engineering, and discloses a steel bar vector drawing recognition method and device, computer equipment and a storage medium, and the method comprises the steps: recognizing steel bar specification parameters in a steel bar vector drawing; the steel bar specification parameters comprise at least one of a steel bar number, a steel bar number, a steel bar grade, a steel bar diameter and a steel bar length; deleting lines related to the steel bar specification parameters in the steel bar vector drawing, and generating a to-be-identified target vector drawing; recognizing steel bar lines and steel bar marks in the target vector drawing; determining a steel bar wire corresponding to each steel bar mark, and generating a corresponding relationship between the steel bar wire and the steel bar mark; generating an identification result of the steel bar vector drawing; the recognition result comprises the steel bar specification parameters and the corresponding relation. According to the method, the steel bar specification parameters are recognized first, then the lines related to the steel bar specification parameters are deleted, and recognition of the steel bar vector drawing can be accurately achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of construction engineering, and in particular to a method, a device, a computer device and a storage medium for identifying a steel bar vector drawing. Background Art

[0002] At present, based on actual needs, it is generally necessary to identify the parameter information of each steel bar in the steel bar drawing, such as the number and length of the steel bar. For example, in order to meet the needs of quickly producing engineering quantity records for bridge professionals, infrastructure highway quantity calculation software needs to identify the information in the steel bar drawing.

[0003] The rebar drawing is a rebar arrangement diagram with various styles. The rebar lines and the parameter information marked on the rebar drawing are mixed together, making it difficult to automatically identify the rebar parameter information. Summary of the invention

[0004] In view of this, the present invention provides a method, device, computer equipment and storage medium for identifying steel bar vector drawings to solve the problem of difficulty in identifying steel bar parameters.

[0005] In a first aspect, the present invention provides a method for identifying a steel bar vector drawing, comprising:

[0006] Identify steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length;

[0007] Deleting the lines related to the steel bar specification parameters in the steel bar vector drawing to generate a target vector drawing to be identified;

[0008] Identify the steel bar lines and steel bar annotations in the target vector drawing, and determine the first parameter of each of the steel bar lines and the second parameter of each of the steel bar annotations;

[0009] According to the first parameters of each of the steel bar lines and the second parameters of each of the steel bar annotations, determine the steel bar lines corresponding to each of the steel bar annotations, and generate a corresponding relationship between the steel bar lines and the steel bar annotations;

[0010] Generate a recognition result of the steel bar vector drawing; the recognition result includes the steel bar specification parameters and the corresponding relationship.

[0011] In some optional implementations, the identifying of steel bar specification parameters in the steel bar vector drawing includes:

[0012] Recognize the lines in the steel bar vector drawing to identify the steel bar number lines and steel bar lead lines;

[0013] Performing text recognition on the numbered area inside the steel bar numbering line to determine the corresponding steel bar number;

[0014] Text recognition is performed on the search area on both sides of the steel bar lead to determine at least one of the steel bar quantity, steel bar grade, steel bar diameter, and steel bar length.

[0015] In some optional implementations, the identifying of the lines in the steel bar vector drawing to identify the steel bar numbering lines and steel bar lead lines includes:

[0016] Identify the lines in the steel bar vector drawing to determine a first line set; the first line set includes a plurality of first lines that are sequentially connected end to end, the turning angle between two adjacent first lines is less than a preset threshold, and the difference between any two turning angles is less than a preset difference;

[0017] Determine the steel bar numbering line according to the first line set;

[0018] Determine the rebar leader that intersects the rebar numbering line.

[0019] In some optional implementations, the identifying the steel bar lines and steel bar annotations in the target vector drawing includes:

[0020] Performing text recognition processing on the target vector drawing, and determining corresponding steel bar markings according to the text recognition results;

[0021] Deleting the lines related to the steel bar marking in the target vector drawing to generate an intermediate vector drawing to be identified;

[0022] Identify the lines in the intermediate vector drawing to determine a second line set; the second line set includes a plurality of second lines, and any second line has the same endpoint as at least one other second line;

[0023] Each steel bar line of the steel bar is determined according to the second lines in the second line set.

[0024] In some optional implementations, identifying the lines in the intermediate vector drawing to determine the second line set includes:

[0025] Identify the lines in the intermediate vector drawing, determine the two endpoints of each line in the intermediate vector drawing, and establish a corresponding relationship between the endpoints and the lines;

[0026] Based on whether there are the same endpoints between the lines, the lines in the intermediate vector drawing are searched to obtain a second line set generated by clustering the continuous lines.

[0027] In some optional implementations, searching the lines in the intermediate vector drawing based on whether the lines have the same endpoints to obtain a second line set generated by clustering the continuous lines includes:

[0028] If there is an initial line in the intermediate vector drawing that has not been visited, add the initial line to the corresponding second line set, and mark the initial line as visited;

[0029] Starting from the first endpoint of the initial line, performing at least one level of first line search processing until there are no lines with common endpoints and not visited;

[0030] Starting from the second endpoint of the initial line, performing at least one level of second line search processing until there are no lines with common endpoints and not visited;

[0031] The first line search process of the current level includes:

[0032] According to the starting endpoint of the first target line, a first associated line set for recording the first associated line is determined; one of the endpoints of the first associated line is the same as the starting endpoint of the first target line; the starting endpoint of the first target line corresponding to the first level is the first endpoint of the initial line;

[0033] In the case that there is a first associated line that has not been visited in the first associated line set, adding the first associated line to the second line set corresponding to the initial line, and marking the first associated line as visited;

[0034] Using the other endpoint of the first associated line as the starting endpoint of the first target line corresponding to the next level, and performing the first line search process of the next level;

[0035] When there is no unvisited first associated line in the first associated line set, ending the first line search process at the current level;

[0036] And, the second line search process of the current level includes:

[0037] According to the starting endpoint of the second target line, a second associated line set for recording the second associated line is determined; one of the endpoints of the second associated line is the same as the starting endpoint of the second target line; the starting endpoint of the second target line corresponding to the first level is the second endpoint of the initial line;

[0038] If there is a second associated line that has not been visited in the second associated line set, add the second associated line to the second line set corresponding to the initial line, and mark the second associated line as visited;

[0039] Using the other endpoint of the second associated line as the starting endpoint of the second target line corresponding to the next level, and performing the second line search process of the next level;

[0040] When there is no unvisited second associated line in the second associated line set, the second line search process of the current level is terminated.

[0041] In some optional implementations, after generating the corresponding relationship between the reinforcement line and the reinforcement mark, the method further includes:

[0042] Determine the calculated length of the steel bars corresponding to the second set of lines according to the steel bar annotations corresponding to each steel bar line in the second set of lines;

[0043] The steel bar length corresponding to the second line set is verified according to the calculated length.

[0044] In some optional implementations, determining the steel bar lines corresponding to the respective steel bar annotations according to the first parameters of the respective steel bar lines and the second parameters of the respective steel bar annotations, and generating the corresponding relationship between the steel bar lines and the steel bar annotations, comprises:

[0045] Determining a weight between each of the steel bar lines and each of the steel bar marks according to the first parameter of each of the steel bar lines and the second parameter of each of the steel bar marks;

[0046] Keep the effective weights greater than the preset value;

[0047] Performing a matching operation on the unmatched reinforcement wires until there are no unmatched reinforcement wires;

[0048] The matching operation includes:

[0049] For the first unmatched steel bar line, determining whether there is a valid weight between the first steel bar line and the steel bar mark;

[0050] In the case that there is no valid weight between the first steel bar line and any steel bar mark, marking the first steel bar line as matched, and ending the matching operation on the first steel bar line;

[0051] In the case where there is a valid weight between the first reinforcement line and at least one reinforcement mark, determining a maximum reinforcement mark corresponding to a maximum valid weight;

[0052] Determine a second reinforcement line associated with the maximum reinforcement mark, and determine a maximum reinforcement line having the largest effective weight among the second reinforcement lines;

[0053] When the maximum reinforcement line is consistent with the first reinforcement line, a corresponding relationship between the first reinforcement line and the maximum reinforcement mark is established, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended;

[0054] In the case that the maximum reinforcement line is inconsistent with the first reinforcement line, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended.

[0055] In a second aspect, the present invention provides a device for identifying a steel bar vector drawing, comprising:

[0056] The first recognition module is used to recognize the steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of the steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length;

[0057] A drawing generation module, used for deleting the lines related to the steel bar specification parameters in the steel bar vector drawing, and generating a target vector drawing to be identified;

[0058] A second recognition module is used to recognize the steel bar lines and steel bar marks in the target vector drawing, and determine the first parameter of each of the steel bar lines and the second parameter of each of the steel bar marks;

[0059] A matching module, for determining the steel bar lines corresponding to the respective steel bar annotations according to the first parameters of the respective steel bar lines and the second parameters of the respective steel bar annotations, and generating a corresponding relationship between the steel bar lines and the steel bar annotations;

[0060] A processing module is used to generate a recognition result of the steel bar vector drawing; the recognition result includes the steel bar specification parameters and the corresponding relationship.

[0061] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for recognizing steel bar vector drawings of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0062] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for identifying steel bar vector drawings of the first aspect or any corresponding embodiment thereof.

[0063] The present invention utilizes the characteristics of relatively standardized lines in steel bar vector drawings such as steel bar large-scale drawings, first identifies the steel bar standard parameters therein, and then deletes the lines related to the steel bar standard parameters, so that the steel bar lines and steel bar markings can be identified relatively simply and accurately in the subsequent process, and the corresponding relationship between the two can be determined, thereby realizing the recognition of steel bar vector drawings relatively accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0065] Figure 1 is a schematic diagram of some steel bar patterns according to an embodiment of the present invention;

[0066] Figure 2 is a schematic flow chart of a method for identifying a steel bar vector drawing according to an embodiment of the present invention;

[0067] Figure 3 is a flow chart of another method for identifying a steel bar vector drawing according to an embodiment of the present invention;

[0068] Figure 4 is a labeled schematic diagram of stirrups according to an embodiment of the present invention;

[0069] Figure 5 is a schematic diagram of a marking of a reinforcement according to an embodiment of the present invention;

[0070] Figure 6 is a schematic diagram of processing a steel bar vector drawing according to an embodiment of the present invention;

[0071] Figure 7 is a schematic diagram of identifying an intermediate vector drawing according to an embodiment of the present invention;

[0072] Figure 8 is a bipartite graph of reinforcement lines and reinforcement annotations according to an embodiment of the present invention;

[0073] Fig. 9 is a schematic diagram of a matching process of a reinforcement line and a reinforcement mark according to an embodiment of the present invention;

[0074] Fig.10 is a structural block diagram of a device for identifying a steel bar vector drawing according to an embodiment of the present invention;

[0075] Fig.11It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0077] The steel bar drawing (steel bar layout diagram) contains the core parameters of the steel bars, such as the steel bar number, quantity, grade, diameter, length and other data; if these steel bar parameters can be automatically identified, the identification results can be automatically filled in the review project quantity, thus meeting the needs of automatic review of steel bar quantities in bridge specialties.

[0078] Currently, there are solutions for automatically identifying parameters in steel bar drawings, but most of them are based on steel bar drawings in a specific format (for example, DXF format, i.e. Drawing Exchange Format). Based on the content in this specific format of steel bar drawings, some parameters can be read out relatively easily, thus simplifying the identification process. Figure 1 Generally, it is a vector drawing in PDF format, which can only be recognized by image processing and is easily affected by the individual lines and annotations.

[0079] Some solutions can identify tables in steel bar drawings. However, since the format of the table is relatively standardized and the implementation method is relatively simple, this solution is not suitable for directly identifying steel bar lines and annotation information.

[0080] There are various styles in the steel bar detail drawing, such as Figure 1 As shown, the steel bars mainly include the following categories:

[0081] (1) Linear reinforcement: The line reinforcement pattern is composed of a line (straight line, arc line) with two hooks at both ends; Figure 1 The upper left picture in .

[0082] (2) Stirrups: Stirrups consist of a continuous closed line and hooks; Figure 1 The upper right picture in .

[0083] (3) Nested stirrups: Multiple groups of stirrups are nested together: Figure 1 The lower left picture in .

[0084] (4) Stirrup reinforcement: Stirrup reinforcement is mainly used in pile foundation, and can play a reinforcing role through triangular support; Figure 1 The lower right picture in .

[0085] The method for identifying steel bar vector drawings provided in an embodiment of the present invention utilizes the characteristics of relatively standardized lines in steel bar vector drawings such as steel bar large-scale drawings to first identify the steel bar standard parameters therein, and then delete the lines related to the steel bar standard parameters, so that the steel bar lines and steel bar markings can be identified relatively simply and accurately in the subsequent process, and the corresponding relationship between the two can be determined, thereby realizing the identification of steel bar vector drawings relatively accurately.

[0086] According to an embodiment of the present invention, an embodiment of a method for identifying a steel bar vector drawing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0087] In this embodiment, a method for identifying a steel bar vector drawing is provided, which can be used in a mobile terminal, a personal computer or a server with processing capabilities. Figure 2 is a flow chart of a method for identifying a steel bar vector drawing according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps.

[0088] Step S201, identifying the steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of the steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length.

[0089] In this embodiment, although the styles of steel bar vector drawings such as steel bar details are diverse, the inventors have found through analysis that the styles of parameters such as steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length in the steel bar vector drawings are relatively standardized, so these parameters can be identified first. In this embodiment, these parameters are referred to as "steel bar standard parameters."

[0090] Step S202, deleting the lines related to the steel bar specification parameters in the steel bar vector drawing, and generating a target vector drawing to be identified.

[0091] In this embodiment, in the steel bar vector drawing, both the marked text and the steel bar lines are expressed in the form of lines. After the steel bar specification parameters are determined, the lines related to the steel bar specification parameters in the steel bar vector drawing can be deleted to obtain a vector drawing that does not contain the steel bar specification parameters, that is, a target vector drawing.

[0092] Among them, the position information of each line in the steel bar vector drawing can be obtained, and the position information can be, for example, the coordinates of the line in the steel bar vector drawing. After determining the lines related to the steel bar specification parameters, the lines can be located in the steel bar vector drawing based on the position information of these lines, so as to delete the located lines, that is, the lines related to the steel bar specification parameters can be deleted to generate the target vector drawing.

[0093] Step S203, identifying the steel bar lines and steel bar markings in the target vector drawing, and determining the first parameter of each of the steel bar lines and the second parameter of each of the steel bar markings.

[0094] In this embodiment, since the target vector drawing is a drawing generated after deleting the lines related to the steel bar specification parameters, the target vector drawing mainly contains various steel bar lines and corresponding steel bar markings. Therefore, identifying steel bar lines and steel bar markings based on the target vector drawing can effectively reduce the interference of other lines and improve the recognition accuracy.

[0095] Furthermore, in order to facilitate the subsequent determination of the correspondence between the steel bar line and the steel bar mark, the parameters related to the steel bar line, ie, the first parameters, and the parameters related to the steel bar mark, ie, the second parameters, can be further determined.

[0096] The first parameter and the second parameter may specifically include the position information, orientation information, length, shape, etc. of the steel bar line and the steel bar marking. For example, the position information may be the position coordinates, the orientation information may be the horizontal direction, the vertical direction, the inclination angle, etc., and the shape of the steel bar line may indicate whether it is a reinforcing bar, etc.

[0097] Step S204, determining the steel bar lines corresponding to the respective steel bar annotations according to the first parameters of the respective steel bar lines and the second parameters of the respective steel bar annotations, and generating a corresponding relationship between the steel bar lines and the steel bar annotations.

[0098] The steel bars in the steel bar vector drawing generally correspond to multiple steel bar lines, and at least some of the steel bar lines are marked with corresponding parameters, i.e., steel bar markings; however, in drawings such as steel bar large-scale drawings, due to the large number of lines, it is not easy to directly identify which steel bar line the steel bar marking corresponds to from the steel bar vector drawing. In this embodiment, each steel bar line and each steel bar marking in the target vector drawing are first identified, and then the steel bar line and the steel bar marking are further matched according to the first parameter and the second parameter to determine the corresponding relationship between the steel bar line and the steel bar marking, which is used to indicate which steel bar line the steel bar marking corresponds to.

[0099] In this way, the influence of interfering lines can be reduced and the matching accuracy can be improved, so that the correspondence between the steel bar lines and the steel bar markings can be determined more accurately.

[0100] Step S205, generating a recognition result of a steel bar vector drawing; the recognition result includes steel bar specification parameters and corresponding relationships.

[0101] In this embodiment, after the above steps S201 to S204 are processed, the recognition result of the steel bar vector drawing can be obtained, and the recognition result includes the steel bar specification parameters of each steel bar, and the corresponding relationship between the steel bar line and the corresponding steel bar mark in each steel bar.

[0102] Among them, the steel bar specification parameters of the steel bar can be used for engineering review, etc., and the correspondence between the steel bar line and the steel bar mark can be used to determine the position of each steel bar, so as to accurately cut out the lines of some steel bars from the steel bar vector drawing. Of course, the recognition result can also be used in other scenarios, which is not limited in this embodiment.

[0103] The method for identifying steel bar vector drawings provided in this embodiment utilizes the characteristics of relatively standardized lines in steel bar vector drawings such as steel bar large-scale drawings to first identify the steel bar standard parameters therein, and then delete the lines related to the steel bar standard parameters, so that the steel bar lines and steel bar markings can be identified relatively simply and accurately in the subsequent process, and the corresponding relationship between the two can be determined, thereby realizing the identification of steel bar vector drawings relatively accurately.

[0104] In this embodiment, another method for identifying a steel bar vector drawing is provided, which can be used in a mobile terminal, a personal computer or a server with processing capabilities. Figure 3 is a flow chart of a method for identifying a steel bar vector drawing according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps.

[0105] Step S301, identifying the steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of the steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length.

[0106] Specifically, the above step S301 "identifying steel bar specification parameters in steel bar vector drawings" includes steps S3011 to S3013.

[0107] Step S3011, identify the lines in the steel bar vector drawing, and identify the steel bar numbering lines and steel bar leaders.

[0108] The steel bar numbers in the steel bar drawing are generally located within a circular (or approximately circular) line. In this embodiment, the circular line is called a "steel bar numbering line"; and each steel bar number is led out by a certain leader line. In this embodiment, the leader line is called a "steel bar leader line". The steel bar lead line is generally a broken line, which includes a horizontal (or vertical) line and a diagonal line.

[0109] Figure 4A schematic diagram of stirrups is shown. Figure 1 The stirrups shown in the upper right corner are used as an example. Figure 4 As shown, the steel bar number of the stirrup is 10, which is surrounded by a circular line, that is, surrounded by the steel bar number line; and the steel bar number line has a corresponding steel bar lead line, and the steel bar lead line is also connected to the steel bar line corresponding to the stirrup.

[0110] In some optional implementations, the above step S3011 "identifying the lines in the steel bar vector drawing, identifying the steel bar numbering lines and steel bar leaders" may include steps A1 to A3.

[0111] Step A1, identify the lines in the steel bar vector drawing and determine the first line set; the first line set includes multiple first lines connected end to end in sequence, the angle between two adjacent first lines is less than a preset threshold, and the difference between any two angles is less than a preset difference.

[0112] In this embodiment, since the steel bar numbering lines are basically circular, and in the steel bar vector drawing, the circle (or arc) is composed of a large number of shorter lines connected end to end in sequence, that is, the circle includes multiple lines connected end to end in sequence. Based on this, the problem of searching for steel bar numbering lines in the steel bar vector drawing is converted into finding a closed area that appears to be a circle and is connected end to end from a large number of lines.

[0113] Specifically, for a line A in a steel bar vector drawing, if it is connected end to end with another line B, and the angle between line A and line B is large, it can be considered that the two lines are not lines in a circle, for example, they may be lines in a steel bar line or a steel bar lead; if the angle between line A and line B is small (less than a preset threshold), it can be considered that line A and line B may be two lines in a circle, and then the search is continued on the basis of line A or line B. If the angles between the remaining sequentially connected lines are also less than the preset threshold, and the sizes of the angles are close, that is, the difference between the angles is less than the preset difference, for example, the angles are the same, then it can be determined that the figure formed by these first connected lines is a circle.

[0114] For ease of description, the set formed by these lines is called a first line set, and correspondingly, the lines in the first line set are called first lines. For example, the above-mentioned line A and line B can both be used as one of the first lines. It can be understood that each first line set corresponds to a circle in the steel bar vector drawing.

[0115] The angle between two lines is 180° minus the angle between the two lines.

[0116] Step A2, determining the steel bar numbering lines according to the first line set.

[0117] Step A3, determine the steel bar leader that intersects the steel bar numbering line.

[0118] In this embodiment, after determining the first line sets corresponding to the circles, the steel bar numbering lines can be determined based on the first line sets. For example, each first line set corresponds to a steel bar numbering line.

[0119] Alternatively, since there are other circular lines in the steel bar vector drawing, such as circular stirrup reinforcements, circular number "0", etc., a first line set that meets the characteristics of the steel bar numbering line can be selected from the first line set, and each selected first line set can be used as a steel bar numbering line.

[0120] For example, the first line set corresponding to the steel bar numbering lines may be selected based on the size of the graphic corresponding to the first line set, or whether other lines exist in the first line set, so that each steel bar numbering line can be identified.

[0121] Furthermore, the rebar leader is a line drawn from a certain position of the rebar numbering line, so the line intersecting the rebar numbering line can be used as the corresponding rebar leader. Specifically, a broken line intersecting the rebar numbering line and including a horizontal (or vertical) line and an inclined line is used as the rebar leader.

[0122] Step S3012, performing text recognition on the numbered area inside the steel bar numbering line to determine the corresponding steel bar number.

[0123] Step S3013, performing text recognition on the search area on both sides of the steel bar lead to determine at least one of the steel bar quantity, steel bar grade, steel bar diameter, and steel bar length.

[0124] In this embodiment, the steel bar number line is a closed line, and the area inside it is used to fill in the steel bar number. The area inside is called the number area. By performing text recognition on the number area, the text therein can be recognized, and the text is the corresponding steel bar number. For example, OCR (Optical Character Recognition) recognition can be performed on the number area.

[0125] As for the rebar lead, the corresponding text is on both sides of the rebar lead, specifically on both sides of the horizontal line or vertical line of the rebar lead. Therefore, a search area can be constructed on both sides of the rebar lead, and text recognition processing such as OCR can be performed to identify the text content marked at the rebar lead. The text content generally includes information such as the number of rebars, rebar grade, rebar diameter, and rebar length.

[0126] In order to facilitate the description of the processing flow of this patent, the following explanation will mainly be given using wire reinforcement as an example. Figure 5A schematic diagram of the annotation of the reinforcement is shown. Figure 1 Take the line bar shown in the upper left corner as an example. Figure 5 As shown in the figure, after identifying the steel bar number line and steel bar leader of the wire bar, the area that needs OCR recognition can be determined. Figure 5 The corresponding areas are represented by dotted boxes, among which the circular dotted box represents the numbered area and the square dotted box represents the search area on both sides of the steel bar leader.

[0127] right Figure 5 By performing OCR recognition on the area in the image, we can determine that the content of the numbered area is "10", that is, the steel bar number is 10; and we can identify that the contents on both sides of the steel bar leader are "8B32" and "474.0" respectively. Based on the form of steel bar marking, we can get that the number of steel bars is "8", the steel bar grade is "B", that is, Grade II steel bars, the steel bar diameter is "32", and the steel bar length is "474.0".

[0128] For example, the OpenCV interface can be used to print the lines in the numbered area and the search area as images, and the OCR service can be called to recognize the images and obtain the recognition results of the steel bar specification parameters.

[0129] Step S302, deleting the lines related to the steel bar specification parameters in the steel bar vector drawing, and generating a target vector drawing to be identified.

[0130] The most complicated part of the rebar drawing is the identification of the rebar annotation. In the rebar drawing, the annotation styles on the rebar lines are diverse and there are many interfering lines. The traditional business logic-based algorithm is difficult to apply to the identification of the rebar annotation lines. In this embodiment, after the rebar specification parameters are identified, the lines related to the rebar specification parameters are deleted, thereby generating a drawing mainly related to the rebar lines and rebar annotations, that is, the target vector drawing.

[0131] Among them, the lines related to the steel bar specification parameters include the lines of the steel bar specification parameters themselves, as well as the lines corresponding to the steel bar numbering lines and steel bar leaders.

[0132] Continue with Figure 5 Take the reinforcement shown in the figure as an example. Figure 6 A schematic diagram of processing steel bar vector drawings is shown. Figure 6 As shown in the figure, after identifying the steel bar number line, steel bar leader line and steel bar specification parameter lines of the steel bar vector drawing, delete these lines to obtain a drawing containing only the steel bar lines and steel bar annotations of the steel bar, that is, the target vector drawing. For details, see Figure 6 shown.

[0133] Step S303, identifying the steel bar lines and steel bar markings in the target vector drawing, and determining the first parameter of each of the steel bar lines and the second parameter of each of the steel bar markings.

[0134] In some optional implementations, the above step S303 "identifying steel bar lines and steel bar labels in the target vector drawing" specifically includes steps B1 to B4.

[0135] Step B1, perform text recognition processing on the target vector drawing, and determine the corresponding steel bar marking according to the text recognition result.

[0136] Step B2, deleting the lines related to the steel bar marking in the target vector drawing to generate an intermediate vector drawing to be identified.

[0137] In this embodiment, the steel bar markings in the target vector drawing are first identified, and then the steel bar lines are identified.

[0138] Specifically, by performing text recognition processing such as OCR on the target vector drawing, each text in the target vector drawing can be identified, and these texts are all steel bar markings. After that, the lines related to the steel bar markings in the target vector drawing are deleted, and a drawing containing only steel bar lines, that is, the intermediate vector drawing, can be obtained.

[0139] In order to locate the lines related to the steel bar marking, the present embodiment also determines the bounding box of each steel bar marking; and, since some steel bar markings are inclined, the present embodiment uses a tight bounding box, such as an oriented bounding box (OBB). The above step B1 may specifically include the following steps B11 to B14.

[0140] Step B11, for the vector lines in the target vector drawing, generate a local coordinate system (eg, upper left corner coordinate system) corresponding to the bounding box, and transform the vector lines in the target vector drawing from their own world coordinate system to the local coordinate system.

[0141] Step B12, for the vector lines converted to the local coordinate system, call the OpenCV drawing interface to generate a corresponding image.

[0142] Step B13, perform OCR recognition on the generated image, and return the recognition result and the position data of the corresponding directed bounding box; the recognition result includes the steel bar marking, and the position data of the directed bounding box may specifically include the vertex coordinates of the four vertices of the directed bounding box.

[0143] Step B14, using the conversion relationship between the world coordinate system and the local coordinate system, the position of the directed bounding box is converted from the local coordinate system to the world coordinate system of the target vector drawing, thereby determining the position of the directed bounding box in the target vector drawing.

[0144] When the lines related to the steel bar marking in the target vector drawing are subsequently deleted, the position of the steel bar marking can be determined based on the position of the directed bounding box in the target vector drawing, so that the lines in the directional bounding box (that is, the lines related to the steel bar marking) are deleted to obtain the intermediate vector drawing.

[0145] For a schematic diagram of using the directional bounding box to generate the intermediate vector drawing, see Figure 6 As shown in the figure, three directional bounding boxes can be determined, and three steel bar annotations can be identified accordingly, namely 37, 400, and 37.

[0146] It can be understood that the position information, orientation information, etc. of the directed bounding box can be used as the second parameter of the steel bar marking.

[0147] Step B3, identifying the lines in the intermediate vector drawing to determine a second line set; the second line set includes a plurality of second lines, and any second line has the same endpoint as at least one other second line.

[0148] Step B4, determining each steel bar line of the steel bar according to the second lines in the second line set.

[0149] After generating an intermediate vector drawing containing only the steel bar lines, it is possible to determine which lines belong to the same steel bar based on the connection relationship between the lines in the intermediate vector drawing, and further determine the steel bar lines of each steel bar.

[0150] Specifically, the lines with the same endpoints in the intermediate vector drawing are identified, and a corresponding line set is generated, namely the second line set, in which the lines are called second lines. The second lines in the second line set do not need to have the same endpoints as all other second lines, but only need to have the same endpoints as one of the second lines; in this way, multiple lines connected in sequence can be classified into the same set to form a corresponding second line set.

[0151] Each second set of lines corresponds to a steel bar, but since steel bars are usually bent, the steel bars can be further divided into multiple sections, and each section of steel bars corresponds to a steel bar line. For example, for wire bars, stirrups, etc., a straight line can be used as the corresponding steel bar line; for arc or circular lines, the entirety of the line can be used as a steel bar line.

[0152] Optionally, the above step B3 of “identifying the lines in the intermediate vector drawing and determining a second line set” specifically includes steps B31 and B32.

[0153] Step B31, identifying the lines in the intermediate vector drawing, determining the two endpoints of each line in the intermediate vector drawing, and establishing a corresponding relationship between the endpoints and the lines.

[0154] Step B32: searching the lines in the intermediate vector drawing based on whether there are the same endpoints between the lines, and obtaining a second line set generated by clustering the continuous lines.

[0155] In this embodiment, each line in the intermediate vector drawing includes two endpoints. Based on whether there are the same endpoints between two lines, it can be determined whether the two lines are connected. Therefore, by searching each line in the intermediate vector drawing, it can be determined which lines are continuously connected lines, and these lines are clustered into a corresponding second line set.

[0156] In order to improve the search efficiency, this embodiment uses lines as edges and each end point of the lines as points to construct a directed graph of points and edges. The data structure of the directed graph of points and edges can be as follows:

[0157] Struct directed graph

[0158] {

[0159] Hash table <int, vector line> collection of edges;

[0160] map<set of points and edges>relationship between endpoints and edges;

[0161] }

[0162] The set of edges is used to record the identification of each line, such as the line ID, etc. The relationship between endpoints and edges is used to record which edges a certain endpoint corresponds to.

[0163] Specifically, the vector lines can be traversed from the intermediate vector drawing; the obtained vector lines are added to the edge set, and the starting point and end point of the vector lines are obtained. Then, it is determined whether the starting point and end point exist in the directed graph. If they do exist, the vector line is updated to the relationship between the endpoint and the edge; if they do not exist, a new relationship between the endpoint and the edge is created; and then the traversal is continued until all the vector lines are traversed.

[0164] Figure 7 A schematic diagram of identifying an intermediate vector drawing is shown. Figure 6 The middle vector drawing shown in the figure is used as an example. Figure 7 As shown, the middle vector drawing includes three lines in total; when line ① is identified, it is added to the set of edges, the two endpoints of line ① are endpoint A and endpoint B, and the relationship between endpoint A and line ①, as well as the relationship between endpoint B and line ① are established.

[0165] After that, line ② is identified and added to the edge set. The two endpoints of line ② are endpoint B and endpoint C. Since endpoint C is not recorded at this time, the relationship between endpoint C and line ② can be established; and since endpoint B has been recorded in between, line ② is also recorded in the relationship with endpoint B, that is, endpoint B has a relationship with both lines ① and line ②.

[0166] Then, line ③ is identified and added to the edge set. The two endpoints of line ③ are endpoint C and endpoint D. Similarly, since endpoint D is not recorded at this time, the relationship between endpoint D and line ③ can be established; and since endpoint C has been recorded in between, line ③ is also recorded in the relationship with endpoint C, that is, endpoint C has a relationship with both lines ② and line ③.

[0167] Then, based on the directed graph of the intermediate vector drawing, it is possible to determine which lines have the same endpoints. Figure 7 As shown, line ① and line ② have the same endpoint B, and line ② and line ③ have the same endpoint C, so lines ①, line ②, and line ③ can form a second line set, which corresponds to a steel bar, that is, Figure 7 The reinforcing bars shown; and, line ①, line ②, and line ③ all correspond to a section of reinforcing bar wire, that is, three sections of reinforcing bar wire can be determined based on the second line set.

[0168] It should be noted that there will be curved lines at the corners of the steel bars, such as Figure 7 At the midpoint B, point C, etc., these curved lines will also be identified as a section of steel bar wire; for the convenience of describing the recognition principle of this patent, Figure 7 The curved lines at the corners are not considered, and the reinforcement is only divided into three sections for illustration.

[0169] Optionally, the above step B32 "searching the lines in the intermediate vector drawing based on whether there are the same endpoints between the lines to obtain a second line set generated by clustering the continuous lines" may include steps B321 to B323.

[0170] Step B321: If there is an initial line in the intermediate vector drawing that has not been visited, add the initial line to the corresponding second line set and mark the initial line as visited.

[0171] Step B322, starting from the first endpoint of the initial line, performing at least one level of first line search processing until there are no lines with common endpoints and have not been visited.

[0172] Step B323, starting from the second endpoint of the initial line, performing at least one level of second line search processing until there are no lines with common endpoints and have not been visited.

[0173] Among them, in the above step B322, the first line search process of the current level includes steps B3221 to B3224.

[0174] Step B3221, determining a first associated line set for recording a first associated line according to the starting endpoint of the first target line; one of the endpoints of the first associated line is the same as the starting endpoint of the first target line; the starting endpoint of the first target line corresponding to the first level is the first endpoint of the initial line;

[0175] Step B3222, when there is a first associated line that has not been visited in the first associated line set, add the first associated line to the second line set corresponding to the initial line, and mark the first associated line as visited;

[0176] Step B3223, taking the other endpoint of the first associated line as the starting endpoint of the first target line corresponding to the next level, and performing the first line search process of the next level;

[0177] Step B3224: When there is no unvisited first associated line in the first associated line set, the first line search process of the current level is terminated.

[0178] And, similarly, in the above step B323, the second line search process of the current level includes steps B3231 to B3234.

[0179] Step B3231, determine the second associated line set used to record the second associated line according to the starting endpoint of the second target line; one of the endpoints of the second associated line is the same as the starting endpoint of the second target line; the starting endpoint of the second target line corresponding to the first level is the second endpoint of the initial line.

[0180] Step B3232: If there is a second associated line in the second associated line set that has not been visited, add the second associated line to the second line set corresponding to the initial line, and mark the second associated line as visited.

[0181] Step B3233, taking the other endpoint of the second associated line as the starting endpoint of the second target line corresponding to the next level, and continuing to perform the second line search process of the next level.

[0182] Step B3234: When there is no unvisited second associated line in the second associated line set, the second line search process of the current level is terminated.

[0183] In this embodiment, when searching for lines in the intermediate vector drawing, starting from a line that has not been visited (i.e., the initial line), at least one level of line search processing is performed on both of its endpoints (the first endpoint and the second endpoint) until all lines directly or indirectly connected to the initial line are found, thereby forming a corresponding second line set. Figure 7 The middle vector drawing is shown for illustration.

[0184] like Figure 7 As shown, initially, all the lines in the middle vector drawing have not been visited, so there are initial lines that have not been visited at this time; in this embodiment, line ① is taken as an initial line for explanation.

[0185] Specifically, in Figure 7 When performing the search for the intermediate vector drawing shown in the figure, line ① is used as the initial line, a corresponding second line set is created, and line ① is added to the second line set; at the same time, line ① is marked as "visited". In addition, endpoint B of line ① is used as its first endpoint, that is, starting from endpoint B, several levels of first line search processing are performed.

[0186] As shown in the above steps B3221 to B3224, when the first line search process of the first level is executed (i.e., the current level is the first level), the first target line is line ①, and its starting endpoint is the first endpoint of line ①, i.e., endpoint B. For the endpoint B, a set of lines having one endpoint identical to the endpoint B can be determined, i.e., a first associated line set; for example, the first associated line set can be determined based on the relationship between endpoints and edges in a directed graph. Figure 7 In , the first associated line set corresponding to the endpoint B includes line ① and line ②.

[0187] Since line ① is marked as visited, but line ② is not visited, there is a first associated line that has not been visited in the first associated line set, and the first associated line is line ②, so line ② is also added to the second line set corresponding to the initial line ①, and line ② is also marked as visited. The second line set now includes line ① and line ②. In addition, for the first associated line (i.e., line ②), it also has another endpoint, i.e., endpoint C. As shown in step B3222, endpoint C is continued to be used as the starting endpoint of the first target line corresponding to the next level (i.e., the second level), thereby performing the first line search process of the second level.

[0188] Similar to the first line search process of the first level, when executing the first line search process of the second level, the first associated line set corresponding to the endpoint C is required and determined, which includes lines ② and ③, and the unmarked line ③ is added to the second line set corresponding to the initial line, and line ③ is also marked as visited. The second line set now includes lines ①, line ② and line ③. Then, the other endpoint D of line ③ is used as the starting endpoint of the first target line corresponding to the third level, and the first line search process of the next level (i.e., the third level) is continued; since in the first line search process of the third level, there is no unvisited first associated line in the first associated line set, the first line search process of the third level is terminated.

[0189] Similarly, when executing the first line search process of the second level or the first level, if there is no unvisited first associated line in the first associated line set, the first line search process of the corresponding level is also terminated.

[0190] In addition, similar to the above steps B3221 to B3224, the other end point A of line ① is used as its second end point, and at least one level of second line search processing is performed starting from this end point. Figure 7 As shown, when executing the second line search process of the first level corresponding to endpoint A, since the second associated line set corresponding to endpoint A only includes the visited line ①, the second line search process of the first level can be directly ended.

[0191] After performing the corresponding line search processing on a certain initial line, it is possible to continue to determine whether there are any unvisited initial lines in the intermediate vector drawing, and then continue to execute steps B321 to B323 for other unvisited initial lines until there are no unvisited initial lines in the intermediate vector drawing.

[0192] In this embodiment, by performing at least one level of line search processing on the two endpoints of the initial line that has not been visited in the intermediate vector drawing, other lines directly or indirectly connected to the initial line can be simply and quickly searched, so that multiple lines belonging to the same steel bar can be searched, and then the corresponding second line set can be constructed, which is convenient for the subsequent determination of each steel bar line.

[0193] Step S304, determining the steel bar lines corresponding to the respective steel bar annotations according to the first parameters of the respective steel bar lines and the second parameters of the respective steel bar annotations, and generating a corresponding relationship between the steel bar lines and the steel bar annotations.

[0194] In some optional embodiments, step S304 "determine the steel bar lines corresponding to each steel bar annotation according to the first parameters of each steel bar line and the second parameters of each steel bar annotation, and generate the corresponding relationship between the steel bar line and the steel bar annotation" may specifically include steps C1 to C3.

[0195] Step C1, determining the weight between each steel bar line and each steel bar mark according to the first parameter of each steel bar line and the second parameter of each steel bar mark.

[0196] Step C2, retaining effective weights greater than a preset value.

[0197] In this embodiment, the problem of matching steel bar lines and steel bar annotations is abstracted into a bipartite graph model, and the weights between each steel bar line and each steel bar annotation are determined, and the steel bar annotations and steel bar lines are matched based on the weights.

[0198] Figure 8 A bipartite graph showing reinforcement lines and reinforcement labels is shown in Figure 8 As shown in the figure, m steel bar annotations and n steel bar lines are identified from the middle vector drawing, where m and n are both positive integers. The weight w between each steel bar line and each steel bar annotation can be calculated in actual business scenarios; the weight w represents the degree of matching between the steel bar line and the steel bar annotation. The larger the weight, the higher the matching degree. In order to save the subsequent processing operation flow, the weights less than the preset value are filtered out, and only the weights greater than the preset value are retained. This part of the weight is called the effective weight. Figure 8 As shown, the weight between steel bar mark 1 and steel bar line 1 is w1, and the weight between steel bar mark m and steel bar line n is w k .

[0199] Among them, multiple business rules between the first parameter and the second parameter can be formulated according to the business scenarios of the annotation and the steel bar; and different coefficients (0 to 1) are assigned to the business rules, and the sum of the coefficients of all business rules is 1. The business rule can be, for example, the distance between the steel bar line and the steel bar annotation (for example, the directed bounding box of the steel bar annotation), whether the steel bar annotation size corresponds to the actual length of the steel bar line, etc.

[0200] According to the formulated business rules, the business values ​​under each business rule are determined, and each business value is normalized. Finally, the normalized business value and the coefficient of the business rule are weighted and summed to finally obtain the weight between each steel bar line and each steel bar mark.

[0201] Step C3, performing a matching operation on the unmatched steel bar wires until there are no unmatched steel bar wires.

[0202] The "matching operation" in the above step C3 specifically includes steps C31 to C36.

[0203] Step C31, for the unmatched first steel bar line, determine whether there is a valid weight between the first steel bar line and the steel bar mark.

[0204] Step C32, when there is no valid weight between the first steel bar line and any steel bar mark, the first steel bar line is marked as matched, and the matching operation on the first steel bar line is ended.

[0205] Step C33, when there is a valid weight between the first steel bar line and at least one steel bar mark, determine the maximum steel bar mark corresponding to the maximum valid weight.

[0206] Step C34, determining the second reinforcement lines associated with the maximum reinforcement mark, and determining the maximum reinforcement line with the largest effective weight among the second reinforcement lines.

[0207] Step C35, when the maximum reinforcement line is consistent with the first reinforcement line, a corresponding relationship between the first reinforcement line and the maximum reinforcement mark is established, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended.

[0208] Step C36: when the maximum reinforcement line is inconsistent with the first reinforcement line, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended.

[0209] In this embodiment, each steel bar line in the bipartite graph is initially in an unmatched state. For the unmatched steel bar lines, matching operations are performed in sequence and they are marked as matched until there are no unmatched steel bar lines in the bipartite graph, thereby completing the matching between the steel bar lines and the steel bar annotations.

[0210] Specifically, referring to the above steps C31 to C36, Fig. 9 As shown, the steel bar lines in the bipartite graph are traversed, and any unmatched steel bar line is called the first steel bar line. It can be determined whether there is a valid weight between the first steel bar line and the steel bar mark to query whether there is an associated steel bar mark. If not, the matching fails, the first steel bar line is marked as matched, and the matching operation continues for the next steel bar line.

[0211] If there is a valid weight between the first steel bar line and at least one steel bar annotation, the query is successful. At this time, the steel bar annotation corresponding to the maximum valid weight among the steel bar annotations associated with the first steel bar line can be determined, that is, the maximum steel bar annotation. Since there is a situation where a certain steel bar line does not have a steel bar annotation, even if the maximum steel bar annotation corresponding to the steel bar line is found, there may be no corresponding relationship between the two. This embodiment performs a reverse query based on the maximum steel bar annotation, thereby bidirectionally determining whether the first steel bar line and the maximum steel bar annotation match.

[0212] Specifically, based on the bipartite graph, the steel bar line associated with the maximum steel bar annotation is continuously queried. If a steel bar line has a valid weight with the maximum steel bar annotation, it is associated with the maximum steel bar annotation, and the steel bar line is a second steel bar line; further, the second steel bar line with the largest valid weight with the maximum steel bar annotation can be determined among the second steel bar lines, that is, the maximum steel bar line. If the first steel bar line is consistent with the maximum steel bar line, that is, the two are a steel bar line, it can be determined that the first steel bar line is matched with the maximum steel bar annotation, and a corresponding relationship between the two can be established, and the first steel bar line is marked as matched, thereby ending the matching operation of the first steel bar line, and then the matching operation can be performed on other unmatched steel bar lines.

[0213] On the contrary, if the first steel bar line is inconsistent with the maximum steel bar line, it means that the first steel bar line cannot match any steel bar mark, so the first steel bar line is directly marked as matched, and the matching operation of the first steel bar line is ended.

[0214] by Figure 6 and Figure 7 Taking the reinforcement shown in the figure as an example, the reinforcement line corresponding to line ① has a corresponding relationship with the reinforcement marked "37" on the left, the reinforcement line corresponding to line ② has a corresponding relationship with the reinforcement marked "400", and the reinforcement line corresponding to line ③ has a corresponding relationship with the reinforcement marked "37" on the right.

[0215] In this embodiment, by performing a matching operation on each unmatched steel bar line, all steel bar lines can be traversed to avoid omissions; and through bidirectional matching, the corresponding relationship between the steel bar line and the steel bar mark can be determined more accurately.

[0216] Step S305, generating a recognition result of a steel bar vector drawing; the recognition result includes steel bar specification parameters and corresponding relationships.

[0217] In some optional implementations, before generating the recognition result of the steel bar vector drawing, the steel bar length can be verified based on the recognized steel bar mark. Specifically, after step S304 "determining the correspondence between the steel bar line and the steel bar mark", the method further includes steps D1 to D2.

[0218] Step D1, determining the calculated length of the steel bars corresponding to the second line set according to the steel bar markings corresponding to each steel bar line in the second line set.

[0219] Step D2, verifying the steel bar length corresponding to the second line set according to the calculated length.

[0220] In this embodiment, each second line set corresponds to a steel bar, which also corresponds to a corresponding steel bar length; and the steel bar annotation corresponding to each steel bar line in the second line set can indicate the length of the corresponding steel bar line, so based on these steel bar annotations, the length of the steel bar corresponding to the second line set can be calculated, that is, the calculated length. If the calculated length is consistent with the steel bar length corresponding to the second line set, it means that the recognition is correct, that is, it passes the verification; on the contrary, if the calculated length is inconsistent with the steel bar length corresponding to the second line set, it can be determined that one or some parameters have failed to be recognized, and re-recognition or alarm can be issued.

[0221] by Figure 5 Take the wire reinforcement shown in the figure as an example, the length of the reinforcement is 474.0. If the recognition results of the three reinforcement marks of the reinforcement are 37, 400, and 37 respectively, and the sum of the three is 474, which is consistent with the length of the reinforcement, it can be determined that the recognition is accurate. In addition, when checking the length of the stirrups, the length of the bend needs to be considered; and when checking the length of the circular reinforcement, the reinforcement length (i.e. the circumference) needs to be checked based on the marked diameter.

[0222] In this embodiment, a device for identifying a steel bar vector drawing is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0223] This embodiment provides a device for identifying a steel bar vector drawing. Fig.10 As shown, including:

[0224] The first recognition module 1001 is used to recognize the steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of the steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length;

[0225] A drawing generation module 1002 is used to delete the lines related to the steel bar specification parameters in the steel bar vector drawing to generate a target vector drawing to be identified;

[0226] A second recognition module 1003 is used to recognize the steel bar lines and steel bar marks in the target vector drawing, and determine the first parameter of each of the steel bar lines and the second parameter of each of the steel bar marks;

[0227] A matching module 1004, configured to determine the steel bar lines corresponding to the steel bar annotations according to the first parameters of the steel bar lines and the second parameters of the steel bar annotations, and generate a corresponding relationship between the steel bar lines and the steel bar annotations;

[0228] The processing module 1005 is used to generate the recognition result of the steel bar vector drawing; the recognition result includes the steel bar specification parameters and the corresponding relationship.

[0229] In some optional implementations, the first identification module 1001 identifies the steel bar specification parameters in the steel bar vector drawing, including:

[0230] Recognize the lines in the steel bar vector drawing to identify the steel bar number lines and steel bar lead lines;

[0231] Performing text recognition on the numbered area inside the steel bar numbering line to determine the corresponding steel bar number;

[0232] Text recognition is performed on the search area on both sides of the steel bar lead to determine at least one of the steel bar quantity, steel bar grade, steel bar diameter, and steel bar length.

[0233] In some optional implementations, the first recognition module 1001 recognizes the lines in the steel bar vector drawing to identify the steel bar number lines and steel bar leaders, including:

[0234] Identify the lines in the steel bar vector drawing to determine a first line set; the first line set includes a plurality of first lines connected end to end in sequence, the turning angle between two adjacent first lines is less than a preset threshold, and the difference between any two turning angles is less than a preset difference;

[0235] Determine the steel bar numbering line according to the first line set;

[0236] Determine the rebar leader that intersects the rebar numbering line.

[0237] In some optional implementations, the second recognition module 1003 recognizes the steel bar lines and steel bar marks in the target vector drawing, including:

[0238] Performing text recognition processing on the target vector drawing, and determining corresponding steel bar markings according to the text recognition results;

[0239] Deleting the lines related to the steel bar marking in the target vector drawing to generate an intermediate vector drawing to be identified;

[0240] Identify the lines in the intermediate vector drawing to determine a second line set; the second line set includes a plurality of second lines, and any second line has the same endpoint as at least one other second line;

[0241] Each steel bar line of the steel bar is determined according to the second lines in the second line set.

[0242] In some optional implementations, the second recognition module 1003 recognizes the lines in the intermediate vector drawing to determine the second line set, including:

[0243] Identify the lines in the intermediate vector drawing, determine the two endpoints of each line in the intermediate vector drawing, and establish a corresponding relationship between the endpoints and the lines;

[0244] Based on whether there are the same endpoints between the lines, the lines in the intermediate vector drawing are searched to obtain a second line set generated by clustering the continuous lines.

[0245] In some optional implementations, the second recognition module 1003 searches for lines in the intermediate vector drawing based on whether there are the same endpoints between the lines to obtain a second line set generated by clustering continuous lines, including:

[0246] If there is an initial line in the intermediate vector drawing that has not been visited, add the initial line to the corresponding second line set, and mark the initial line as visited;

[0247] Starting from the first endpoint of the initial line, performing at least one level of first line search processing until there are no lines with common endpoints and not visited;

[0248] Starting from the second endpoint of the initial line, performing at least one level of second line search processing until there are no lines with common endpoints and not visited;

[0249] The first line search process of the current level includes:

[0250] According to the starting endpoint of the first target line, a first associated line set for recording the first associated line is determined; one of the endpoints of the first associated line is the same as the starting endpoint of the first target line; the starting endpoint of the first target line corresponding to the first level is the first endpoint of the initial line;

[0251] In the case that there is a first associated line that has not been visited in the first associated line set, adding the first associated line to the second line set corresponding to the initial line, and marking the first associated line as visited;

[0252] Using the other endpoint of the first associated line as the starting endpoint of the first target line corresponding to the next level, and performing the first line search process of the next level;

[0253] When there is no unvisited first associated line in the first associated line set, ending the first line search process at the current level;

[0254] And, the second line search process of the current level includes:

[0255] According to the starting endpoint of the second target line, a second associated line set for recording the second associated line is determined; one of the endpoints of the second associated line is the same as the starting endpoint of the second target line; the starting endpoint of the second target line corresponding to the first level is the second endpoint of the initial line;

[0256] If there is a second associated line that has not been visited in the second associated line set, add the second associated line to the second line set corresponding to the initial line, and mark the second associated line as visited;

[0257] Using the other endpoint of the second associated line as the starting endpoint of the second target line corresponding to the next level, and performing the second line search process of the next level;

[0258] When there is no unvisited second associated line in the second associated line set, the second line search process of the current level is terminated.

[0259] In some optional implementations, after generating the corresponding relationship between the reinforcement line and the reinforcement mark, the processing module 1005 is further used to:

[0260] Determine the calculated length of the steel bars corresponding to the second set of lines according to the steel bar annotations corresponding to each steel bar line in the second set of lines;

[0261] The steel bar length corresponding to the second line set is verified according to the calculated length.

[0262] In some optional implementations, the matching module 1004 determines the steel bar lines corresponding to the respective steel bar annotations according to the first parameters of the respective steel bar lines and the second parameters of the respective steel bar annotations, and generates a corresponding relationship between the steel bar lines and the steel bar annotations, including:

[0263] Determining a weight between each of the steel bar lines and each of the steel bar marks according to the first parameter of each of the steel bar lines and the second parameter of each of the steel bar marks;

[0264] Keep the effective weights greater than the preset value;

[0265] Performing a matching operation on the unmatched reinforcement wires until there are no unmatched reinforcement wires;

[0266] The matching operation includes:

[0267] For the first unmatched steel bar line, determining whether there is a valid weight between the first steel bar line and the steel bar mark;

[0268] In the case that there is no valid weight between the first steel bar line and any steel bar mark, marking the first steel bar line as matched, and ending the matching operation on the first steel bar line;

[0269] In the case where there is a valid weight between the first reinforcement line and at least one reinforcement mark, determining a maximum reinforcement mark corresponding to a maximum valid weight;

[0270] Determine a second reinforcement line associated with the maximum reinforcement mark, and determine a maximum reinforcement line having the largest effective weight among the second reinforcement lines;

[0271] When the maximum reinforcement line is consistent with the first reinforcement line, a corresponding relationship between the first reinforcement line and the maximum reinforcement mark is established, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended;

[0272] In the case that the maximum reinforcement line is inconsistent with the first reinforcement line, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended.

[0273] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0274] The identification device of the steel bar vector drawing in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0275] The embodiment of the present invention also provides a computer device having the above Fig.10 The identification device of the steel bar vector drawing shown.

[0276] See also Fig.11 , Fig.11 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.11As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11 A processor 10 is taken as an example.

[0277] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0278] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0279] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0280] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0281] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0282] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0283] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0284] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations should all be included in the protection scope of the present invention.

Claims

1. A method for identifying a steel bar vector drawing, characterized in that: The method comprises: Identify steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length; Deleting the lines related to the steel bar specification parameters in the steel bar vector drawing to generate a target vector drawing to be identified; Identify the steel bar lines and steel bar annotations in the target vector drawing, and determine the first parameter of each of the steel bar lines and the second parameter of each of the steel bar annotations; According to the first parameters of each of the steel bar lines and the second parameters of each of the steel bar annotations, determine the steel bar lines corresponding to each of the steel bar annotations, and generate a corresponding relationship between the steel bar lines and the steel bar annotations; Generate a recognition result of the steel bar vector drawing; the recognition result includes the steel bar specification parameters and the corresponding relationship.

2. The method according to claim 1, characterized in that The identification of steel bar specification parameters in the steel bar vector drawing includes: Recognize the lines in the steel bar vector drawing to identify the steel bar number lines and steel bar lead lines; Performing text recognition on the numbered area inside the steel bar numbering line to determine the corresponding steel bar number; Text recognition is performed on the search area on both sides of the steel bar lead to determine at least one of the steel bar quantity, steel bar grade, steel bar diameter, and steel bar length.

3. The method according to claim 2, characterized in that The identifying of the lines in the steel bar vector drawing to identify the steel bar number lines and steel bar lead lines includes: Identify the lines in the steel bar vector drawing to determine a first line set; the first line set includes a plurality of first lines that are sequentially connected end to end, the turning angle between two adjacent first lines is less than a preset threshold, and the difference between any two turning angles is less than a preset difference; Determine the steel bar numbering line according to the first line set; Determine the rebar leader that intersects the rebar numbering line.

4. The method according to claim 1, characterized in that The identifying of the steel bar lines and steel bar markings in the target vector drawing includes: Performing text recognition processing on the target vector drawing, and determining corresponding steel bar markings according to the text recognition results; Deleting the lines related to the steel bar marking in the target vector drawing to generate an intermediate vector drawing to be identified; Identify the lines in the intermediate vector drawing to determine a second line set; the second line set includes a plurality of second lines, and any second line has the same endpoint as at least one other second line; Each steel bar line of the steel bar is determined according to the second lines in the second line set.

5. The method according to claim 4, characterized in that The identifying of the lines in the intermediate vector drawing to determine the second line set includes: Identify the lines in the intermediate vector drawing, determine the two endpoints of each line in the intermediate vector drawing, and establish a corresponding relationship between the endpoints and the lines; Based on whether there are the same endpoints between the lines, the lines in the intermediate vector drawing are searched to obtain a second line set generated by clustering the continuous lines.

6. The method according to claim 5, characterized in that The step of searching the lines in the intermediate vector drawing based on whether the lines have the same endpoints to obtain a second line set generated by clustering the continuous lines includes: If there is an initial line in the intermediate vector drawing that has not been visited, add the initial line to the corresponding second line set, and mark the initial line as visited; Starting from the first endpoint of the initial line, performing at least one level of first line search processing until there are no lines with common endpoints and not visited; Starting from the second endpoint of the initial line, performing at least one level of second line search processing until there are no lines with common endpoints and not visited; The first line search process of the current level includes: According to the starting endpoint of the first target line, a first associated line set for recording the first associated line is determined; one of the endpoints of the first associated line is the same as the starting endpoint of the first target line; the starting endpoint of the first target line corresponding to the first level is the first endpoint of the initial line; In the case that there is a first associated line that has not been visited in the first associated line set, adding the first associated line to the second line set corresponding to the initial line, and marking the first associated line as visited; Using the other endpoint of the first associated line as the starting endpoint of the first target line corresponding to the next level, and performing the first line search process of the next level; When there is no unvisited first associated line in the first associated line set, ending the first line search process at the current level; And, the second line search process of the current level includes: According to the starting endpoint of the second target line, a second associated line set for recording the second associated line is determined; one of the endpoints of the second associated line is the same as the starting endpoint of the second target line; the starting endpoint of the second target line corresponding to the first level is the second endpoint of the initial line; If there is a second associated line that has not been visited in the second associated line set, add the second associated line to the second line set corresponding to the initial line, and mark the second associated line as visited; Using the other endpoint of the second associated line as the starting endpoint of the second target line corresponding to the next level, and performing the second line search process of the next level; When there is no unvisited second associated line in the second associated line set, the second line search process of the current level is terminated.

7. The method according to claim 4, characterized in that After generating the corresponding relationship between the steel bar line and the steel bar mark, the method further includes: Determine the calculated length of the steel bars corresponding to the second set of lines according to the steel bar annotations corresponding to each steel bar line in the second set of lines; The steel bar length corresponding to the second line set is verified according to the calculated length.

8. The method according to claim 1, characterized in that: The step of determining the steel bar lines corresponding to the steel bar annotations according to the first parameters of the steel bar lines and the second parameters of the steel bar annotations, and generating the corresponding relationship between the steel bar lines and the steel bar annotations comprises: Determining a weight between each of the steel bar lines and each of the steel bar marks according to the first parameter of each of the steel bar lines and the second parameter of each of the steel bar marks; Keep the effective weights greater than the preset value; Performing a matching operation on the unmatched reinforcement wires until there are no unmatched reinforcement wires; The matching operation includes: For the first unmatched steel bar line, determining whether there is a valid weight between the first steel bar line and the steel bar mark; In the case that there is no valid weight between the first steel bar line and any steel bar mark, marking the first steel bar line as matched, and ending the matching operation on the first steel bar line; In the case where there is a valid weight between the first reinforcement line and at least one reinforcement mark, determining a maximum reinforcement mark corresponding to a maximum valid weight; Determine a second reinforcement line associated with the maximum reinforcement mark, and determine a maximum reinforcement line having the largest effective weight among the second reinforcement lines; When the maximum reinforcement line is consistent with the first reinforcement line, a corresponding relationship between the first reinforcement line and the maximum reinforcement mark is established, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended; In the case that the maximum reinforcement line is inconsistent with the first reinforcement line, the first reinforcement line is marked as matched, and the matching operation on the first reinforcement line is ended.

9. A device for identifying steel bar vector drawings, characterized in that: The device comprises: The first recognition module is used to recognize the steel bar specification parameters in the steel bar vector drawing; the steel bar specification parameters include at least one of the steel bar number, steel bar quantity, steel bar grade, steel bar diameter, and steel bar length; A drawing generation module, used for deleting the lines related to the steel bar specification parameters in the steel bar vector drawing, and generating a target vector drawing to be identified; A second recognition module is used to recognize the steel bar lines and steel bar marks in the target vector drawing, and determine the first parameter of each of the steel bar lines and the second parameter of each of the steel bar marks; A matching module, for determining the steel bar lines corresponding to the respective steel bar annotations according to the first parameters of the respective steel bar lines and the second parameters of the respective steel bar annotations, and generating a corresponding relationship between the steel bar lines and the steel bar annotations; A processing module is used to generate a recognition result of the steel bar vector drawing; the recognition result includes the steel bar specification parameters and the corresponding relationship.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for identifying steel bar vector drawings according to any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for identifying a steel bar vector drawing according to any one of claims 1 to 8.