Feature point-based graticule positioning map and large-scale detail map matching method and system
Patent Information
- Application Number
- CN202610489926.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-14
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-04-14
AI Technical Summary
[0005]本发明提供基于特征点的轴网定位图与大样详图匹配方法及其系统,解决相关技术中大样详图与轴网平面图之间信息映射困难、缺乏有效的坐标空间变换手段导致无法自动将大样详图中的线条和构件信息准确映射至轴网平面图的技术问题
[0016] This invention solves the technical problem of lacking grid information in detailed drawings, thus preventing the direct establishment of spatial correspondence between them and the grid positioning map. It solves by extracting three types of feature points with semantic correspondence (room center point, door center point, and the corner point farthest from the door) to calculate the affine transformation matrix. This achieves the technical effect of simultaneously handling complex geometric transformations such as scaling, rotation, and translation, and accurately mapping lines and components in detailed drawings to the grid positioning map. By matching based on the geometric features of the room outline, it achieves the technical effect of establishing room correspondences without relying on the grid information in the detailed drawings. Through intersection-union verification of the affine transformation matrix, it achieves the technical effect of identifying and eliminating invalid transformation matrices, and preventing lines and components from being mapped to incorrect positions.
Smart Images

Figure CN122347813B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital processing technology for architectural engineering drawings, and more specifically, to a method and system for matching grid positioning diagrams and detailed drawings based on feature points. Background Technology
[0002] In the digitization process of architectural engineering drawings, the grid positioning diagram contains complete grid coordinate information and room layout information, serving as the foundational drawing for project positioning. Detailed drawings (such as plumbing and drainage details) contain detailed information about pipe lines and components, but typically lack grid coordinate information. In practical engineering applications, it is necessary to accurately map the lines and components identified in the detailed drawings to their corresponding positions on the grid positioning diagram to achieve information integration and connection.
[0003] In existing technologies, simple geometric transformation methods such as single translation or proportional scaling are usually used to handle the spatial correspondence between drawings.
[0004] However, since the detailed drawings themselves do not contain grid information, the program cannot directly determine the spatial correspondence between the detailed drawings and the grid positioning drawings. At the same time, there are complex geometric differences such as scaling, rotation and translation between the two types of drawings. Traditional simple geometric transformation methods cannot accurately map the lines and components in the detailed drawings to the correct positions in the grid positioning drawings, resulting in information mapping deviations. Summary of the Invention
[0005] This invention provides a method and system for matching grid positioning diagrams and detailed drawings based on feature points, which solves the technical problems in related technologies, such as the difficulty in mapping information between detailed drawings and grid plan diagrams, and the lack of effective coordinate space transformation methods, which makes it impossible to automatically and accurately map the line and component information in detailed drawings to grid plan diagrams.
[0006] This invention discloses a method for matching grid positioning maps and detailed drawings based on feature points, comprising: acquiring grid positioning map data and detailed drawing data of floors matching for the same single project, wherein the grid positioning map data includes grid information, unit outline information and room outline information, and the detailed drawing data includes room information and line and component information to be mapped; The outlines of each room in the detailed drawing are matched with the outlines of each room in the grid positioning drawing based on the geometric feature similarity of the room outlines to obtain matching room pairs consisting of the source room and the target room. For each matched room pair, three feature points are extracted from the source room and the target room respectively. The three feature points include the center point of the room, the center point of the door, and the corner point farthest from the door. The same type of feature points in the source room and the target room are paired to obtain three feature point pairs. Based on the three feature point pairs, solve for the affine transformation matrix from the coordinate space of the detailed drawing to the coordinate space of the grid positioning drawing; The coordinates of each vertex of the source room contour are transformed using the affine transformation matrix. The intersection-union ratio (IUU) between the transformed room contour and the target room contour is calculated. The validity of the affine transformation matrix is determined based on the IUU. By using an effective affine transformation matrix, the line coordinate data and component coordinate data to be mapped in the detailed drawing are transformed, and the transformed lines and components are written into the grid plan data to generate a grid plan with complete information mapping.
[0007] Furthermore, the matching based on the geometric feature similarity of the room outline includes: For the source room outline in the detailed drawing, count the number of line segments that make up the source room outline and the length of each line segment; perform the same statistical processing on each candidate target room outline in the grid positioning drawing. The number of line segments in the source room is compared with the number of line segments in each candidate target room, and candidate target rooms with the same number of line segments are selected. In candidate target rooms with the same number of line segments, the length sequence formed by sorting the lengths of each line segment in the source room from largest to smallest is compared one by one with the corresponding length sequence of the candidate target room. The ratio between the lengths of each corresponding line segment is calculated. When the length ratio of all corresponding line segments is within the preset ratio range, the candidate target room is determined to be a successful match with the source room, forming a matched room pair.
[0008] Furthermore, the preset ratio range is a constraint interval centered on the scaling ratio between the detailed drawing and the grid positioning drawing, which is used to allow for differences in line segment length scaling caused by different drawing scales. Candidate target rooms that exceed the preset ratio range are judged as mismatched.
[0009] Furthermore, prior to performing room outline matching, the following steps are also included: Extract the unit outline information from the large-scale detailed drawing data and the axis grid positioning map data. Perform unit-level matching based on the geometric feature similarity of the unit outlines to obtain matching unit pairs. The matching of room outlines is limited to the matched unit type pairs. The room outline matching operation is performed only between rooms in the matched source unit type and rooms in the target unit type.
[0010] Furthermore, the extraction methods for the three feature points include: Calculate the arithmetic mean of the coordinates of all vertices of the room outline polygon to obtain the room center point. The mean of the x-coordinates of each vertex is used as the x-coordinate of the room center point, and the mean of the y-coordinates of each vertex is used as the y-coordinate of the room center point. Obtain the position information of the door components in the room, calculate the arithmetic mean of the coordinates of each vertex of the door component outline, and obtain the center point of the door; Calculate the Euclidean distance from each corner point of the room outline to the center point of the door, and select the corner point with the largest Euclidean distance as the corner point farthest from the door.
[0011] Furthermore, when there are multiple door components in a room, the distance from the geometric center coordinates of each door component to the center point of the room is calculated, and the geometric center coordinates of the door component closest to the center point of the room are selected as the door center point.
[0012] Furthermore, solving for the affine transformation matrix includes: Before solving the affine transformation matrix, the coordinates of feature points in the large-scale detailed drawing coordinate space and the coordinates of feature points in the grid positioning drawing coordinate space are subjected to mean normalization based on the range, so that the coordinate values in the two coordinate spaces are uniformly scaled to the same range. Substituting the coordinates of the source room feature point and the corresponding target room feature point into the affine transformation relation, a six-variable linear equation system containing six unknown parameters is formed. The six unknown parameters include four linear transformation parameters and two translation parameters. The six-variable linear equation system is expressed as a matrix form in which the product of the coefficient matrix and the parameter vector to be solved is equal to the vector on the right. By inverting the coefficient matrix and multiplying it by the vector on the right, all six parameter values of the affine transformation matrix are obtained. After the affine transformation matrix is solved, the parameters of the affine transformation matrix are restored to the original coordinate space through inverse transformation.
[0013] Furthermore, the determination of the validity of the affine transformation matrix based on the intersection-union ratio includes: The intersection-union ratio is the ratio of the area of the intersection region of the transformed room outline and the target room outline to the area of the union region, wherein the area of the union region is equal to the sum of the areas of the two outline polygons minus the area of the intersection region. When the intersection-union ratio is greater than or equal to a preset threshold, the affine transformation matrix is determined to be valid; when the intersection-union ratio is less than the preset threshold, the affine transformation matrix is determined to be invalid, and the affine transformation matrix corresponding to the matched room pair is discarded.
[0014] Furthermore, verifying the validity of the affine transformation matrix also includes: The coordinates of each vertex of the source house outline are transformed using the affine transformation matrix to obtain the transformed house outline. Calculate the intersection-union ratio (IUU) between the transformed floor plan outline and the target floor plan outline; When the cross-union ratio at the room level and the cross-union ratio at the apartment type level are both greater than or equal to their respective preset thresholds, the affine transformation matrix is determined to be valid.
[0015] This invention provides a system for matching a grid positioning map and a detailed drawing based on feature points, comprising: The data acquisition module is used to acquire the grid positioning map data and detailed drawing data of the floors matching for the same single project; The room matching module is used to match the outlines of each room in the detailed drawing with the outlines of each room in the grid positioning drawing based on the similarity of the geometric features of the room outlines, and obtain matching room pairs consisting of the source room and the target room. The feature point extraction module is used to extract three feature points from the source room and the target room for each matched room pair. The three feature points include the center point of the room, the center point of the door, and the corner point farthest from the door. The same type of feature points in the source room and the target room are paired to obtain three feature point pairs. The affine transformation solution module is used to solve the affine transformation matrix from the coordinate space of the detailed drawing to the coordinate space of the grid positioning drawing based on the three feature point pairs. The validity verification module is used to transform the coordinates of each vertex of the source room contour using the affine transformation matrix, calculate the intersection-union ratio between the transformed room contour and the target room contour, and determine the validity of the affine transformation matrix based on the intersection-union ratio. The information mapping module is used to transform the line coordinate data and component coordinate data to be mapped in the detailed drawing using an effective affine transformation matrix, and write the transformed lines and components into the grid plan view data to generate the grid plan view with complete information mapping.
[0016] This invention solves the technical problem of lacking grid information in detailed drawings, thus preventing the direct establishment of spatial correspondence between them and the grid positioning map. It solves by extracting three types of feature points with semantic correspondence (room center point, door center point, and the corner point farthest from the door) to calculate the affine transformation matrix. This achieves the technical effect of simultaneously handling complex geometric transformations such as scaling, rotation, and translation, and accurately mapping lines and components in detailed drawings to the grid positioning map. By matching based on the geometric features of the room outline, it achieves the technical effect of establishing room correspondences without relying on the grid information in the detailed drawings. Through intersection-union verification of the affine transformation matrix, it achieves the technical effect of identifying and eliminating invalid transformation matrices, and preventing lines and components from being mapped to incorrect positions. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method for matching a grid positioning map and a detailed drawing based on feature points provided in an embodiment of the present invention; Figure 2This is a schematic diagram comparing the lengths of room outline segments (detailed drawing vs. grid positioning diagram) provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the distribution of the ratio of the length of the room outline segments provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the feature point coordinate distribution (detailed drawing coordinate space) provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of feature point coordinate comparison (source room vs. target room) provided in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the visualization of affine transformation matrix parameters provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the IoU value for validating the affine transformation matrix provided in an embodiment of the present invention; Figure 8 This is a schematic diagram showing the comparison (X coordinate) of the pipeline and component before and after coordinate transformation provided in an embodiment of the present invention. Detailed Implementation
[0018] In the digitization process of architectural engineering drawings, the grid plan (also known as the grid positioning plan) contains complete grid coordinate information and room layout information, serving as the foundational drawing for project positioning. Detailed drawings (also known as plumbing details, etc.) contain detailed information such as pipe lines and components, but typically lack grid coordinate information. In practical engineering applications, it is necessary to accurately map the lines and components identified in the detailed drawings to their corresponding positions on the grid plan to achieve information integration and connection.
[0019] However, since detailed drawings themselves do not contain grid information, the program cannot directly determine the spatial correspondence between the detailed drawings and the grid plan. Furthermore, there are geometric differences between the detailed drawings and the grid plan, such as scaling, rotation, and translation. Traditional simple geometric transformation methods (such as single translation or proportional scaling) cannot accurately map the lines and components in the detailed drawings to the correct positions in the grid plan, leading to information mapping errors. Therefore, a method is needed that can automatically establish the spatial correspondence between detailed drawings and the grid plan and accurately complete the information transformation mapping.
[0020] At least one embodiment of the present invention discloses a method for matching a grid positioning map and a detailed drawing based on feature points, such as... Figure 1 As shown, it includes the following steps: Step 1: Obtain the grid positioning map data and detailed drawing data; Obtain the grid location map data and detailed drawing data of the floors matching for the same single project. The grid location map data includes grid information, unit outline information and room outline information, while the detailed drawing data includes unit information, room information and the lines and components to be mapped.
[0021] It should be noted that the aforementioned limitation on individual projects refers to filtering based on the individual project identifier to which the drawing belongs when acquiring drawing data. Specifically, the individual project identifier associated with each drawing is read from the drawing database or drawing file collection. Grid positioning diagrams and detailed drawings with the same individual project identifier are paired as input data for subsequent matching processing. Step 2: Extract room information from the detailed drawings and match it with room information from the grid positioning diagram to obtain matching room pairs. The contour information of each room is extracted from the detailed drawing data and the grid positioning data. The contours of each room in the detailed drawing are compared with the contours of each room in the grid positioning data. Matching is performed based on the geometric feature similarity of the room contours to obtain matching room pairs consisting of the source room in the detailed drawing and the target room in the grid positioning data.
[0022] It should be noted that the above-mentioned matching based on the geometric feature similarity of room outlines refers to using the number of line segments and the length of each line segment of the room outline as the matching criteria. Specifically, for a source room outline in a detailed drawing, the number of line segments constituting the source room outline and the length of each line segment are counted to form a geometric feature description of the source room. Similarly, the same statistical processing is performed on each candidate target room outline in the grid positioning drawing. The number of line segments in the source room is compared with the number of line segments in each candidate target room, and candidate target rooms with the same number of line segments are selected. Among the candidate target rooms with the same number of line segments, the length sequence formed by sorting the lengths of each line segment in the source room from largest to smallest is compared one by one with the corresponding length sequence of the candidate target rooms. The ratio between the lengths of each line segment is calculated. When the length ratio of all corresponding line segments is within a preset ratio range, the candidate target room is determined to be a successful match with the source room, forming a matched room pair.
[0023] Furthermore, the aforementioned preset ratio range refers to a reasonable constraint range on the length ratio of each corresponding line segment, used to allow for differences in line segment length scaling between the detailed drawing and the grid positioning drawing due to different drawing scales. Since the scaling relationship between the detailed drawing and the grid positioning drawing on the same floor is consistent within the same matching pair, the length ratios of each corresponding line segment should be close to each other and fall within the preset ratio range centered on the scaling ratio. Candidate target rooms that exceed the preset ratio range are judged as mismatched.
[0024] In this embodiment of the application, to improve the accuracy of matching, the following steps are included before performing room-level matching: extracting the apartment outline information and the entrance room information from the detailed drawing data, and extracting the apartment outline information and the corresponding entrance room information from the grid positioning map data. Since an apartment consists of multiple rooms, each apartment will have a specific entrance room. First, room matching is performed using this entrance room. The entrance room in the detailed drawing is matched with the entrance room in the grid positioning map based on the geometric feature similarity of the room outlines to obtain a matching pair of entrance rooms. Based on the matching pair of entrance rooms, a preliminary affine transformation matrix is solved. The coordinates of each vertex of the apartment outline in the detailed drawing are transformed using the preliminary affine transformation matrix to obtain the transformed apartment outline. The intersection-union ratio (IUR) between the transformed apartment outline and the target apartment outline in the grid positioning map is calculated. When the IUR is greater than or equal to a preset threshold, the apartment is determined to be successfully matched, and a matching apartment pair is obtained. Based on this, room-level matching is limited to already matched apartment types; that is, the room matching operation is only performed between rooms within the matched source apartment type and rooms within the target apartment type. The matching method for apartment outlines is the same as that for room outlines, both based on comparing the number of outline segments and the length of each segment.
[0025] Step 3: Extract feature point pairs from the matched room pairs; For each matched room pair, corresponding feature points are extracted from the source room and the target room respectively, obtaining a feature point pair composed of feature points from the source room and the target room. Three feature points are extracted from each room: the room center point, the door center point, and the corner point farthest from the door. Step 301: Calculate the geometric center coordinates of the room outline to obtain the room center point.
[0026] Furthermore, the geometric center coordinates of the room outline mentioned above refer to the coordinate point corresponding to the arithmetic mean of the coordinates of all vertices of the room outline polygon. That is, the average of the x-coordinates of each vertex of the room outline is taken as the x-coordinate of the geometric center, and the average of the y-coordinates of each vertex is taken as the y-coordinate of the geometric center.
[0027] Step 302: Obtain the position information of the door components in the room, calculate the geometric center coordinates of the door components, and obtain the center point of the door.
[0028] Furthermore, the geometric center coordinates of the aforementioned door component refer to the coordinate point corresponding to the arithmetic mean of the coordinates of each vertex of the door component outline, and the calculation method is the same as that for the geometric center coordinates of the room outline.
[0029] Step 303: Calculate the Euclidean distance from each corner point of the room outline to the center point of the door, select the corner point with the largest Euclidean distance, and obtain the corner point farthest from the door.
[0030] Perform steps 301 to 303 above on the source room to obtain three feature points of the source room; perform steps 301 to 303 above on the target room to obtain three feature points of the target room. Pair the center point of the source room with the center point of the target room, pair the center point of the door of the source room with the center point of the door of the target room, and pair the corner point of the source room farthest from the door with the corner point of the target room farthest from the door to form three feature point pairs.
[0031] It should be noted that the selection rules for the above three feature points refer to selecting points that can reflect the spatial structural characteristics of the room and have a semantic correspondence between the source room and the target room. The center point of the room reflects the overall position of the room, the center point of the door reflects the position of the entrance and exit of the room, and the corner point farthest from the door reflects the position of the spatial endpoint in the room opposite to the entrance and exit. The three feature points form a triangular region that covers the main spatial area of the room, providing sufficient geometric constraints for solving the affine transformation matrix.
[0032] In this embodiment of the application, when there are multiple door components in a room, one door component is selected to calculate the door center point. The selection rule is as follows: obtain the geometric center coordinates of each door component, calculate the distance from each door center coordinate to the center point of the room, and select the geometric center coordinates of the door component closest to the center point of the room as the door center point, so as to ensure that the selected door component is located at the main entrance and exit of the room.
[0033] Step 4: Calculate the affine transformation matrix based on feature point pairs; Based on three feature point pairs, the affine transformation matrix from the coordinate space of the detailed drawing to the coordinate space of the grid positioning drawing is calculated using the method of determining the affine transformation matrix using three pairs of points.
[0034] Since the detailed drawing and the grid positioning diagram belong to different coordinate spaces, their coordinate value ranges may differ significantly. Before solving the affine transformation matrix, mean normalization based on the range is applied to the feature point coordinates in both the detailed drawing coordinate space and the grid positioning diagram coordinate space. This scales the coordinate values in both coordinate spaces to the same range, eliminating the impact of the difference in coordinate magnitude on the stability of the linear equation system. After solving the affine transformation matrix, an inverse transformation is used to restore the parameters of the affine transformation matrix to the original coordinate space.
[0035] Affine transformation matrix The following relationship must be satisfied:
[0036] in, Let be the affine transformation matrix. These are the coordinates of a point in the coordinate space of the detailed drawing. These are the coordinates of the corresponding points in the coordinate space of the grid positioning diagram. , , , The linear transformation parameters of the affine transformation. , These are the translation parameters.
[0037] The coordinates of the source room feature points in the three feature point pairs , , and the corresponding target room feature point coordinates , , Substituting the above relational expressions, we construct a system of six linear equations with six unknown parameters:
[0038] in, , , These are the coordinates of the center point of the source room, the center point of the door, and the corner point farthest from the door in the coordinate space of the detailed drawing, respectively. , , These are the coordinates of the center point of the target room, the center point of the door, and the corner point farthest from the door in the coordinate space of the axis grid positioning diagram. , , , , , Let be the affine transformation parameters to be solved.
[0039] Solve the system of six linear equations to obtain the affine transformation matrix. The six parameter values are used to determine the affine transformation matrix. .
[0040] Furthermore, the above method for solving a system of six linear equations refers to expressing the system of six linear equations as follows: In matrix form, where It is composed of the coordinates of the feature points of the source room. coefficient matrix, For the reason , , , , , The vector of parameters to be determined The right-hand vector is composed of the coordinates of the feature points of the target room. This is achieved by adjusting the coefficient matrix. Inverse and the right-hand vector Multiplying them together yields the parameter vector. Thus, the affine transformation matrix is obtained. All six parameter values.
[0041] Step 5: Verify the validity of the affine transformation matrix; Using affine transformation matrix Transform the coordinates of each vertex of the source room contour to obtain the transformed room contour; calculate the intersection-union ratio (IUR) between the transformed room contour and the target room contour, and determine the validity of the affine transformation matrix based on the IUR.
[0042] Intersection and Union The calculation formula is:
[0043] in, For intersection, union, and comparison, This represents the area of the intersection region between the transformed room outline and the target room outline. This represents the area of the union region between the transformed room outline and the target room outline.
[0044] when When the value is greater than or equal to a preset threshold, the affine transformation matrix is determined. Valid; when When the value is less than a preset threshold, determine the affine transformation matrix. Invalid. Discard the affine transformation matrix corresponding to the matched room pair.
[0045] It should be noted that the above-mentioned preset threshold is a value set in advance according to the matching accuracy requirements of the engineering drawings, which is used to measure the degree of overlap between the transformed room outline and the target room outline. The range of values is ,in This indicates that the transformed room outline does not overlap with the target room outline at all. This indicates that the two completely overlap, with a preset threshold at... The value is taken within a range, and the larger the preset threshold, the higher the requirement for transformation accuracy.
[0046] Furthermore, the area of the aforementioned intersection region Area of the union region The calculation refers to performing polygon Boolean operations on the transformed room outline polygon and the target room outline polygon to calculate the area of the intersection polygon and the area of the union polygon, respectively. The area of the union is equal to the sum of the areas of the two polygons minus the area of the intersection.
[0047] In this embodiment of the application, to further improve the reliability of the verification, based on step 5, the same verification operation is performed on the matching apartment type pairs: using an affine transformation matrix. The coordinates of each vertex of the source apartment layout are transformed to obtain the transformed apartment layout. The intersection-over-union (IoU) ratio between the transformed apartment layout and the target apartment layout is calculated. When both the room-level IoU and the apartment layout-level IoU are greater than or equal to their respective preset thresholds, the affine transformation matrix is determined. efficient.
[0048] Step 6: Use an effective affine transformation matrix to transform the lines and components in the detailed drawing to their corresponding positions in the grid plan view, and obtain the grid plan view with completed information mapping; Store the effective affine transformation matrix, obtain the line coordinate data and component coordinate data to be mapped in the detailed drawing, and then use the stored affine transformation matrix. The endpoint coordinates of each line and the positioning coordinates of each component are transformed and calculated to obtain the transformed line coordinate data and component coordinate data. The transformed lines and components are then written into the grid plan data to generate a grid plan with complete information mapping.
[0049] It should be noted that the lines and components to be mapped mentioned above refer to the professional information elements such as pipe lines and equipment components obtained after the detailed drawing has been identified. Taking the water supply and drainage detailed drawing as an example, the lines to be mapped include water supply pipe lines and drainage pipe lines, and the components to be mapped include valves, pipe fittings, and other components.
[0050] In this embodiment, when multiple detailed drawings exist on the same floor, steps 2 to 6 are performed on each detailed drawing. Each detailed drawing independently calculates its corresponding affine transformation matrix and transforms its lines and components to the corresponding positions on the grid plan. When multiple detailed drawings contain lines or components with overlapping spatial positions, the line or component data written after the transformation is retained, overwriting the overlapping data written earlier.
[0051] This implementation extracts three types of feature points with semantic correspondence from matched room pairs (room center point, door center point, and the corner point farthest from the door), and uses these three pairs of feature points to solve the affine transformation matrix, establishing a mapping relationship between the coordinate space of the detailed drawing and the coordinate space of the grid positioning drawing. Because the three types of feature points reflect the overall location of the room, the location of the entrance / exit, and the location of the spatial endpoints, respectively, the triangle formed by the three feature points covers the main spatial area of the room, providing sufficient geometric constraints for solving the affine transformation matrix. Therefore, the solved affine transformation matrix can simultaneously contain geometric transformation information such as scaling, rotation, and translation, overcoming the problem of direct positioning due to the lack of grid information in the detailed drawing.
[0052] Furthermore, this implementation determines matching room pairs based on the number and length of room outline segments. It utilizes the geometric features of the room outlines rather than grid coordinate information for matching, thus establishing the correspondence between rooms without relying on grid information in detailed drawings. Simultaneously, by calculating the intersection-union comparison (IUCN) between the transformed outline and the target outline to verify the validity of the affine transformation matrix, invalid transformation matrices resulting from matching errors can be identified and eliminated, preventing lines and components from being mapped to incorrect positions and ensuring the accuracy of information mapping. Pre-screening using individual project and floor information narrows the matching search range and eliminates the possibility of mismatches across floors or projects.
[0053] The following is an example of an application of the present invention, such as... Figure 2-8 As shown, the implementation process is as follows: An architectural design institute undertook a project to digitize and integrate the plumbing and drainage drawings of a residential building. The project, numbered PRJ-A, involved processing the grid layout and detailed plumbing and drainage drawings for the three floors. The grid layout included a complete grid coordinate system and outline data for each unit and room. The detailed plumbing and drainage drawings contained professional information such as water supply and drainage pipes, valves, and fittings in the bathrooms, but did not include grid coordinates. The system needed to automatically and accurately map the pipe lines and components identified in the detailed plumbing drawings to their corresponding positions on the grid layout, generating an integrated grid plan.
[0054] The system reads the individual project identifiers from the drawing database and filters out the grid location map (floor number 3F) and water supply and drainage detail drawing (which can be on the same floor 3F or a detail drawing describing information across floors) for project number PRJ-A as paired inputs for subsequent processing. The grid location map contains grid information, unit outlines, and room outlines; the detail drawing contains unit information, bathroom room information, and coordinate data of water supply and drainage pipe lines and components.
[0055] Table 1. Results of Drawing Data Filtering
[0056] The system first performs matching at the apartment type level. It extracts the outline segments of the source apartment type HT-S01 from the detailed drawing and extracts the outline segments of the candidate target apartment type from the grid positioning drawing. It compares the number of segments and the ratio of the length of each segment to determine the matching apartment type pair (HT-S01 corresponds to HT-T01).
[0057] Within the matched apartment layouts, the system matches the bathroom rooms. In the detailed drawing, the outline of the source bathroom ROOM-S01 consists of 6 line segments, and the lengths of each line segment are sorted to form a length sequence; in the grid positioning drawing, the target bathroom ROOM-T01 also consists of 6 line segments, and the ratio of the lengths of each corresponding line segment is calculated.
[0058] Table 2 Room outline line segment matching data
[0059] The length ratio of all 6 line segments is 2.000, which falls within the preset ratio range. Therefore, ROOM-S01 and ROOM-T01 are determined to be a successful match, forming a matching room pair (ROOM-S01, ROOM-T01).
[0060] For the matching room pair (ROOM-S01, ROOM-T01), three feature points are extracted from the source room and the target room respectively.
[0061] The source room ROOM-S01 has a total of 6 vertices. The average x-coordinate of each vertex is the x-coordinate of the geometric center, and the average y-coordinate of each vertex is the y-coordinate of the geometric center.
[0062]
[0063] The coordinates of the center point of the source room are The center point corresponding to the average coordinates of each vertex in the target room ROOM-T01 is... .
[0064] There is a door component in the source room ROOM-S01. The coordinates of the center point of the door are obtained from the mean coordinates of its contour vertices. The coordinates of the center point of the door corresponding to the target room ROOM-T01 are: .
[0065] Calculate the distance from each corner point of the source room ROOM-S01 to the center point of the door. Given the Euclidean distance, select the corner point with the largest distance. For example:
[0066] After calculation, corner points The point with the largest Euclidean distance is determined to be the corner point farthest from the door. The corresponding corner point for the target room ROOM-T01 is... .
[0067] Table 3 Feature point pair extraction results
[0068] Before solving, the coordinates of the feature points in both coordinate spaces are normalized using mean normalization based on the range to eliminate differences in the magnitude of the coordinate values. After normalization, the coordinates of the three feature point pairs are substituted into a system of six linear equations to form... The matrix form, for Inverse and the right-hand vector Multiply to obtain the parameter vector After inverse normalization to restore to the original coordinate space, the parameters of the affine transformation matrix are obtained as follows: Table 4. Results of Solving Affine Transformation Matrix Parameters
[0069] The results show that the transformation relationship between the detailed drawing and the grid positioning drawing is a proportional scaling (scaling ratio 0.5) superimposed with a small translation, which is consistent with the conclusion in step 2 that the length ratio of each line segment is 2.000, and the data logic is consistent.
[0070] Using affine transformation matrix Transform the coordinates of the six vertices of the source room ROOM-S01 outline to obtain the transformed room outline polygon. Perform Boolean operations with the target room ROOM-T01 outline polygon to calculate the intersection area. Area of union .
[0071] Using the transformed contour area as The target outline area is Intersection area For example:
[0072]
[0073] At the same time, the same verification is performed on the matching apartment types, at the apartment type level. Two levels If all values are greater than the preset threshold of 0.85, the affine transformation matrix is determined. efficient.
[0074] Table 5. Validity verification results of the affine transformation matrix
[0075] The system stores valid affine transformation matrices. Read the endpoint coordinates of the water supply pipe lines, the endpoint coordinates of the drainage pipe lines, and the positioning coordinates of the valve components to be mapped from the detailed drawing DWG-002, and apply the matrix one by one. Perform transformation calculations to obtain the corresponding coordinates of each element in the coordinate space of the grid positioning diagram, write the transformation results into the grid positioning diagram DWG-001, and generate the integrated grid plan view.
[0076] Table 6 Examples of Coordinate Transformation between Lines and Components
[0077] The coordinates of the transformed pipe lines and valve components are written into the grid positioning diagram and precisely aligned with the corresponding room positions in the grid coordinate system, thus completing the information mapping.
[0078] Throughout the process, data begins with drawing selection and pairing in step 1. In step 2, room outline line segment comparison forms matching room pairs. The line segment length ratios obtained in step 2 (all 2.000) are directly reflected in the matrix parameters (a11=a22=0.500) in step 4, with both mutually verifying each other and ensuring the inherent consistency of the data flow. The coordinates of the three feature points extracted in step 3 directly constitute the input to the linear equation system in step 4. The affine transformation matrix obtained by solving is verified for accuracy through IoU in step 5, and finally applied to all elements to be mapped in step 6, accurately integrating the professional information of the detailed drawings into the grid plan, thus realizing a complete data flow from original scattered drawing data to integrated and positioned drawings.
[0079] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A feature point-based graticule positioning map and large-scale detail map matching method, characterized by, Includes the following steps: Obtain the grid positioning map data and detailed drawing data of the same single project for matching floors. The grid positioning map data includes grid information, unit outline information and room outline information. When the detailed drawing describes cross-floor information, the data therein is applied to the grid positioning map of the target floor. The detailed drawing data includes room information and the lines and components to be mapped. The outlines of each room in the detailed drawing are matched with the outlines of each room in the grid positioning drawing based on the geometric feature similarity of the room outlines to obtain matching room pairs consisting of the source room and the target room. For each matched room pair, three feature points are extracted from the source room and the target room respectively. The three feature points include the center point of the room, the center point of the door, and the corner point farthest from the door. The same type of feature points in the source room and the target room are paired to obtain three feature point pairs. Based on the three feature point pairs, solve the affine transformation matrix from the coordinate space of the detailed drawing to the coordinate space of the grid positioning drawing; The coordinates of each vertex of the source room contour are transformed using the affine transformation matrix, the intersection-union ratio (IUU) between the transformed room contour and the target room contour is calculated, and the effectiveness of the affine transformation matrix is determined based on the IUU. The line coordinate data and component coordinate data to be mapped in the detailed drawing are transformed by using an effective affine transformation matrix. The transformed lines and components are written into the grid plan data to generate a grid plan with complete information mapping. Before performing room outline matching, the following is also included: First, preliminary matching is performed using the entrance rooms of the apartment layout. Specifically, the apartment layout outline information and entrance room information are extracted from the detailed drawing data. The apartment layout outline information and corresponding entrance room information are extracted from the grid positioning map data. The entrance rooms in the detailed drawing and the entrance rooms in the grid positioning map are matched based on the geometric feature similarity of the room outlines to obtain the matched entrance room pairs. Based on the matching entrance room pairs, the preliminary affine transformation matrix is solved, and the coordinates of each vertex of the floor plan outline in the detailed drawing are transformed using the preliminary affine transformation matrix to obtain the transformed floor plan outline. Calculate the intersection-union ratio between the transformed apartment layout outline and the target apartment layout outline in the grid positioning map; When the intersection-union ratio is greater than or equal to a preset threshold, the apartment type is determined to be successfully matched, and a matching apartment type pair is obtained.
2. The feature point based graticule positioning map and large scale detail map matching method according to claim 1, characterized in that, The matching based on the geometric feature similarity of the room outline includes: For the source room outline in the detailed drawing, count the number of line segments that make up the source room outline and the length of each line segment; perform the same statistical processing on each candidate target room outline in the grid positioning drawing. The number of line segments in the source room is compared with the number of line segments in each candidate target room, and candidate target rooms with the same number of line segments are selected. In candidate target rooms with the same number of line segments, the length sequence formed by sorting the lengths of each line segment in the source room from largest to smallest is compared one by one with the corresponding length sequence of the candidate target room. The ratio between the lengths of each corresponding line segment is calculated. When the length ratio of all corresponding line segments is within the preset ratio range, the candidate target room is determined to be a successful match with the source room, forming a matched room pair.
3. The feature point based graticule plot matching method with a large scale detail map according to claim 2, characterized in that, The preset ratio range is a constraint interval centered on the scaling ratio between the detailed drawing and the grid positioning drawing. It is used to allow for differences in line segment length scaling caused by different drawing scales. Candidate target rooms that exceed the preset ratio range are judged as mismatched.
4. The feature point based graticule plot matching with large scale detail map method according to claim 1, characterized in that, The extraction methods for the three feature points include: Calculate the arithmetic mean of the coordinates of all vertices of the room outline polygon to obtain the room center point. The mean of the x-coordinates of each vertex is used as the x-coordinate of the room center point, and the mean of the y-coordinates of each vertex is used as the y-coordinate of the room center point. Obtain the position information of the door components in the room, calculate the arithmetic mean of the coordinates of each vertex of the door component outline, and obtain the center point of the door; Calculate the Euclidean distance from each corner point of the room outline to the center point of the door, and select the corner point with the largest Euclidean distance as the corner point farthest from the door.
5. The method for matching a grid positioning map and a detailed drawing based on feature points according to claim 4, characterized in that, When there are multiple door components in a room, calculate the distance from the geometric center coordinates of each door component to the center point of the room, and select the geometric center coordinates of the door component closest to the center point of the room as the door center point.
6. The method for matching a grid positioning map and a detailed drawing based on feature points according to claim 1, characterized in that, Solving for the affine transformation matrix includes: Before solving the affine transformation matrix, the coordinates of feature points in the large-scale detailed drawing coordinate space and the coordinates of feature points in the grid positioning drawing coordinate space are subjected to mean normalization based on the range, so that the coordinate values in the two coordinate spaces are uniformly scaled to the same range. Substituting the coordinates of the source room feature point and the corresponding target room feature point into the affine transformation relation, a six-variable linear equation system containing six unknown parameters is formed. The six unknown parameters include four linear transformation parameters and two translation parameters. The six-variable linear equation system is expressed as a matrix form in which the product of the coefficient matrix and the parameter vector to be solved is equal to the vector on the right. By inverting the coefficient matrix and multiplying it by the vector on the right, all six parameter values of the affine transformation matrix are obtained. After the affine transformation matrix is solved, the parameters of the affine transformation matrix are restored to the original coordinate space through inverse transformation.
7. The method for matching a grid positioning map and a detailed drawing based on feature points according to claim 1, characterized in that, The validity of an affine transformation matrix is determined based on the intersection-union ratio, including: The intersection-union ratio is the ratio of the area of the intersection region of the transformed room outline and the target room outline to the area of the union region, wherein the area of the union region is equal to the sum of the areas of the two outline polygons minus the area of the intersection region. When the intersection-union ratio is greater than or equal to a preset threshold, the affine transformation matrix is determined to be valid; when the intersection-union ratio is less than the preset threshold, the affine transformation matrix is determined to be invalid, and the affine transformation matrix corresponding to the matched room pair is discarded.
8. The method for matching a grid positioning map and a detailed drawing based on feature points according to claim 4, characterized in that, Verifying the validity of the affine transformation matrix also includes: The coordinates of each vertex of the source house outline are transformed using the affine transformation matrix to obtain the transformed house outline. Calculate the intersection-union ratio (IUU) between the transformed floor plan outline and the target floor plan outline; When the cross-union ratio at the room level and the cross-union ratio at the apartment type level are both greater than or equal to their respective preset thresholds, the affine transformation matrix is determined to be valid.
9. A system for matching grid positioning diagrams and detailed drawings based on feature points, used to execute the method for matching grid positioning diagrams and detailed drawings based on feature points as described in any one of claims 1 to 8, characterized in that, include: The data acquisition module is used to acquire the grid positioning map data and detailed drawing data of the floors matching the same single project. The grid positioning map data includes grid information, unit outline information and room outline information. When the detailed drawing describes cross-floor information, the data therein is applied to the grid positioning map of the target floor. The detailed drawing data includes room information and the lines and components to be mapped. The room matching module is used to match the outlines of each room in the detailed drawing with the outlines of each room in the grid positioning drawing based on the similarity of the geometric features of the room outlines, and obtain matching room pairs consisting of the source room and the target room. The feature point extraction module is used to extract three feature points from the source room and the target room for each matched room pair. The three feature points include the center point of the room, the center point of the door, and the corner point farthest from the door. The same type of feature points in the source room and the target room are paired to obtain three feature point pairs. The affine transformation solution module is used to solve the affine transformation matrix from the coordinate space of the detailed drawing to the coordinate space of the grid positioning drawing based on the three feature point pairs. The validity verification module is used to transform the coordinates of each vertex of the source room contour using the affine transformation matrix, calculate the intersection-union ratio between the transformed room contour and the target room contour, and determine the validity of the affine transformation matrix based on the intersection-union ratio. The information mapping module is used to transform the line coordinate data and component coordinate data to be mapped in the detailed drawing using an effective affine transformation matrix, and write the transformed lines and components into the grid plan view data to generate the grid plan view with complete information mapping.
Citation Information
Patent Citations
Method for quickly recommending similar house types based on house type contours and distribution characteristics
CN113946900A
Building component attribute matching method and system based on BIM
CN120805259A