A method for automatically identifying the types of door and window architectural drawings and doors and windows

By identifying and splitting curves and text in door and window table drawings, door and window information is automatically extracted, which solves the problem of complexity of door and window modeling, improves the efficiency and accuracy of automatic modeling, and is suitable for a variety of architectural drawings.

CN113901540BActive Publication Date: 2024-09-27CHANGSHA FANYI PARAMETER INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111047919.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2024-09-27
Estimated Expiration
2041-09-08

AI Technical Summary

Technical Problem

In BIM technology, the modeling process of doors and windows is complicated. In particular, it is difficult to accurately identify door and window information from two-dimensional architectural drawings, which affects the efficiency and accuracy of automatic modeling.

Method used

By identifying curves and text in door and window table drawings, automatically identify door and window types and extract detailed information, including double-line titles and plain text cells, split door and window element collections, match door and window numbers, and extract door and window outlines and outlines. Simplify the 3D modeling process of doors and windows.

Benefits of technology

It improves the automation efficiency and accuracy of door and window modeling, reduces interference information, simplifies information extraction, is suitable for most architectural drawings, and improves recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901540B
    Figure CN113901540B
Patent Text Reader

Abstract

The present invention discloses a method for automatically identifying the type of a door and window table architectural drawing, including S2.1, finding a double-line title; S2.2, finding a pure text cell; S2.3, judging the type of the door and window table according to the number of double-line titles and pure text cells. The present invention also discloses a method for automatically identifying doors and windows in a door and window table architectural drawing, including: S1, inputting a door and window table drawing; S2, identifying the type of the input door and window table; S3, splitting the tabular door and window table into a set of graphic elements of a single door and window; S4, splitting the block-type door and window table into a set of graphic elements of a single door and window; S5, S5, matching the graphic element set of the door and window with the door and window number. The present invention lays a foundation for automatic modeling of door and window openings and doors and windows in wall modeling, which is conducive to reducing the difficulty of automatic modeling of walls, doors and windows, and is conducive to improving the efficiency of automatic modeling of walls, doors and windows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of architectural drawing object recognition, and in particular to a method for automatically recognizing the types of door and window table architectural drawings and doors and windows. Background Art

[0002] The core of BIM (Building Information Modeling) technology is to establish a virtual three-dimensional model of the building project and use digital technology to provide this model with a complete and actual building project information database. This information database not only contains geometric information, professional attributes and status information describing the building components, but also contains the status information of non-component objects (such as space and motion behavior). With the help of this three-dimensional model containing building project information, the degree of information integration of the building project has been greatly improved, thus providing a platform for engineering information exchange and sharing for the relevant stakeholders of the building project. With the rapid development of urban construction and computer technology, the application of BIM technology has become more and more extensive. Generally, it reads two-dimensional building drawings, uses computer algorithms to identify graphics elements, obtains two-dimensional data of building objects, and outputs them to the three-dimensional engine to produce a three-dimensional model of the building. However, how to accurately identify graphics elements and obtain two-dimensional data has always been a difficult problem to overcome. Among them, the modeling of doors and windows is a very important link. At present, it is mostly achieved by inserting door and window families. Generally, information is identified and extracted from the plane construction drawing. After the wall is built in the three-dimensional software, the door and window family is inserted. The door and window parts in the plane construction drawing are as follows: Figure 1 As shown, the position, number and width of doors and windows can be known, but the modeling process is too complicated, which affects the efficiency of automatic modeling. The plan construction drawing includes too much information and too much interference information, which is prone to errors. In addition, the height, installation height and details of doors and windows are difficult to extract based on the plan construction drawing alone. Information needs to be extracted from other drawings, which increases the difficulty of modeling. Summary of the invention

[0003] 1. Technical issues to be resolved

[0004] Based on the above problems, the present invention provides a method for automatically identifying the types of door and window table architectural drawings and doors and windows, so as to solve the problems of complicated door and window openings and automatic door and window modeling methods in wall modeling.

[0005] (II) Technical solution

[0006] Based on the above technical problems, the present invention provides a method for automatically identifying the type of door and window table architectural drawings, comprising the following steps:

[0007] S2.1. Find the double-line title based on the curves and text obtained from the door and window table drawing:

[0008] S2.1.1. Look for double lines in the curves of the door and window table drawings;

[0009] S2.1.2, searching for an underlined double line in the double lines;

[0010] S2.1.3. Exclude the words on the underlined double lines as words describing the ratio, and the remaining words on the underlined double lines are double-line titles, which are included in the double-line title list;

[0011] S2.1.4, determine whether at least 1 / 3 of the double-line titles in the double-line title list conform to the door and window numbering rules. If so, all double-line titles in the double-line title list are door and window numbers. If not, all double-line titles are removed from the double-line title list.

[0012] S2.2. Find the text-only cells based on the curves and text obtained from the door and window table drawing:

[0013] S2.2.1. Find cells through the text on the door and window table drawing: draw rays to the left, right, upward and downward through the center point of the text to determine whether they can intersect with the curves in the door and window table drawing. If so, the rectangle formed by the nearest intersecting curves is the cell. The coordinate range of the cell is determined according to the coordinate value of the nearest intersection point. The curves on which the four sides of the cell are located are table lines. Otherwise, they cannot form a cell.

[0014] S2.2.2. Find whether the cell contains a curve. If so, it is not a pure text cell. If not, it is a pure text cell. Find the string formed by all the text in the pure text cell and add it to the pure text cell list.

