Method and device for identifying axle net in architectural drawing
By analyzing the direction angle, clustering, collision relationship detection and greedy matching algorithms in architectural drawings, efficient identification of the axis grid in architectural drawings is achieved, and the problem of low identification efficiency in the existing technology is solved.
Patent Information
- Application Number
- CN202510630298.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-05-16
AI Technical Summary
The existing method of identifying the axis grid of the building drawings relies on manual operations, resulting in low recognition efficiency.
By parsing out all axis number elements from architectural drawings, determining their direction angles, and performing DBSCAN clustering based on these direction angles, multiple axis number clusters are obtained. Then, the collision relationship between multiple axis number clusters is detected, the connection drawing and binarization process is performed, and the greedy matching algorithm is used to match the graph names and the connection domain division results in the text primitives to obtain the identification results of the axis grid area.
It improves the efficiency of the axis grid recognition in the building drawings, and has significant advantages over manual identification.
Smart Images

Figure CN120148064A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of architectural drawing recognition, and in particular to a method and device for recognizing axis networks in architectural drawings. Background Art
[0002] With the development of various industries in society, automation and intelligence are increasingly becoming trends, and the same is true in the field of construction engineering. The design and construction processes rely on detailed drawings.
[0003] In architectural drawings, the recognition and extraction of axis networks are very important core items. However, the existing axis network recognition is completed manually, and there are technical problems of relatively low recognition efficiency. Summary of the Invention
[0004] (I) Technical Problems to be Solved In view of the above-mentioned disadvantages and deficiencies of the prior art, the present invention provides a method and device for recognizing axis networks in architectural drawings, which solves the technical problem of relatively low recognition efficiency existing in the prior art.
[0005] (II) Technical Solutions To achieve the above object, the main technical solutions adopted by the present invention include: In a first aspect, an embodiment of the present invention provides a method for recognizing axis networks in architectural drawings, including: parsing all axis number primitives from the architectural drawing, and determining the direction angle of the axis connected to each axis number primitive among all axis number primitives as the direction angle of the corresponding axis number primitive; performing DBSCAN clustering on all axis number primitives based on the direction angles of all axis number primitives to obtain multiple axis number clusters; detecting the collision relationship between multiple axis number clusters to obtain a collision relationship detection result, and based on the collision relationship detection result, connecting and drawing all connection lines in the mask image including connection lines to obtain a drawn mask image; wherein, the connection lines are used to connect the centers of all axis number primitives in the corresponding axis number cluster; performing binarization processing on the drawn mask image to obtain a binarized mask image, determining the connected domain division result of the binarized mask image, and using a greedy matching algorithm to match the drawing name in the text primitives parsed from the architectural drawing with the connected domain division result to obtain the recognition result of the axis network area in the architectural drawing.
[0006] In a possible embodiment, the collision relationship includes the point-to-point collision relationship between the rectangular centers of the minimum circumscribed rectangles corresponding to each axis number cluster among multiple axis number clusters; the collision relationship detection result includes the detection result of the point-to-point collision relationship; And, the point-to-point collision relationship is obtained by solving the following linear equation: ; Wherein, represents the direction vector of the cluster center point of the i th axis number cluster, and the cluster center point of the i th axis number cluster is the rectangular center of the i th axis number cluster; represents the point-to-point collision encounter time corresponding to the i th axis number cluster; represents the cluster center point of the j th axis number cluster, and the cluster center point of the j th axis number cluster is the rectangular center of the j th axis number cluster; represents the cluster center point of the i th axis number cluster; represents the direction vector of the cluster center point of the j th axis number cluster; represents the point-to-point collision encounter time corresponding to the j th axis number cluster.
[0007] In a possible embodiment, the collision relationship includes the point-to-line collision relationship between the rectangular center of the minimum circumscribed rectangle corresponding to each axis number cluster in a plurality of axis number clusters and the connecting line segments corresponding to other axis number clusters; the collision relationship detection result includes the detection result of the point-to-line collision relationship; Moreover, the point-to-line collision relationship is obtained by solving the following parametric line equation: ; Wherein, pt represents the collision starting point of the point-to-line collision relationship; t represents the point-to-line collision encounter time; represents the direction vector of the collision starting point of the point-to-line collision relationship; p 1 and p 2 represent the two endpoints of the connecting line segment to be collided; u represents the point-to-line collision position.
[0008] In a possible embodiment, based on the collision relationship detection result, all connection line segments in the mask image including connection line segments are connected and drawn to obtain the drawn mask image, including: determining the minimum point-to-point collision encounter time among all point-to-point collision encounter times corresponding to each axis number cluster, and screening all point-to-line collision encounter times to obtain the screened point-to-line collision encounter times, and determining the minimum screened point-to-line collision encounter time among all the screened point-to-line collision encounter times corresponding to each axis number cluster; connecting and drawing the line segment centers of the two axis number clusters corresponding to the minimum point-to-point collision encounter time in the mask image, and based on the point-to-line collision position corresponding to the minimum screened point-to-line collision encounter time, connecting and drawing the collision starting points of the two axis number clusters corresponding to the minimum screened point-to-line collision encounter time in the mask image and their point-to-line collision positions to obtain the drawn mask image.
[0009] In a possible embodiment, screening all point-to-line collision encounter times to obtain the screened point-to-line collision encounter times includes: calculating the angle difference between the direction angles of the two axis number clusters corresponding to each point-to-line collision encounter time among all point-to-line collision encounter times; screening out the point-to-line collision encounter times corresponding to the angle difference less than 90 degrees to obtain the screened point-to-line collision encounter times.
[0010] In a second aspect, an identification device for an axis network in an architectural drawing provided by an embodiment of the present invention includes: An analysis and determination module, configured to analyze all axis number primitives from the architectural drawing and determine the direction angle of the axis connected to each axis number primitive among all axis number primitives as the direction angle of the corresponding axis number primitive; A clustering module, configured to perform DBSCAN clustering on all axis number primitives based on the direction angles of all axis number primitives to obtain multiple axis number clusters; A detection and drawing module, configured to detect the collision relationship between multiple axis number clusters to obtain a collision relationship detection result, and based on the collision relationship detection result, connect and draw all connection line segments in the mask image including connection line segments to obtain the drawn mask image; wherein, the connection line segments are used to connect the centers of all axis number primitives in their corresponding axis number clusters; A matching module, configured to perform binarization processing on the drawn mask image to obtain the binarized mask image, determine the connected domain division result of the binarized mask image, and use a greedy matching algorithm to match the drawing name in the text primitives parsed from the architectural drawing and the connected domain division result to obtain the identification result of the axis network area in the architectural drawing.
[0011] In a possible embodiment, the collision relationship includes the point-to-point collision relationship between the rectangular centers of the minimum circumscribed rectangles corresponding to each axis number cluster among multiple axis number clusters and the rectangular centers of other axis number clusters; the collision relationship detection result includes the detection result of the point-to-point collision relationship; And, the point-to-point collision relationship is obtained by solving the following linear equation: ; In the formula, represents the direction vector of the cluster center point of the i th axis number cluster, and the cluster center point of the i th axis number cluster is the rectangular center of the i th axis number cluster; represents the point-to-point collision encounter time corresponding to the i th axis number cluster; represents the cluster center point of the j th axis number cluster, and the cluster center point of the j th axis number cluster is the rectangular center of the j th axis number cluster; represents the cluster center point of the i th axis number cluster; represents the direction vector of the cluster center point of the j th axis number cluster; represents the point-to-point collision encounter time corresponding to the j th axis number cluster.
[0012] In a possible embodiment, the collision relationship includes the point-to-line collision relationship between the rectangular center of the minimum circumscribed rectangle corresponding to each axis number cluster among multiple axis number clusters and the connecting line segment corresponding to other axis number clusters; the collision relationship detection result includes the detection result of the point-to-line collision relationship; And, the point-to-line collision relationship is obtained by solving the following parametric linear equation: ; In the formula, pt represents the collision starting point of the point-to-line collision relationship; t represents the point-to-line collision encounter time; represents the direction vector of the collision starting point of the point-to-line collision relationship; p 1 and p 2 represent the two endpoints of the connecting line segment to be collided; u represents the point-to-line collision position.
[0013] In a possible embodiment, the detection and drawing module is specifically configured to: determine the minimum point-to-point collision encounter time among all the point-to-point collision encounter times corresponding to each axis number cluster, and screen all the point-to-line collision encounter times to obtain the screened point-to-line collision encounter times, and determine the minimum screened point-to-line collision encounter time among all the screened point-to-line collision encounter times corresponding to each axis number cluster; connect and draw the line segment centers of the two axis number clusters corresponding to the minimum point-to-point collision encounter time in the mask image, and based on the point-to-line collision position corresponding to the minimum screened point-to-line collision encounter time, connect and draw the collision starting points of the two axis number clusters corresponding to the minimum screened point-to-line collision encounter time in the mask image and their point-to-line collision positions, so as to obtain the drawn mask image.
[0014] In a possible embodiment, the detection and drawing module is specifically configured to: calculate the angle difference between the direction angles of the two axis number clusters corresponding to each point-to-line collision encounter time among all the point-to-line collision encounter times; screen out the point-to-line collision encounter times corresponding to the angle difference less than 90 degrees to obtain the screened point-to-line collision encounter times.
[0015] In a third aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is run by a processor, the method described in the first aspect or any optional implementation manner of the first aspect is executed.
[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processor communicates with the memory through the bus, and when the machine-readable instructions are executed by the processor, the method described in the first aspect or any optional implementation manner of the first aspect is executed.
[0017] In a fifth aspect, the present application provides a computer program product, which when running on a computer causes the computer to execute the method in the first aspect or any possible implementation manner of the first aspect.
[0018] (III) Beneficial effects The beneficial effects of the present invention are: The embodiments of the present application provide a method and a device for identifying the axis network in architectural drawings. By parsing all axis number primitives from the architectural drawings, determining the direction angle of the axis connected to each axis number primitive among all axis number primitives as the direction angle of the corresponding axis number primitive, performing DBSCAN clustering on all axis number primitives based on the direction angles of all axis number primitives to obtain multiple axis number clusters, detecting the collision relationships between the multiple axis number clusters to obtain the collision relationship detection results, and based on the collision relationship detection results, connecting and drawing all connection segments in the mask image including connection segments to obtain the drawn mask image, where the connection segments are used to connect the centers of all axis number primitives in their corresponding axis number clusters, and performing binarization processing on the drawn mask image to obtain the binarized mask image, determining the connected domain division result of the binarized mask image, and using a greedy matching algorithm to match the drawing name in the text primitives parsed from the architectural drawings with the connected domain division result to obtain the recognition result of the axis network area in the architectural drawings. Compared with the existing manual recognition scheme, it can improve the recognition efficiency.
[0019] To make the above objects, features, and advantages to be achieved by the embodiments of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative efforts.
[0021] Figure 1 Shows a flowchart of a method for identifying the axis network in architectural drawings provided by the embodiments of the present application; Figure 2 Shows a structural block diagram of a device for identifying the axis network in architectural drawings provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] To better explain the present invention for easy understanding, the following will make a detailed description of the present invention through specific embodiments in conjunction with the accompanying drawings.
[0023] Currently, the design of construction design construction drawings is mainly carried out using computer software (such as CAD software). In the intelligent drawing review system, dividing the image in the drawing frame and matching it to the corresponding drawing name is an essential step in the drawing recognition scenario. The axis network in the floor plan is an important basis for dividing a single image. Detecting the axis network can be used as the benchmark for sub-drawing frame division.
[0024] In the intelligent drawing review system for architectural design construction drawings, axis network positioning is a key step in dividing the drawing frame and matching the drawing title, and there are mainly the following two solutions: One of the solutions is achieved by analyzing the connected components, and it has the advantage of high computing efficiency and is suitable for simple scenarios. However, it has problems such as poor robustness to miscellaneous line interference, threshold selection relying on manual experience, and difficulty in adapting to complex drawing frame nesting scenarios; Another solution is achieved through deep learning segmentation (such as SegNet network, DeepLab network), and it has the advantage of relatively high local scene segmentation accuracy. However, it requires a large amount of labeled data, has poor interpretability, and has low computing efficiency in large and complex drawings (such as underground garage floor plans) due to a huge number of graphic elements (>100,000) and extremely large drawing frame sizes (>100,000 pixels).
[0025] That is to say, in the existing solutions, the division of specific regions in the image is usually carried out by using connected component solving or deep learning semantic segmentation methods. Common semantic segmentation networks include SegNet network, DeepLab network, etc. Although the semantic segmentation method usually has good effects for local specific scenarios, in fact, for large drawings such as residential buildings, especially underground garages, the segmentation effect is not ideal, requires a large amount of data for support, and there are also problems with the interpretability of confidence levels.
[0026] Based on this, the embodiments of the present application provide a method and device for identifying axis networks in architectural drawings. By parsing all axis number graphic elements from the architectural drawings, determining the direction angle of the axis line connected to each axis number graphic element among all axis number graphic elements as the direction angle of the corresponding axis number graphic element, clustering all axis number graphic elements based on the direction angles of all axis number graphic elements by using DBSCAN (Density-Based Spatial Clustering of Applications with Noise, that is, density-based clustering algorithm) to obtain multiple axis number clusters, detecting the collision relationships among the multiple axis number clusters to obtain the collision relationship detection results, and based on the collision relationship detection results, connecting and drawing all connection lines in the mask image including connection lines to obtain the drawn mask image, where the connection lines are used to connect the centers of all axis number graphic elements in their corresponding axis number clusters, and performing binarization processing on the drawn mask image to obtain the binarized mask image, determining the connected component division result of the binarized mask image, and using a greedy matching algorithm to match the drawing title in the text graphic elements parsed from the architectural drawings with the connected component division result to obtain the recognition result of the axis network area in the architectural drawings. Compared with the existing manual recognition solutions, it can improve the recognition efficiency.
[0027] In addition, this application uses a linear solution method for point-line collision to replace the traditional image recognition method. While effectively locating the axis numbers and the positions of the axis networks, the number of incoming graphic elements is reduced, significantly lowering the time complexity. This end-to-end detection method also reduces the feature loss generated during the conversion between graphic elements and images.
[0028] To better understand the above technical solution, the exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more clear and thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0029] Please refer to Figure 1 , Figure 1 , which shows a flowchart of a method for identifying an axis network in an architectural drawing provided by an embodiment of this application. It should be understood that this identification method can be executed by a device for identifying an axis network in an architectural drawing, and the specific device of this identification device can be set according to actual needs, and the embodiments of this application are not limited thereto. For example, this identification device can be a computer or a server, etc. Specifically, this identification method includes: Step S110, parse all axis number graphic elements from the architectural drawing, and determine the direction angle of the axis connected to each axis number graphic element among all axis number graphic elements as the direction angle of the corresponding axis number graphic element.
[0030] Specifically, this application can export the architectural drawing through the DATAEXTRACTION (i.e., data extraction) function in CAD software to obtain the graphic element data in the architectural drawing. Among them, this graphic element data includes axis number graphic elements and text graphic elements, etc. The axis number graphic element is composed of a circle graphic element and the characters surrounded by the circle graphic element, and the characters can be numbers, letters, or a combination of numbers and letters, etc.
[0031] In addition, this application can also determine the direction angle of the axis connected to each axis number graphic element. For example, for a certain axis network area in the architectural drawing, if the axis number graphic elements on its left side are vertically distributed, the direction angle of the axis connected to each axis number graphic element on its left side can be 0°; if the axis number graphic elements on its upper side are horizontally distributed, the direction angle of the axis connected to the axis number graphic elements on its upper side can be 270°; if the axis number graphic elements on its right side are vertically distributed, the direction angle of the axis connected to the axis number graphic elements on its right side can be 180°; if the axis number graphic elements on its lower side are horizontally distributed, the direction angle of the axis connected to the axis number graphic elements on its lower side can be 90°.
[0032] Further, the direction angle of the axis connected to each axis number element can be determined as the direction angle of the corresponding axis number element. For example, when the direction angle of the axis connected to a certain axis number element is 0°, the direction angle of this axis number element is also 0°.
[0033] Step S120: Perform DBSCAN clustering on all axis number elements based on the direction angles of all axis number elements to obtain multiple axis number clusters.
[0034] Specifically, the DBSCAN clustering algorithm can be used to cluster the direction angles of all axis number elements to obtain multiple axis number clusters. For example, for a certain axis network area in an architectural drawing, when the direction angles of multiple axis number elements on its left side are all 0°, the multiple axis number elements on its left side can be one axis number cluster, and the direction angle of this axis number cluster is 0°.
[0035] Step S130: Detect the collision relationship between multiple axis number clusters to obtain the collision relationship detection result, and based on the collision relationship detection result, connect and draw all the connection line segments in the mask image including the connection line segments to obtain the drawn mask image. The connection line segments are used to connect the centers of all axis number elements in their corresponding axis number clusters.
[0036] Specifically, the collision relationship includes the point-to-point collision relationship between the rectangular centers of the minimum circumscribed rectangles corresponding to each axis number cluster in multiple axis number clusters; the collision relationship detection result includes the detection result of the point-to-point collision relationship; And, the point-to-point collision relationship is obtained by solving the following linear equation: ; In the formula, represents the direction vector of the cluster center point of the i th axis number cluster, and the cluster center point of the i th axis number cluster is the rectangular center of the i th axis number cluster, and this direction vector can be represented by (cos(angle i ), sin(angle i ))), and this angle i represents the direction angle of the i th axis number cluster. Regarding the direction vector, it will not be elaborated one by one later. For details, please refer to the description here; represents the point-to-point collision encounter time corresponding to the i th axis number cluster; represents the cluster center point of the j th axis number cluster, and the cluster center point of the j th axis number cluster is the rectangular center of the j th axis number cluster; Represents the cluster center point of the i th axis number cluster; Represents the j th axis number cluster's direction vector of the cluster center point; Represents the j th axis number cluster's corresponding point-to-point collision encounter time.
[0037] Here, it should be noted that for point-to-point collision, for each axis number cluster, it can be abstracted as a collision problem where the cluster center point of the axis number cluster emits at its direction angle (for example, 0°, 90°, etc.). And, if there is a solution, it is determined that two axis number clusters collide, and it can generate a connecting line segment of point-to-point collision in the mask image.
[0038] Furthermore, to avoid the situation where two clusters are far apart in the "axis number cluster" drawing method, a point-to-line collision method is used to solve another connection relationship, that is, the collision relationship includes the point-to-line collision relationship between the rectangle centers of the minimum circumscribed rectangles corresponding to each axis number cluster in multiple axis number clusters and the connecting line segments corresponding to other axis number clusters; the collision relationship detection result includes the detection result of the point-to-line collision relationship; And, the point-to-line collision relationship is obtained by solving the following parametric line equation: ; In the formula, pt Represents the collision starting point of the point-to-line collision relationship; t Represents the point-to-line collision encounter time; Represents the direction vector of the collision starting point of the point-to-line collision relationship, and this direction vector can be represented by cos(angle1) or sin(angle1), where angle1 represents the direction angle of the axis number cluster and is also the direction angle of the point departure; p 1 and p 2 represent the two endpoints of the connecting line segment that needs to be collided with other axis number clusters; u Represents the point-to-line collision position, and it can be represented by a position percentage, that is, it represents the specific position of the point-to-line collision position in the connecting line segment.
[0039] Here, it should be noted that for point-to-line collision, taking the cluster center point of each axial cluster as the collision starting point, collision solving is performed on the connecting line segments connecting all axis number primitives of other axis number clusters.
[0040] In addition, considering the situation where the departure directions of points and lines are the same when there are multiple sub-drawing frames (or multiple axis network regions) in an architectural drawing, the difference between the directions of points and axis number clusters is judged. Specifically: Calculate the angular difference between the direction angles of the two axis number clusters corresponding to each point-line collision encounter time among all point-line collision encounter times, and filter out the point-line collision encounter times corresponding to an angular difference less than 90 degrees to obtain the filtered point-line collision encounter times, that is, filter out the point-line collision encounter times related to back-to-back collisions.
[0041] Here, the forward and backward distinctions of point-line collisions are considered. When the angular difference is less than 90 degrees, it is considered that the point passes through the line backward, resulting in a back-to-back collision. Here, only the case of forward collisions is considered. After screening, the collision equation is solved to obtain the encounter time of the point-line collision.
[0042] Furthermore, determine the minimum point-to-point collision encounter time among all point-to-point collision encounter times corresponding to each axis number cluster, and determine the minimum filtered point-to-line collision encounter time among all filtered point-to-line collision encounter times corresponding to each axis number cluster.
[0043] And, also connect and draw the line segment centers of the two axis number clusters corresponding to the minimum point-to-point collision encounter time in the mask image. For example, if the minimum point-to-point collision encounter time of a certain axial cluster is the collision encounter time with the cluster center point of the first axial cluster, then in the mask image, connect and draw the center point of the connection line segment of this axial cluster and the center point of the connection line segment of the first axial cluster; And, based on the point-line collision position corresponding to the minimum filtered point-to-line collision encounter time, connect and draw the collision starting points and their point-line collision positions of the two axis number clusters corresponding to the minimum filtered point-to-line collision encounter time in the mask image to obtain the drawn mask image. For example, if the minimum filtered point-to-line collision encounter time of a certain axial cluster is the collision encounter time with the connection line segment of the second axial cluster, then in the mask image, connect the center point of the connection line segment of this axial cluster and the point-line collision position in the second axial cluster.
[0044] Step S140, perform binarization processing on the drawn mask image to obtain the binarized mask image, determine the connected domain division result of the binarized mask image, and use the greedy matching algorithm to match the drawing name in the text primitive parsed from the architectural drawing and the connected domain division result to obtain the recognition result of the axis network area in the architectural drawing.
[0045] Specifically, the drawn mask image is converted into a binary image, and the connected domain solving function connectedComponents in the open source computer vision library OpenCV is used to process the binary image to obtain the connected domain division result of the binary mask image, and then the name of the image in the text primitive is used to greedily match the name with the connected domain area to obtain the final sub-frame positioning result, that is, the recognition result of the axis grid area in the architectural drawing. For example, the recognition result may include each axis grid area and its name.
[0046] Therefore, with the help of the above technical solution, this application adopts a linear solution to point-line collision to replace the traditional image recognition method. While effectively locating the axis number and axis grid position, the number of input primitives is reduced, greatly reducing the time complexity. This end-to-end detection method also reduces the feature loss caused by the conversion between primitives and images.
[0047] It should be understood that the above-mentioned method for identifying the axis grid in the architectural drawings is only exemplary, and those skilled in the art can make various modifications based on the above-mentioned method, and the modified scheme also belongs to the protection scope of this application.
[0048] See also Figure 2 , Figure 2 The structural block diagram of a device 200 for identifying an axis network in a building drawing provided in an embodiment of the present application is shown. It should be understood that the identification device 200 can perform each step in the above method embodiment. The specific functions of the identification device 200 can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here. The identification device 200 includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the identification device 200. Specifically, the identification device 200 includes: The parsing and determining module 210 is used to parse all the axis number primitives from the architectural drawings, and determine the direction angle of the axis connected to each of the axis number primitives as the direction angle of the corresponding axis number primitive; A clustering module 220 is used to perform DBSCAN clustering on all axis number primitives based on their direction angles to obtain multiple axis number clusters; The detection and drawing module 230 is used to detect the collision relationship between multiple axis number clusters to obtain the collision relationship detection result, and based on the collision relationship detection result, connect and draw all the connecting line segments in the mask image including the connecting line segments to obtain the drawn mask image; wherein the connecting line segments are used to connect the centers of all the axis number primitives in the corresponding axis number cluster; A matching module 240 is configured to binarize the drawn mask image to obtain a binarized mask image, determine the connected component division result of the binarized mask image, and match the drawing name in the text primitives parsed from the architectural drawing with the connected component division result by using a greedy matching algorithm to obtain the recognition result of the axis network area in the architectural drawing.
[0049] In a possible embodiment, the collision relationship includes the point-to-point collision relationship between the rectangular centers of the minimum circumscribed rectangles corresponding to each axis number cluster among multiple axis number clusters and the rectangular centers of other axis number clusters; the collision relationship detection result includes the detection result of the point-to-point collision relationship. Moreover, the point-to-point collision relationship is obtained by solving the following linear equation: ; In the formula, represents the direction vector of the cluster center point of the i th axis number cluster, and the cluster center point of the i th axis number cluster is the rectangular center of the i th axis number cluster; represents the point-to-point collision encounter time corresponding to the i th axis number cluster; represents the cluster center point of the j th axis number cluster, and the cluster center point of the j th axis number cluster is the rectangular center of the j th axis number cluster; represents the cluster center point of the i th axis number cluster; represents the direction vector of the cluster center point of the j th axis number cluster; represents the point-to-point collision encounter time corresponding to the j th axis number cluster.
[0050] In a possible embodiment, the collision relationship includes the point-to-line collision relationship between the rectangular center of the minimum circumscribed rectangle corresponding to each axis number cluster among multiple axis number clusters and the connecting line segment corresponding to other axis number clusters; the collision relationship detection result includes the detection result of the point-to-line collision relationship. Moreover, the point-to-line collision relationship is obtained by solving the following parametric line equation: ; In the formula, pt represents the collision starting point of the point-to-line collision relationship; t represents the point-to-line collision encounter time; represents the direction vector of the collision starting point of the point-to-line collision relationship; p 1 and p 2 represent the two endpoints of the connecting line segment to be collided.u Indicates the point-to-line collision position.
[0051] In a possible embodiment, the detection and drawing module 230 is specifically configured to: determine the minimum point-to-point collision encounter time among all the point-to-point collision encounter times corresponding to each axis number cluster, and screen all the point-to-line collision encounter times to obtain the screened point-to-line collision encounter times, and determine the minimum screened point-to-line collision encounter time among all the screened point-to-line collision encounter times corresponding to each axis number cluster; connect and draw the line segment centers of the two axis number clusters corresponding to the minimum point-to-point collision encounter time in the mask image, and based on the point-to-line collision position corresponding to the minimum screened point-to-line collision encounter time, connect and draw the collision starting points of the two axis number clusters corresponding to the minimum screened point-to-line collision encounter time and their point-to-line collision positions in the mask image to obtain the drawn mask image.
[0052] In a possible embodiment, the detection and drawing module 230 is specifically configured to: calculate the angular difference between the direction angles of the two axis number clusters corresponding to each point-to-line collision encounter time among all the point-to-line collision encounter times; screen out the point-to-line collision encounter times corresponding to an angular difference less than 90 degrees to obtain the screened point-to-line collision encounter times.
[0053] Since the device described in the above embodiments of the present invention is the device adopted for implementing the method in the above embodiments of the present invention, based on the method described in the above embodiments of the present invention, those skilled in the art can understand the specific structure and deformation of the device, and thus will not be elaborated herein. Any device adopted for the method in the above embodiments of the present invention falls within the scope of protection of the present invention.
[0054] This application provides a storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the method described in the embodiments.
[0055] This application also provides a computer program product, which, when running on a computer, causes the computer to execute the method described in the method embodiments.
[0056] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0057] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems) and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions.
[0058] It should be noted that the words "a" or "an" preceding a component do not exclude the existence of a plurality of such components. The present invention can be implemented by means of hardware including several different components and by means of a suitably programmed computer. Among the several devices recited, several of these devices can be embodied by the same hardware. The use of the terms first, second, third, etc. is for convenience of description only and does not denote any order. These terms can be understood as part of the component name.
[0059] In addition, it should be noted that in the description of this specification, the descriptions of terms such as "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0060] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications after learning the basic creative concepts. Therefore, the technical solutions should be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0061] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the technical solutions of the present invention and their equivalent technologies, the present invention should also include these modifications and variations.
Claims
1. A method for identifying an axis network in a building drawing, characterized in that: include: Parsing all axis number primitives from the architectural drawing, and determining the direction angle of the axis connected to each axis number primitive among all the axis number primitives as the direction angle of the corresponding axis number primitive; Perform DBSCAN clustering on all the axis number primitives based on their direction angles to obtain multiple axis number clusters; Detecting the collision relationship between the plurality of axis number clusters to obtain a collision relationship detection result, and based on the collision relationship detection result, connecting and drawing all the connecting line segments in the mask image including the connecting line segments to obtain a drawn mask image; wherein the connecting line segments are used to connect the centers of all the axis number primitives in the corresponding axis number cluster; The drawn mask image is binarized to obtain a binarized mask image, and a connected domain division result of the binarized mask image is determined. A greedy matching algorithm is used to match the image name in the text primitive parsed from the architectural drawing with the connected domain division result to obtain a recognition result of the axis grid area in the architectural drawing.
2. The identification method according to claim 1, characterized in that: The collision relationship includes a point-to-point collision relationship between the rectangular center of the minimum circumscribed rectangle corresponding to each of the multiple axis number clusters and the rectangular centers of other axis number clusters; the collision relationship detection result includes a point-to-point collision relationship detection result; And, the point-to-point collision relationship is obtained by solving the following linear equation: ; In the formula, Indicates i The direction vector of the cluster center point of the axis number cluster, and the i The cluster center point of the axis number cluster is the i The rectangular center of the axis number cluster; Indicates the i The point-to-point collision encounter time corresponding to each axis number cluster; Indicates j The cluster center point of the axis number cluster, and the j The cluster center point of the axis number cluster is the j The rectangular center of the axis number cluster; Indicates i The cluster center of the axis number cluster; Indicates the j The direction vector of the cluster center point of the axis number cluster; Indicates the j The point-to-point collision encounter time corresponding to each axis number cluster.
3. The identification method according to claim 2, characterized in that: The collision relationship includes a point-to-line collision relationship between a rectangular center of a minimum circumscribed rectangle corresponding to each of the plurality of axis number clusters and a connecting line segment corresponding to the other axis number clusters; the collision relationship detection result includes a point-to-line collision relationship detection result; And, the point-to-line collision relationship is obtained by solving the following parameterized straight line equation: ; In the formula, pt Indicates the collision starting point of the point-to-line collision relationship; t Indicates the point-to-line collision encounter time; A direction vector representing a collision starting point of the point-to-line collision relationship; p 1 and p 2 represents the two endpoints of the connecting line segment to be collided; u Indicates the point-to-line collision location.
4. The identification method according to claim 3, characterized in that: The method of connecting and drawing all the connected line segments in the mask image including the connected line segments based on the collision relationship detection result to obtain the drawn mask image includes: Determine the minimum point-to-point collision encounter time among all the point-to-point collision encounter times corresponding to each axis number cluster, and screen all the point-to-line collision encounter times to obtain screened point-to-line collision encounter times, and determine the minimum screened point-to-line collision encounter time among all the screened point-to-line collision encounter times corresponding to each axis number cluster; The line segment centers of the two axis number clusters corresponding to the minimum point-to-point collision encounter time in the mask image are connected and drawn, and based on the point-to-line collision position corresponding to the minimum filtered point-to-line collision encounter time, the collision starting points and point-to-line collision positions of the two axis number clusters corresponding to the minimum filtered point-to-line collision encounter time in the mask image are connected and drawn to obtain the drawn mask image.
5. The identification method according to claim 4, characterized in that: The step of screening all the point-to-line collision encounter times to obtain the screened point-to-line collision encounter times includes: Calculate the angle difference between the direction angles of the two axis number clusters corresponding to each of the point-to-line collision encounter times among all the point-to-line collision encounter times; The point-to-line collision encounter time corresponding to the angle difference less than 90 degrees is filtered out to obtain the filtered point-to-line collision encounter time.
6. A device for identifying an axis network in a building drawing, characterized in that: include: A parsing and determining module, used for parsing all axis number primitives from the architectural drawings, and determining the direction angle of the axis connected to each axis number primitive among all the axis number primitives as the direction angle of the corresponding axis number primitive; A clustering module, used for performing DBSCAN clustering on all the axis number primitives based on the direction angles of all the axis number primitives to obtain multiple axis number clusters; A detection and drawing module, used for detecting the collision relationship between the plurality of axis number clusters to obtain a collision relationship detection result, and based on the collision relationship detection result, connecting and drawing all the connection line segments in the mask image including the connection line segments to obtain a drawn mask image; wherein the connection line segments are used for connecting the centers of all axis number primitives in the corresponding axis number clusters; The matching module is used to perform binarization processing on the drawn mask image to obtain the binarized mask image, determine the connected domain division result of the binarized mask image, and use a greedy matching algorithm to match the image name in the text primitive parsed from the architectural drawing with the connected domain division result to obtain the recognition result of the axis network area in the architectural drawing.
7. The identification device according to claim 6, characterized in that The collision relationship includes a point-to-point collision relationship between the rectangular center of the minimum circumscribed rectangle corresponding to each of the multiple axis number clusters and the rectangular centers of other axis number clusters; the collision relationship detection result includes a point-to-point collision relationship detection result; And, the point-to-point collision relationship is obtained by solving the following linear equation: ; In the formula, Indicates i The direction vector of the cluster center point of the axis number cluster, and the i The cluster center point of the axis number cluster is the i The rectangular center of the axis number cluster; Indicates the i The point-to-point collision encounter time corresponding to each axis number cluster; Indicates j The cluster center point of the axis number cluster, and the j The cluster center point of the axis number cluster is the j The rectangular center of the axis number cluster; Indicates i The cluster center of the axis number cluster; Indicates the j The direction vector of the cluster center point of the axis number cluster; Indicates the j The point-to-point collision encounter time corresponding to each axis number cluster.
8. The identification device according to claim 7, characterized in that: The collision relationship includes a point-to-line collision relationship between a rectangular center of a minimum circumscribed rectangle corresponding to each of the plurality of axis number clusters and a connecting line segment corresponding to the other axis number clusters; the collision relationship detection result includes a point-to-line collision relationship detection result; And, the point-to-line collision relationship is obtained by solving the following parameterized straight line equation: ; In the formula, pt Indicates the collision starting point of the point-to-line collision relationship; t Indicates the point-to-line collision encounter time; A direction vector representing a collision starting point of the point-to-line collision relationship; p 1 and p 2 represents the two endpoints of the connecting line segment to be collided; u Indicates the point-to-line collision location.
9. The identification device according to claim 8, characterized in that The detection and drawing module is specifically used to: determine the minimum point-to-point collision encounter time among all the point-to-point collision encounter times corresponding to each axis number cluster, and screen all the point-to-line collision encounter times to obtain the screened point-to-line collision encounter time, and determine the minimum screened point-to-line collision encounter time among all the screened point-to-line collision encounter times corresponding to each axis number cluster; connect and draw the line segment centers of the two axis number clusters corresponding to the minimum point-to-point collision encounter time in the mask image, and connect and draw the collision starting points and point-to-line collision positions of the two axis number clusters corresponding to the minimum screened point-to-line collision encounter time in the mask image based on the point-to-line collision position corresponding to the minimum screened point-to-line collision encounter time to obtain the drawn mask image.
10. The identification device according to claim 9, characterized in that: The detection and drawing module is specifically used to: calculate the angle difference between the direction angles of the two axis number clusters corresponding to each of the point-to-line collision encounter times among all the point-to-line collision encounter times; filter out the point-to-line collision encounter times corresponding to the angle difference less than 90 degrees, and obtain the filtered point-to-line collision encounter times.
Citation Information
Patent Citations
Collision correction method for real-time hair motion simulation
CN103942376A
AI-based axis network identification method and system, terminal and medium
CN119418361A
Methods and systems for detection in an industrial internet of things data collection environment with large data sets
US20180284737A1