CN-122023107-A - Irregular three-dimensional model outline extraction and angle calculation method applied to engineering model automatic aesthetic-drawing process
Abstract
The invention provides an irregular three-dimensional model outline extraction and angle calculation method applied to an automatic drawing inspection process of an engineering model, which belongs to the technical field of image processing and comprises the following steps of S1, conducting grid subdivision on a three-dimensional model needing to participate in automatic drawing inspection to obtain a projected polygon; S2, performing spatial union operation on projected polygons to obtain a union result, selecting a polygon unit with the largest area as a main plane contour, S3, performing morphological closing processing on the main plane contour once by adaptively calculating the radius r of the element, S4, counting the side lengths of each side of an external contour map after morphological closing, calculating a tolerance threshold value tol, executing a polygon simplification algorithm according to the tolerance threshold value tol, and S5, calculating angles of contour line corners in the simplified contour map. According to the method, details such as complex points can be optimized while contours can be automatically extracted based on element radius and buffer coefficients through self-adaptive parameter calculation logic.
Inventors
- Xiang Tianbing
- MENG QINGXIANG
- HE ZIJIE
- SHI XUECHEN
- YANG XIAOLONG
- WANG SHU
- XIE LIANGFU
- ZHANG JIUCHANG
- YANG SHU
- WANG YI
Assignees
- 中国电建集团昆明勘测设计研究院有限公司
- 河海大学
- 云南民族大学
- 新疆大学
Dates
- Publication Date
- 20260512
- Application Date
- 20251105
Claims (4)
- 1. The method for extracting the outline of the irregular three-dimensional model and calculating the angle is applied to the automatic aesthetic-drawing process of the engineering model and is characterized by comprising the following steps: S1, mesh subdivision is carried out on a three-dimensional model which needs to participate in automatic drawing, and the mesh subdivision is projected to a two-dimensional plane to obtain a projected polygon; s2, performing space union operation on the projected polygons to obtain union results, wherein the union results comprise a plurality of discrete polygon units, and the polygon unit with the largest area is selected as a main plane contour; s3, adaptively calculating the element radius r, and performing morphological closing processing on the main plane outline once, wherein the method specifically comprises the following steps of: s3.1, adaptively calculating the radius r of the element, and specifically comprising the following steps: S3.1.1 counting the side lengths of the sides of the polygonal unit with the largest area, and setting up a side length set A by sequencing the side lengths of the T sides from small to large on the assumption that the total T sides are provided; The formula is: A={D 1 、D 2 、……、D g 、……、D T } Wherein D g represents the length of the g-th side; s3.1.2 obtaining the length of the edge at the 90 th percentile, which is marked as L 90% , and calculating the element radius r according to the length L 90% of the edge at the 90 th percentile and the buffer coefficient BUFF, wherein the formula is as follows: r=L 90% ×BUFF Wherein r represents a radius of the element, BUFF represents a buffer coefficient; S3.2, performing expansion operation on the main plane outline by taking the element radius r as a distance to obtain an expanded plane diagram, and performing corrosion operation on the expanded plane diagram by taking the element radius r as a distance to finish morphological closing treatment to obtain an outline diagram after morphological closing; s4, counting the side lengths of each side of the outline graph after the shape is closed, calculating a tolerance threshold value top, and executing a Douglas-Peucker polygon simplification algorithm according to the tolerance threshold value top; s5, calculating angles of contour line corners in the simplified contour diagram.
- 2. The method for extracting the outline of the irregular three-dimensional model and calculating the angles, which is applied to the automatic aesthetic flow of the engineering model according to claim 1, wherein the step S4 comprises the following steps: s4.1, supposing that the outline map has H sides after the form is closed, sequencing the side lengths of the H sides from small to large, and establishing a side length set X, wherein the expression of X is as follows: X={B 1 、B 2 、……、B C 、……、B H } wherein B C represents the side length of the C-th side; S4.2, obtaining the side length of the 50% percentile, marking as E 50% , and calculating a tolerance threshold tol by combining the simplified parameter SIMP; tol=E 50% ×SIMP Where E 50% represents the side length of the 50% percentile of the side length set X, SIMP represents a reduced parameter, and tol represents a tolerance threshold.
- 3. The method for extracting and calculating the external contour of the irregular three-dimensional model applied to the automatic aesthetic-drawing process of the engineering model according to claim 1, wherein the step S5 comprises the following steps: S5.1, sequentially traversing the contour line corners in the simplified contour diagram to obtain coordinates of each corner, and assuming that M corners are all obtained; S5.2, calculating the angle of the h corner, wherein the formula is as follows: ; In the formula, Representing the coordinates of the h-th corner; representing coordinates of an adjacent corner to the left of the h corner; representing the coordinates of the adjacent corner to the right of the h-th corner, Is the angle of the h-th corner.
- 4. The method for extracting and calculating the external contour of the irregular three-dimensional model applied to the automatic aesthetic-drawing process of the engineering model according to claim 1, wherein the step S2 comprises the following steps: S2.1, performing union operation on the projected polygons by adopting a unit_ unio function, wherein the formula is as follows: S=unary_unio(P) Wherein, the unary_ unio represents a union function, S represents a union result, P is a projected polygon set; S2.2, assuming that K polygonal units are totally obtained after the union operation, selecting the polygonal unit with the largest area as a main plane contour, wherein the formula is as follows: J max =max{J 1 、J 2 、……、J F ……、J K } Where J F denotes the area of the F-th polygon element, max { x } denotes the largest polygon element, and J max denotes the largest polygon element as the principal plane contour.
Description
Irregular three-dimensional model outline extraction and angle calculation method applied to engineering model automatic aesthetic-drawing process Technical Field The invention belongs to the technical field of image processing, and particularly relates to an irregular three-dimensional model outline extraction and angle calculation method applied to an automatic drawing inspection process of an engineering model. Background In model examination work in the fields of civil engineering, urban planning and the like, geometric compliance verification (such as whether a building contour exceeds a red line of a land block or whether the distance between the building contour and peripheral facilities reaches the standard) and functional rationality evaluation are carried out by taking a two-dimensional projection contour of a three-dimensional design model as core data support, however, the three-dimensional model in actual engineering often comprises irregular structures such as cornices, special-shaped supports, equipment reserved grooves and the like, and the extraction of the outermost contour always faces technical bottlenecks, namely complex details such as outlier noise points, narrow grooves and slender strips on the surface of the model, so that the distortion or the insufficient stability of a contour extraction result is very easy to cause. In the prior art, some methods for automatic contour extraction, such as an alpha-shape algorithm, are available, but the algorithm has obvious adaptation defects that on one hand, the method needs to manually preset an empirical threshold value of alpha value and the like, but geometric characteristics of different types of models (such as high-rise houses and large-span bridges) have extremely large difference, a fixed threshold value is difficult to adapt to diversified scenes, and the method is contrary to the core requirement of automatic picture inspection 'no manual intervention', on the other hand, the method is highly sensitive to complex details, and the problems of 'mistakenly incorporating noise points into contours', 'missing key concave boundaries', and the like are frequently caused, so that the additional cost of manual correction is increased, and the risk of compliance misjudgment is more likely to be caused by contour deviation. Therefore, the scheme provides an irregular three-dimensional model outer contour extraction and angle calculation algorithm of the depth adaptation engineering model automatic drawing process, which aims to meet the premise of automatic contour extraction and meet the optimization requirement of improving complex details such as outliers, narrow grooves and the like. Disclosure of Invention The invention provides an irregular three-dimensional model outer contour extraction and angle calculation method applied to an automatic drawing process of an engineering model, which aims to optimize details such as complex points and the like while automatically extracting contours. In order to achieve the above object, the present invention provides the following technical matters: the method for extracting the outline of the irregular three-dimensional model and calculating the angles applied to the automatic aesthetic-drawing process of the engineering model comprises the following steps: S1, mesh subdivision is carried out on a three-dimensional model which needs to participate in automatic drawing, and the mesh subdivision is projected to a two-dimensional plane to obtain a projected polygon; s2, performing space union operation on the projected polygons to obtain union results, wherein the union results comprise a plurality of discrete polygon units, and the polygon unit with the largest area is selected as a main plane contour; s3, adaptively calculating the element radius r, and performing morphological closing processing on the main plane outline once, wherein the method specifically comprises the following steps of: s3.1, adaptively calculating the radius r of the element, and specifically comprising the following steps: S3.1.1 counting the side lengths of the sides of the polygonal unit with the largest area, and setting up a side length set A by sequencing the side lengths of the T sides from small to large on the assumption that the total T sides are provided; The formula is: A={D1、D2、……、Dg、……、DT} Wherein D g represents the length of the g-th side; s3.1.2 obtaining the length of the edge at the 90 th percentile, which is marked as L 90%, and calculating the element radius r according to the length L 90% of the edge at the 90 th percentile and the buffer coefficient BUFF, wherein the formula is as follows: r=L90%×BUFF Wherein r represents a radius of the element, BUFF represents a buffer coefficient; S3.2, performing expansion operation on the main plane outline by taking the element radius r as a distance to obtain an expanded plane diagram, and performing corrosion operation on the expanded plane diagram by taking the