[0015] S2.3. Determine the type of door and window table: Determine whether the following conditions are met at the same time: the number of double-line titles is less than threshold one, and the number of plain text cells is greater than or equal to threshold two. If so, it is a tabular door and window table. Otherwise, determine whether the following conditions are met at the same time: the number of double-line titles is greater than or equal to threshold one, and the number of plain text cells is less than threshold two. If so, it is a block-type door and window table. Otherwise, determine whether the following conditions are met at the same time: the number of double-line titles is greater than or equal to threshold one, and the number of plain text cells is greater than or equal to threshold two. If not, it is neither a tabular door and window table nor a block-type door and window table. If so, determine whether the double-line title is in a certain cell. If so, it is a tabular door and window table. Otherwise, it is neither a tabular door and window table nor a block-type door and window table.

[0016] Furthermore, the double-line search criteria in step S2.1.1 are: two horizontal lines of equal length, completely parallel, with a spacing less than a spacing threshold, and both ends suspended.

[0017] Furthermore, the specific method of step S2.1.2 is: within the text threshold range above the double line, find out whether there is text, if so, underline the double line, if not, determine the next double line.

[0018] Furthermore, the specific method of step S2.1.3 is: determine whether the text conforms to the description rule of the proportion, if so, it is the text describing the proportion, if not, the text on the underlined double line is a double-line title, included in the double-line title list, and then determine the next underlined double line; the description rule of the proportion is: including the format of "number: number".

[0019] Furthermore, in step S2.1.4, the rule for door and window numbering is: door and window numbering includes but is not limited to letters and numbers.

[0020] Furthermore, in step S2.1.1, the spacing threshold is set to a character height.

[0021] Furthermore, in step S2.1.2, the text threshold is set to 1.5 times the character height.

[0022] The present invention also discloses a method for automatically identifying doors and windows in door and window table architectural drawings, comprising the following steps:

[0023] S1. Input the door and window table drawing to obtain all the contents of the door and window table drawing, including curves, text, dimension marking and elevation marking;

[0024] S2, identifying the type of the input door and window table: if it is a tabular door and window table, proceed to step S3; if it is a block door and window table, proceed to step S4;

[0025] S3, splitting the tabular door and window table into a set of graphic elements of a single door and window, and proceeding to step S5;

[0026] S4, split the block-type door and window table into a set of graphic elements of a single door and window, and proceed to step S5;

[0027] S4.1. Find the curve primitives and bounding boxes of a single door or window, and group the curve primitives of the single door or window into a primitive set of the single door or window;

[0028] S4.1.1. Sort the unidentified curves from longest to shortest;

[0029] S4.1.2. Take the longest curve and the curves that intersect or overlap with the longest curve to form a curve group, and find the bounding box of the curve group;

[0030] S4.1.3, expand the bounding box by a fixed threshold width;

[0031] S4.1.4, determine whether there is a new curve intersecting with the expanded bounding box. If so, add the new curve in the expanded bounding box and the new curve intersecting with the expanded bounding box to the curve group, obtain the bounding box of the updated curve group, and return to step S4.1.3. Otherwise, the curve in the curve group is a curve primitive of a single door or window, which is set as recognized, and the bounding box of the curve group is the expanded bounding box of the door or window.

[0032] S4.1.5. Determine whether there are any unrecognized curves. If so, return to step S4.1.2. Otherwise, obtain the curve primitives and bounding boxes of all split single doors and windows, and group the curve primitives of the single doors and windows into the primitive set of the doors and windows.

[0033] S4.2. Find the text primitives of a single door or window: traverse all unrecognized texts, find the bounding box closest to the text, and group the text into the primitive set of the door or window;

[0034] S4.3. Find the dimension annotation primitive of a single door or window: traverse all dimension annotations, and group the dimension annotations with overlapping or adjacent dimension boundaries into a dimension annotation group; traverse all dimension annotation groups, take the midpoints of the dimension lines of the dimension annotations in the group in turn, and make rays along the dimension boundary direction to intersect with the bounding box of a single door or window, find the nearest bounding box that intersects, and group all the dimension annotations in the dimension annotation group into the primitive set of the door or window;

[0035] S5. Match the door and window graphic set with the door and window numbers.

[0036] Furthermore, the step S3 includes the following steps:

[0037] S3.1, identify the door and window cells: take any unidentified curve, and make rays to the left, right, upward, and downward through the midpoint of the unidentified curve to intersect with the table line. The cell formed by the nearest intersecting table line is the door and window cell, and the coordinate range of the door and window cell is determined according to the coordinates of the nearest intersection point;

[0038] S3.2. Construct a primitive set of a single door and window based on each door and window cell: Find all curves, texts and dimension annotations in each door and window cell to form a primitive set of a single door and window, and set them as recognized to obtain the primitive sets of all split single doors and windows.

[0039] Furthermore, the step S5 includes the following steps:

[0040] S5.1. Sort all door and window primitive sets from high to low;

[0041] S5.2, take the highest / lowest door / window primitive set, first search upward / downward for the nearest text that meets the door / window numbering rules, if not found, then search downward / upward for the nearest text that meets the door / window numbering rules, the found text is the door / window number corresponding to the door / window primitive set;

[0042] S5.3. Determine whether there is a door and window primitive set that does not match the door and window number. If so, return to step S5.2. Otherwise, the matching ends and all door and window primitive sets are matched with the found door and window numbers.

[0043] Furthermore, after step S5, the automatic identification method for doors and windows further includes:

[0044] S6, extracting the door and window outer contour lines and door and window outline diagrams from each door and window graphic element set;

[0045] S6.1. Place elevation lines, annotation lines, dimensioning and dangling lines into elevation line sets, annotation line sets, dimensioning sets and dangling line sets respectively. The dangling lines are line segments with one or both ends suspended. Dangling means no overlap or intersection.

[0046] S6.2. Find the outer contour of doors and windows:

[0047] S6.2.1. Sort the curves in the primitive set of a single door and window from long to short, take the longest curve as curve one, start from the starting point of curve one, find the longest curve among the curves overlapping curve one as curve two; start from the end point of curve two far away from the starting point of curve one, find the longest curve among the curves overlapping curve two as curve three, ..., start from the end point of curve n far away from curve n-1, find the longest curve among the curves overlapping curve n as curve n+1, until no new curve is found;

[0048] S6.2.2, determine whether the found curve forms a closed figure, if so, the curve forming the closed figure is the outer contour line of the door or window, otherwise it is not a door or window;

[0049] S6.3. The lines within the outer contour lines of the doors and windows are the modeling lines of the doors and windows. The outer contour lines and the modeling lines of the doors and windows together constitute the outline drawing of the doors and windows.

[0050] Furthermore, the step S6 further includes:

[0051] S6.4, Identification of turning lines of doors and windows and segmentation of doors and windows:

[0052] S6.4.1. Determine whether there is at least one door or window graphic element set with a vertical curve penetrating the corresponding door or window outer contour line. If so, proceed to step S6.4.2; otherwise, proceed to step S6.4.3.

[0053] S6.4.2, determine in turn whether there is a vertical curve penetrating the corresponding outer contour line in the primitive set of each door and window. If so, the turning line is the vertical straight line, and the process goes to step S6.4.4. Otherwise, there is no turning line, and S6.4.2 is repeated to determine the next door and window;

[0054] S6.4.3, determine in turn whether the largest horizontal dimension in the graphic element set of each door and window has a parallel horizontal dimension. If so, the turning line is a curve passing through the common boundary of the largest horizontal dimension and its parallel horizontal dimension, and go to step S6.4.4. Otherwise, there is no turning line, and repeat S6.4.3 to determine the next door and window;

[0055] S6.4.4. Divide the corresponding outer contour lines of doors and windows along the turning lines.

[0056] (III) Beneficial effects

[0057] The above technical solution of the present invention has the following advantages:

[0058] (1) The present invention directly identifies and extracts the two-dimensional plan view of doors and windows from the door and window table drawings, obtains the door and window outline drawings and the door and window outer outline drawings for subsequent three-dimensional modeling, simplifies the door and window opening and door and window modeling methods in wall modeling, and is conducive to improving the efficiency of automatic modeling. The door and window graphics in the door and window table drawings are concentrated, and the detailed information of the doors and windows included is richer, which is conducive to batch, automatic and efficient processing. There is no need to extract information from multiple drawings, which simplifies information extraction, reduces the amount of calculation, improves modeling efficiency, and has less interference information, thereby improving recognition accuracy;

[0059] (2) After distinguishing the characteristics of different types of door and window drawings, the present invention identifies and extracts the characteristic data of each door and window graphic, providing support for automatic modeling, so that it can be applied to most architectural drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0061] Figure 1 It is a partial schematic diagram of doors and windows of the plan construction diagram of the present invention;

[0062] Figure 2 A flow chart of a method for automatically identifying doors and windows in door and window table architectural drawings according to an embodiment of the present invention;

[0063] Figure 3 A flow chart of a method for automatically identifying the type of door and window table architectural drawings according to an embodiment of the present invention;

[0064] Figure 4It is a partial schematic diagram of the block-type door and window diagram of the present invention;

[0065] Figure 5 It is a partial schematic diagram of the tabular door and window table drawing of the present invention;

[0066] Figure 6 It is a schematic diagram of a block-type door and window table drawing inputted in an embodiment of the present invention;

[0067] Figure 7 The outputted outer contour line diagram of the door and window of the embodiment of the present invention;

[0068] Figure 8 The output door and window outline diagram of the embodiment of the present invention;

[0069] Fig. 9 Schematic diagram of a turning door and window according to an embodiment of the present invention. DETAILED DESCRIPTION

[0070] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0071] The door and window table drawings include two-dimensional plan views of doors and windows, and detailed information such as the width, height, installation height, type, installation method, direction line, material, etc. of the doors and windows can be obtained. By identifying and extracting the two-dimensional plan views of doors and windows from the door and window table drawings, the existing three-dimensional modeling method can be simplified. The door and window table includes a tabular door and window table and a block door and window table. The present invention is an automatic recognition method for doors and windows in door and window table architectural drawings, such as Figure 2 As shown, the following steps are included:

[0072] S1. Input the door and window table drawing to obtain all the contents of the door and window table drawing, including curves, text, dimension marking and elevation marking, etc.;

[0073] Among them, the symbol recognition of elevation marking is a prior art and has been disclosed in the patent application number 201910252414.6. Other methods can also be used to identify and find the elevation marking so as to exclude the curves and text of the elevation marking in subsequent calculations.

[0074] S2. Identify the type of the input door and window table as a tabular door and window table or a block door and window table: Door and window table drawings generally have two types: tabular door and window table and block door and window table. Since it is unknown whether the input door and window table drawing is a tabular door and window table or a block door and window table, the following method can be used: Figure 3 The automatic identification method of the type of door and window table architectural drawing shown in the figure identifies the type of the input door and window table. Other methods can also be used to identify the type of the input door and window table, such as Figure 3 The automatic identification method of the type of door and window table architectural drawing shown is as follows:

[0075] S2.1. Find the double-line title based on the curves and text obtained from the door and window table drawing: the double-line title is the text with double underline below, such as Figure 4 As shown, first find the double lines, then identify the underlined double lines with text, and then exclude the text describing the proportion that also has underlined double lines.

[0076] S2.1.1. Find double lines in the curves of the door and window table drawings: find two horizontal lines of equal length, completely parallel, with a spacing less than the spacing threshold and both ends suspended to obtain double lines; the spacing threshold is generally set to one character height;

[0077] S2.1.2. Finding underlined double lines in double lines: Find whether there is text within the text threshold range above the double lines. If there is, it is an underlined double line. If not, determine the next double line. The text threshold is generally set to 1.5 times the character height.

[0078] S2.1.3, exclude the text on the underlined double line from the text describing the proportion, and the remaining text on the underlined double line is the double-line title, which is included in the double-line title list: determine whether the text meets the description rule of the proportion, if so, it is the text describing the proportion, if not, the text on the underlined double line is the double-line title, which is included in the double-line title list, and then determine the next underlined double line;

[0079] S2.1.4, determine whether at least 1 / 3 of the double-line titles in the double-line title list meet the door and window numbering rules. If so, the double-line titles in the double-line title list are door and window numbers. If not, all double-line titles are removed from the double-line title list;

[0080] Generally, as long as some of the underlined double-lined characters meet the door and window numbering rules, it can be determined that all the underlined double-lined characters are door and window numbers. Even if some of them are not door and window numbers, on the one hand, step S2.3 will set a threshold when judging the door and window table type, which will not affect the door and window table type judgment result. On the other hand, it will not match the door and window graphics in the matching of door and window numbers in the following text. 1 / 3 can be increased or decreased based on experience. The ratio includes the format of "number: number"; the door and window numbers include but are not limited to letters and numbers. Generally, the door number includes the letter M, and the window number includes the letter C, such as Figure 4 In the code, C0917 indicates the window number. Letters other than M and C are generally used to describe the type of doors and windows. Numbers generally indicate the size of doors and windows, such as Figure 1 C1015, HM B1021;

[0081] S2.2. Find the text-only cells based on the curves and text obtained from the door and window table drawing:

[0082] S2.2.1. Find cells through the text on the door and window table drawing: draw rays to the left, right, upward and downward through the center point of the text to determine whether they can intersect with the curves in the door and window table drawing. If so, the rectangle formed by the nearest intersecting curves is the cell. The coordinate range of the cell is determined according to the coordinate value of the nearest intersection point. The curves on which the four sides of the cell are located are table lines. Otherwise, they cannot form a cell.

[0083] If it is a block-type door and window table, only the upward and downward rays made by the text have intersections with the curves in the drawing, and the left and right rays do not have intersections with the curves in the drawing; if it is a table-type door and window table, the left, right, upward, and downward rays made by the text have intersections with the curves in the drawing, and the nearest intersection is on the table line, that is, the rectangle formed by the nearest intersecting curves is a cell. If the coordinates of the intersections are (x 左 ,y 左 ), (x 右 ,y 右 )(x 上 ,y 上 )(x 下 ,y 下 ), then the vertex of the cell is (x 左 ,y 上 ), (x 左 ,y 下 ), (x 右 ,y 上 ), (x 右 ,y 上 ).

[0084] S2.2.2. Find whether the cell range contains a curve. If so, it is not a pure text cell. If not, it is a pure text cell. Find the string formed by all the text in the pure text cell and include it in the pure text cell list.

[0085] S2.3, determine whether the following conditions are met at the same time: the number of double-line titles is less than threshold one, and the number of pure text cells is greater than or equal to threshold two. If so, it is a tabular door and window table, and the process goes to step S3. Otherwise, determine whether the following conditions are met at the same time: the number of double-line titles is greater than or equal to threshold one, and the number of pure text cells is less than threshold two. If so, it is a block-type door and window table, and the process goes to step S4. Otherwise, determine whether the following conditions are met at the same time: the number of double-line titles is greater than or equal to threshold one, and the number of pure text cells is greater than or equal to threshold two. If not, it is neither a tabular door and window table nor a block-type door and window table. If so, determine whether the double-line title is in a cell. If so, it is a tabular door and window table, but the double-line title is placed in the cell. The process goes to step S3. Otherwise, it is neither a tabular door and window table nor a block-type door and window table.

[0086] If the door and window table is a block door and window table, such as Figure 4 As shown, it is usually marked with double underscores under the door and window numbers. If the door and window table is a tabular door and window table, such as Figure 5 As shown, the door and window numbers are usually marked in plain text cells, but there are also cases where the door and window numbers in the tabular door and window table are also marked with double underlines; since there are dozens of door and window samples in general projects, the number of double-line titles and plain text cells is generally dozens. Here, threshold one and threshold two are both set to 5, and threshold one and threshold two can be manually adjusted up or down based on experience.

[0087] At this point, the elevation annotations, scales, double-line titles, and table lines have been identified, and subsequent steps S3 and S4 split the unidentified curves, text, and annotations into a collection of graphics elements for individual doors and windows.

[0088] S3, split the tabular door and window table into a set of graphic elements of a single door and window: first find the door and window cell, and construct a set of graphic elements of a single door and window from the objects in the door and window cell;

[0089] S3.1, identify the door and window cells: take any unidentified curve, and make rays to the left, right, upward, and downward through the midpoint of the unidentified curve to intersect with the table line. The cell formed by the nearest intersecting table line is the door and window cell, and the coordinate range of the door and window cell is determined according to the coordinates of the nearest intersection point;

[0090] Since the table lines have been identified through S2.2.1, the unidentified curves have excluded the table lines and double lines. This step only requires that the ray made based on the unidentified curve intersect with the nearest table line to determine that the cell is a door and window cell. The range size of the door and window cell is determined in the same way as the range size of the pure text cell.

[0091] S3.2, constructing a primitive set of a single door and window according to each door and window cell: searching for all objects such as curves, texts, and dimension annotations in each door and window cell to form a primitive set of a single door and window, and setting these objects as recognized, obtaining a primitive set of all split single doors and windows, and proceeding to step S5;

[0092] S4. Split the block-type door and window table into a set of graphics elements of a single door and window: The block-type door and window table does not have door and window cells to divide the area, so first determine the curve of each door and window graphic, and then determine the text and dimension annotation corresponding to the door and window graphic according to the curve of the door and window graphic; The curve of the door and window graphic is determined by the bounding box of the curve group: construct the bounding box of the curve group, expand the bounding box, add the new curves that are not added to the curve group and intersect with the bounding box after expansion to the curve group for update, construct a new bounding box, expand the bounding box, and repeat this cycle until no new curve is added to the curve group, which means that there are no curves related to the initial curve nearby, that is, the curve recognition of a door and window graphic is completed, and then the unrecognized curves are re-extracted to identify the curve of the next door and window graphic; the longest curve among the unrecognized curves is used as the initial curve and the cycle is repeated until there are no unrecognized curves; the details are as follows:

[0093] S4.1. Find the curve primitives and bounding boxes of a single door or window, and group the curve primitives of the single door or window into a primitive set of the single door or window;

[0094] S4.1.1. Sort the unidentified curves from longest to shortest;

[0095] S4.1.2. Take the longest curve and the curves that intersect or overlap with the longest curve to form a curve group, and find the bounding box of the curve group;

[0096] S4.1.3, expand the bounding box to a fixed threshold width, the threshold width is set manually, and is generally set to 100 mm;

[0097] S4.1.4, determine whether there is a new curve that intersects with the expanded bounding box. If so, add the new curve in the expanded bounding box and the new curve that intersects with the expanded bounding box to the curve group, obtain the bounding box of the updated curve group, and return to step S4.1.3. Otherwise, the curve in the curve group is a curve primitive of a single door or window, which is grouped into the primitive set of the door or window, and the curve in the curve group is set as recognized, and the bounding box of the curve group is the bounding box of the door or window graphic after expansion.

[0098] The curves in the expanded bounding box and the curves intersecting with the expanded bounding box include the curves already in the original curve group and the new curves not in the original curve group. The curve group can be updated by adding new curves. When there are no new curves intersecting with the expanded bounding box, no new curves are added, which means that the curves of the single door and window are already in the bounding box. At this time, the curves in the curve group are the curve primitives of the single door and window.

[0099] S4.1.5. Determine whether there are any unrecognized curves. If so, return to step S4.2. Otherwise, obtain the curve primitives and bounding boxes of all split single doors and windows, and group the curve primitives of the single doors and windows into the primitive set of the doors and windows.

[0100] S4.2. Find the text primitive of a single door or window: traverse all unrecognized text, find the bounding box closest to the text, and group the text into the primitive set of the door or window corresponding to the nearest bounding box;

[0101] S4.3. Find the dimension annotation primitive of a single door or window: traverse all dimension annotations, and group the dimension annotations with overlapping or adjacent dimension boundaries into a dimension annotation group; traverse all dimension annotation groups, take the midpoints of the dimension lines of the dimension annotations in the group in turn, and make rays along the dimension boundary direction to intersect with the bounding box of a single door or window, find the nearest bounding box that intersects, and group all the dimension annotations in the dimension annotation group into the primitive set of the door or window corresponding to the nearest bounding box;

[0102] The dimension boundaries are two short lines at both ends of the dimension line with dimension text. The direction of the dimension boundary is the direction from the intersection of the dimension line and the dimension boundary to the annotation point. The dimension annotation above the door and window graphics points downward, the dimension annotation below points upward, the dimension annotation on the left points to the right, and the dimension annotation on the right points to the left, all pointing to the door and window graphics to which they belong. Therefore, a ray is drawn along the direction of the dimension boundary to intersect with the bounding box of a single door and window. The nearest door and window bounding box that is found must be the door and window graphics marked by the dimension annotation.

[0103] S5, matching the graphic element set of a single door and window with the door and window number;

[0104] After splitting the tabular door and window table and the block door and window table into the graphic element sets of individual doors and windows, it is also necessary to match the graphic element sets of individual doors and windows with the door and window numbers so as to extract the door and window information in the door and window table respectively.

[0105] S5.1. Sort all door and window primitive sets from high to low;

[0106] S5.2, take the highest door and window primitive set, first look for the nearest text that meets the door and window numbering rules upwards, if not found, then look for the nearest text that meets the door and window numbering rules downwards, the found text is the door and window number corresponding to the door and window primitive set;

[0107] The door and window numbers are generally located above or below the door and window graphic element set. Therefore, the step may also be: take the lowest door and window graphic element set, first look downward for the nearest text that meets the door and window numbering rules, if not found, then look upward for the nearest text that meets the door and window numbering rules, the found text is the door and window number corresponding to the door and window graphic element set;

[0108] S5.3. Determine whether there is a door and window primitive set that does not match the door and window number. If so, return to step S5.2. Otherwise, the matching ends and all door and window primitive sets are matched with the found door and window numbers.

[0109] The matching method of the above-mentioned door and window primitive set and door and window number is to take the door and window primitive set with the highest or lowest position coordinates in the unmatched door and window primitive set each time to search for the door and window number, and repeat this process until all door and window primitive sets have found matching door and window numbers. The process may also be repeated. The positional relationship between the door and window primitive set and its corresponding door and window number in a door and window table drawing is fixed. Therefore, the door and window primitive set with the highest or lowest position coordinates may be taken only once to find the door and window number according to step S5.2. The direction in which the nearest text that meets the rules of the door and window number is found is the direction in which the door and window number is searched. Then, the nearest text that meets the rules of the door and window number corresponding to all door and window primitive sets is found along the door and window number search direction. The text found is the door and window number corresponding to each door and window primitive set.

[0110] In the tabular door and window table, step S5.2 finds the nearest text that complies with the door and window numbering rules from the door and window graphic element set, which can also be expressed as finding the nearest plain text cell that complies with the door and window numbering rules from the door and window cells.

[0111] S6, extracting the door and window outer contour lines and door and window outline diagrams from each door and window graphic element set;

[0112] S6.1. Put the elevation lines, annotation lines and dimension annotations into the elevation line set, annotation line set and dimension annotation set respectively, find all line segments with one or both ends hanging in the air, and put them into the hanging line set. Hanging means no overlap or intersection;

[0113] After excluding elevation lines, annotation lines, dimension annotations and dangling lines in step S6.1, the remaining primitive set of each door and window should only contain the curves that constitute the door and window graphics, that is, the door and window outline. However, in order to ensure the accuracy of the extraction, the door and window outer contour lines are extracted first, and then the door and window outline is obtained from the door and window outer contour lines.

[0114] S6.2. Find the outer contour of doors and windows:

[0115] S6.2.1. Sort the curves in the primitive set of a single door and window from long to short, take the longest curve as curve 1, start from the starting point of curve 1, find the longest curve among the curves overlapping curve 1 as curve 2; start from the end point of curve 2 far away from the starting point of curve 1, find the longest curve among the curves overlapping curve 2 as curve 3,..., start from the end point of curve n far away from curve n-1, find the longest curve among the curves overlapping curve n as curve n+1, until no new curve is found, at this time there are two cases: curve n+1 coincides with one of the previous n curves to form a closed figure, or there is no new curve and it is not a closed figure;

[0116] S6.2.2. Determine whether the found curve forms a closed figure. If so, the curve forming the closed figure is the outer contour line of the door and window. Figure 6 As an example, the outer contour lines of the doors and windows extracted above are as follows Figure 7 As shown, it can be used to make holes in wall modeling, otherwise it is not a door or window;

[0117] S6.3. The lines within the outer contour of the door and window are the lines for door and window modeling, including inner contour lines, direction lines, etc. The outer contour line and the lines for door and window modeling within it together constitute the door and window outline drawing, such as Figure 8 As shown, it can be used for door and window moldings;

[0118] The outer contour lines and outline drawings of doors and windows have been extracted. However, when there are turning doors and windows, the turning doors and windows need to be segmented, and the outer contour lines and outline drawings of doors and windows are corrected after segmentation.

[0119] S6.4, Identification of turning lines of doors and windows and segmentation of doors and windows:

[0120] S6.4.1. Determine whether there is at least one door or window graphic element set with a vertical curve penetrating the corresponding door or window outer contour line. If so, proceed to step S6.4.2; otherwise, proceed to step S6.4.3.

[0121] S6.4.2, determine in turn whether there is a vertical curve penetrating the corresponding outer contour line in the primitive set of each door and window. If so, the turning line is the vertical straight line, and the process goes to step S6.4.4. Otherwise, there is no turning line, and S6.4.2 is repeated to determine the next door and window;

[0122] S6.4.3, determine in turn whether the largest horizontal dimension in the graphic element set of each door and window has a parallel horizontal dimension. If so, the door and window is a turning door and window, and the turning line is a curve passing through the common boundary line of the largest horizontal dimension and its parallel horizontal dimension, and go to step S6.4.4. Otherwise, there is no turning line, and repeat S6.4.3 to determine the next door and window;

[0123] S6.4.4. Divide the corresponding outer contour lines of doors and windows along the turning lines.

[0124] Step S6.4.1 is to distinguish which drawing rule is used for the turning doors and windows in the drawing. If there is a turning line, the entire drawing is drawn using the turning line, and the turning line judgment method in step S6.4.2 is used for judgment; if there is no turning line, then the horizontal dimensioning can be used to see whether the door or window is a turning door or window, and the entire drawing uses this drawing rule. The horizontal dimensioning judgment method in S6.4.3 is used to judge whether it is a turning door or window, and make a turning line; because the opening and modeling of turning doors and windows are slightly different from ordinary doors and windows, it is necessary to divide the outer contour of the door and window through the turning line to facilitate more accurate opening and door and window modeling when modeling the wall.

[0125] like Fig. 9 As shown, the largest horizontal dimension is the dimension with the dimension text 2400, and the dimension text parallel to it is 600, and the overlapping dimension boundaries are on the straight line that penetrates the outer contour line, which is the turning line.

[0126] In addition, the door and window table drawing may also include door and window elevation values. When positioning doors and windows, in addition to obtaining the door and window model according to the door and window outline drawing, the door and window model also needs to be positioned at the installation position on the wall using the door and window elevation values.

[0127] Extraction of door and window elevation value: Determine whether there is an elevation mark. If so, the door and window elevation = the bottom height of the door and window outer contour - the nearest elevation height below; otherwise, determine whether there is a dimension mark in the vertical direction below the bottom of the door and window outer contour, see Figure 5 and Figure 8 If yes, the dimension is marked as door and window elevation, otherwise there is no door and window elevation.

[0128] The height calculation is not a necessary item of the present invention, but is only a reference when positioning doors and windows. If other elevation drawings can determine the height of doors and windows, the elevation drawings should be used as the basis.

[0129] The outer contour line of the door and window of the present invention can be used for opening holes in wall modeling, and the outline drawing of the door and window can be used for door and window modeling. Therefore, the dimensions of the outer contour line of the door and window and the outline drawing of the door and window should be accurate. The following method is used to ensure that the dimensions of the door and window are consistent with the dimension marking:

[0130] Take any dimension annotation of a single door and window table. If the dimension line length is not equal to the value of the dimension text, the ratio = dimension line length / dimensional text value, and the door and window curves are enlarged or reduced proportionally.

[0131] Finally, it should be noted that the above method can be converted into software program instructions, which can be implemented by using a control system including a processor and a memory, or by computer instructions stored in a non-transitory computer-readable storage medium. The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0132] In summary, the above-mentioned method for automatically identifying the type of door and window table architectural drawings and doors and windows has the following advantages:

[0133] (1) The present invention directly identifies and extracts the two-dimensional plan view of doors and windows from the door and window table drawings, obtains the door and window outline drawings and the door and window outer outline drawings for subsequent three-dimensional modeling, simplifies the door and window opening and door and window modeling methods in wall modeling, and is conducive to improving the efficiency of automatic modeling. The door and window graphics in the door and window table drawings are concentrated, and the detailed information of the doors and windows included is richer, which is conducive to batch, automatic and efficient processing. There is no need to extract information from multiple drawings, which simplifies information extraction, reduces the amount of calculation, improves modeling efficiency, and has less interference information, thereby improving recognition accuracy;

[0134] (2) After distinguishing the characteristics of different types of door and window drawings, the present invention identifies and extracts the characteristic data of each door and window graphic, providing support for automatic modeling, so that it can be applied to most architectural drawings.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the embodiments of the present invention are 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 shall fall within the scope defined by the appended claims.

Claims

1. A method for automatically identifying the type of door and window table architectural drawings, characterized in that: The following steps are involved: S2.

1. Find the double-line title based on the curves and text obtained from the door and window table drawing: S2.1.

1. Look for double lines in the curves of the door and window table drawings; S2.1.2, searching for an underlined double line in the double lines; S2.1.

3. Exclude the words on the underlined double lines as words describing the ratio, and the remaining words on the underlined double lines are double-line titles, which are included in the double-line title list; S2.1.4, determine whether at least 1 / 3 of the double-line titles in the double-line title list conform to the door and window numbering rules. If so, all double-line titles in the double-line title list are door and window numbers. If not, all double-line titles are removed from the double-line title list. S2.

2. Find the text-only cells based on the curves and text obtained from the door and window table drawing: S2.2.

1. Find cells through the text on the door and window table drawing: Draw rays to the left, right, upward, and downward through the center point of the text to determine whether they can intersect with the horizontal or vertical curves in the door and window table drawing. If so, the rectangle formed by the nearest intersecting curves is the cell. The coordinate range of the cell is determined according to the coordinate value of the nearest intersection point. The curves on which the four sides of the cell are located are table lines. Otherwise, they cannot form a cell. S2.2.

2. Find whether the cell contains a curve. If so, it is not a pure text cell. If not, it is a pure text cell. Find the string formed by all the text in the pure text cell and add it to the pure text cell list. S2.

3. Determine the type of door and window table: Determine whether the following conditions are met at the same time: the number of double-line titles is less than threshold one, and the number of plain text cells is greater than or equal to threshold two. If so, it is a tabular door and window table. Otherwise, determine whether the following conditions are met at the same time: the number of double-line titles is greater than or equal to threshold one, and the number of plain text cells is less than threshold two. If so, it is a block-type door and window table. Otherwise, determine whether the following conditions are met at the same time: the number of double-line titles is greater than or equal to threshold one, and the number of plain text cells is greater than or equal to threshold two. If not, it is neither a tabular door and window table nor a block-type door and window table. If so, determine whether the double-line title is in a certain cell. If so, it is a tabular door and window table. Otherwise, it is neither a tabular door and window table nor a block-type door and window table.

2. The automatic identification method of the type of door and window table architectural drawings according to claim 1 is characterized in that: The double-line search criteria in step S2.1.1 are: two horizontal lines of equal length, completely parallel, with a spacing less than a spacing threshold, and both ends suspended.

3. The automatic identification method of the type of door and window table architectural drawings according to claim 1 is characterized in that: The specific method of step S2.1.2 is: within the text threshold range above the double line, find out whether there is text, if so, underline the double line, if not, determine the next double line.

4. The automatic identification method of the type of door and window table architectural drawings according to claim 1 is characterized in that: The specific method of step S2.1.3 is: determine whether the text conforms to the description rules of the proportion. If so, it is the text describing the proportion. If not, the text on the underlined double line is a double-line title, included in the double-line title list, and then determine the next underlined double line; the description rules of the proportion are: including the format of "number: number".

5. The automatic identification method of the type of door and window table architectural drawings according to claim 1 is characterized in that: In step S2.1.4, the rule for door and window numbering is: door and window numbering includes but is not limited to letters and numbers.

6. A method for automatically identifying doors and windows in door and window table architectural drawings, characterized in that: The following steps are involved: S1. Input the door and window table drawing to obtain all the contents of the door and window table drawing, including curves, text, dimension marking and elevation marking; S2, identifying the type of the input door and window table: if it is a tabular door and window table, proceed to step S3; if it is a block door and window table, proceed to step S4; S3, splitting the tabular door and window table into a set of graphic elements of a single door and window, and proceeding to step S5; S4, split the block-type door and window table into a set of graphic elements of a single door and window, and proceed to step S5; S4.

1. Find the curve primitives and bounding boxes of a single door or window, and group the curve primitives of the single door or window into a primitive set of the single door or window; S4.1.

1. Sort the unidentified curves from longest to shortest; S4.1.

2. Take the longest curve and the curves that intersect or overlap with the longest curve to form a curve group, and find the bounding box of the curve group; S4.1.3, expand the bounding box by a fixed threshold width; S4.1.4, determine whether there is a new curve intersecting with the expanded bounding box. If so, add the new curve in the expanded bounding box and the new curve intersecting with the expanded bounding box to the curve group, obtain the bounding box of the updated curve group, and return to step S4.1.

3. Otherwise, the curve in the curve group is a curve primitive of a single door or window, which is set as recognized, and the bounding box of the curve group is the expanded bounding box of the door or window. S4.1.

5. Determine whether there are any unrecognized curves. If so, return to step S4.1.

2. Otherwise, obtain the curve primitives and bounding boxes of all split single doors and windows, and group the curve primitives of the single doors and windows into the primitive set of the doors and windows. S4.

2. Find the text primitives of a single door or window: traverse all unrecognized texts, find the bounding box closest to the text, and group the text into the primitive set of the door or window; S4.

3. Find the dimension annotation primitive of a single door or window: traverse all dimension annotations, and group the dimension annotations with overlapping or adjacent dimension boundaries into a dimension annotation group; traverse all dimension annotation groups, take the midpoints of the dimension lines of the dimension annotations in the group in turn, and make rays along the dimension boundary direction to intersect with the bounding box of a single door or window, find the nearest bounding box that intersects, and group all the dimension annotations in the dimension annotation group into the primitive set of the door or window; S5. Match the door and window graphic set with the door and window numbers.

7. The automatic identification method of doors and windows in door and window table architectural drawings according to claim 6 is characterized in that: The step S3 comprises the following steps: S3.

1. Identify the door and window cells: take any unidentified curve, and make rays to the left, right, upward, and downward through the midpoint of the unidentified curve to intersect with the table lines. The cell formed by the nearest intersecting table lines is the door and window cell. The coordinate range of the door and window cell is determined according to the coordinates of the nearest intersection point. S3.

2. Construct a primitive set of a single door and window based on each door and window cell: Find all curves, texts and dimension annotations in each door and window cell to form a primitive set of a single door and window, and set them as recognized to obtain the primitive sets of all split single doors and windows.

8. The automatic identification method of doors and windows in door and window table architectural drawings according to claim 6 is characterized in that: The step S5 comprises the following steps: S5.

1. Sort all door and window primitive sets from high to low; S5.2, take the highest / lowest door / window primitive set, first search upward / downward for the nearest text that meets the door / window numbering rules, if not found, then search downward / upward for the nearest text that meets the door / window numbering rules, the found text is the door / window number corresponding to the door / window primitive set; S5.

3. Determine whether there is a door and window primitive set that does not match the door and window number. If so, return to step S5.

2. Otherwise, the matching ends and all door and window primitive sets are matched with the found door and window numbers.

9. The method for automatically identifying doors and windows in door and window table architectural drawings according to claim 6, characterized in that: The automatic identification method for doors and windows further comprises, after step S5: S6, extracting the door and window outer contour lines and door and window outline diagrams from each door and window graphic element set; S6.

1. Place elevation lines, annotation lines, dimensioning and dangling lines into elevation line sets, annotation line sets, dimensioning sets and dangling line sets respectively. The dangling lines are line segments with one or both ends suspended. Dangling means no overlap or intersection. S6.

2. Find the outer contour of doors and windows: S6.2.

1. Sort the curves in the primitive set of a single door and window from long to short, take the longest curve as curve one, start from the starting point of curve one, find the longest curve among the curves overlapping curve one as curve two; start from the end point of curve two far away from the starting point of curve one, find the longest curve among the curves overlapping curve two as curve three, ..., start from the end point of curve n far away from curve n-1, find the longest curve among the curves overlapping curve n as curve n+1, until no new curve is found; S6.2.2, determine whether the found curve forms a closed figure, if so, the curve forming the closed figure is the outer contour line of the door or window, otherwise it is not a door or window; S6.

3. The lines within the door and window outer contour lines are the door and window modeling lines. The outer contour lines and the door and window modeling lines together constitute the door and window outline drawing.

10. The automatic identification method of doors and windows in door and window table architectural drawings according to claim 9 is characterized in that: The step S6 further comprises: S6.4, Identification of turning lines of doors and windows and segmentation of doors and windows: S6.4.

1. Determine whether there is at least one door or window graphic element set with a vertical curve penetrating the corresponding door or window outer contour line. If so, proceed to step S6.4.2; otherwise, proceed to step S6.4.

3. S6.4.2, determine in turn whether there is a vertical curve penetrating the corresponding outer contour line in the primitive set of each door and window. If so, the turning line is a vertical straight line, and proceed to step S6.4.

4. Otherwise, there is no turning line, and repeat S6.4.2 to determine the next door and window; S6.4.3, determine in turn whether the largest horizontal dimension in the graphic element set of each door and window has a parallel horizontal dimension. If so, the turning line is a curve passing through the common boundary of the largest horizontal dimension and its parallel horizontal dimension, and go to step S6.4.

4. Otherwise, there is no turning line, and repeat S6.4.3 to determine the next door and window; S6.4.

4. Divide the corresponding outer contour lines of doors and windows along the turning lines.