CN115481268A - Parallel line wall data identification method, device, equipment and storage medium - Google Patents
Parallel line wall data identification method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115481268A CN115481268A CN202211178874.7A CN202211178874A CN115481268A CN 115481268 A CN115481268 A CN 115481268A CN 202211178874 A CN202211178874 A CN 202211178874A CN 115481268 A CN115481268 A CN 115481268A
- Authority
- CN
- China
- Prior art keywords
- line segment
- data
- line
- wall
- parallel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 239000013598 vector Substances 0.000 claims description 38
- 238000004590 computer program Methods 0.000 claims description 21
- 238000010276 construction Methods 0.000 claims description 20
- 238000010586 diagram Methods 0.000 claims description 20
- 230000008569 process Effects 0.000 claims description 8
- 230000006870 function Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 238000009877 rendering Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/53—Querying
- G06F16/535—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
- G06T2207/10012—Stereo images
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a parallel line wall data identification method, a device, equipment and a storage medium, wherein the method comprises the steps of obtaining a line segment set of a plurality of line segments; constructing a tree line segment set and an index corresponding to the tree line segment set according to the line segment set; selecting an input line segment from the line segment set and searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range; selecting a target line segment which meets the parallel overlapping projection condition with the input line segment from all output line segments, generating initial wall body data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all line segments in the line segment set are selected once; and adding all initial wall data into the wall result set, and merging the overlapped parts in the wall result set to obtain final wall data. The method can reduce the data volume and the data complexity through combination and improve the generation efficiency.
Description
Technical Field
The invention relates to the technical field of architectural vector diagrams, in particular to a parallel line wall data identification method, a device, equipment and a storage medium.
Background
Currently, in a building vector diagram, if a line layer (such as a line of CAD, polyline layer) is a wall layer, the wall line layer data needs to be generated into polygon data that can be used for 3d stereoscopic display. Methods using parallel line detection in CAD drawings have been proposed in the prior art for identifying the Wall's linear data structure group (WAG) that should be generated.
However, the prior art has the following disadvantages: firstly, because the wall generation effect at the junction is not perfect, if the topological structure is constructed by combining the vertexes, the relation between the line and the original direction is actually changed, all the generated data are discrete structures and have overlapped data, and the rendering efficiency is influenced when the data are applied to the project. Secondly, the process of finding parallel lines is slow due to the requirement of matching parallel line relationships of O (n ^ 2) (n is the number of lines). When a large area CAD drawing contains a large amount of linear wall data, it is less time efficient to build a WAG. In addition, when repetitive noise occurs, such as drawing parallel shadows inside a part of a wall, a large number of unnecessary parallel relations are constructed.
In summary, the process of finding parallel lines in the method in the prior art is slow, and a large number of unnecessary parallel relations are constructed, which affects the rendering efficiency.
Disclosure of Invention
The invention provides a parallel line wall data identification method, a parallel line wall data identification device, parallel line wall data identification equipment and a storage medium, which are used for reducing data volume and reducing search range through combination, thereby reducing time complexity and improving generation efficiency.
In a first aspect, to solve the above technical problem, the present invention provides a parallel line wall data identification method, including:
acquiring construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences;
splitting the line segment data to obtain a line segment set comprising a plurality of line segments;
constructing a tree line segment set and an index corresponding to the tree line segment set according to the line segment set;
selecting an input line segment from the line segment set, searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range, and selecting a target line segment which meets parallel overlapping projection conditions with the input line segment from all output line segments;
generating initial wall data according to the input line segments and the target line segments, and returning to the step of selecting one input line segment from the line segment set until all line segments in the line segment set are selected once;
and adding all the initial wall data into a wall result set, and combining the overlapped parts in the wall result set to obtain final wall data.
Preferably, before said combining the overlapping portions of the wall result sets, the method further comprises:
constructing a tree-shaped empty set, and adding short edges in all the initial wall data into the tree-shaped empty set to obtain a short edge tree-shaped set; the short edge is a line segment which is in line with a preset thickness range in the initial wall body data;
when any short edge and other short edges in the short edge tree-shaped set are judged to meet the parallel overlapping projection condition, generating short edge wall data according to the short edge and other short edges;
and adding all the short-edge wall data into a wall result set.
Preferably, the constructing a tree line segment set according to the line segment set includes:
calculating a unit vector of each line segment in the line segment set to obtain line segment direction information; wherein the set of tree line segments includes line segment direction information for each line segment.
Preferably, prior to said computing the unit vector and length of each line segment in the set of line segments, the method further comprises:
acquiring noise line segments in the line segment set, and deleting all the noise line segments; and the lengths of more than 10 continuous line segments are less than 1.5 times of the maximum thickness, and the line segments with the same angle are noise line segments.
Preferably, the line segment parallel relation determining process includes:
when abs (abs (unit (l 1)) -abs (unit (l 2))) < err, judging that the line segment l1 is parallel to the line segment l 2; the unit vector unit (l = [ a, b ]) = vector (b-a)/length (b-a), unit (l 1) and unit (l 2) respectively represent line segment direction information of a line segment l1 and a line segment l2, abs represents an absolute value, and err represents a preset error value.
Preferably, the judging process of the parallel overlapping projection condition includes:
and when the line segment A is parallel to the line segment B, the distance between the line segment A and the line segment B is within the preset wall thickness parameter, and the line segment A' obtained after the line segment A is projected to the straight line where the line segment B is located is intersected and overlapped with the line segment B, judging that the line segment A and the line segment B meet the parallel overlapping projection condition.
In a second aspect, the present invention provides a parallel line wall data identification device, including:
the data acquisition module is used for acquiring construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences;
the data splitting module is used for splitting the line segment data to obtain a line segment set comprising a plurality of line segments;
the set construction module is used for constructing a tree-shaped line segment set and an index corresponding to the tree-shaped line segment set according to the line segment set;
the line segment searching module is used for selecting an input line segment from the line segment set and searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range;
the wall body generation module is used for selecting a target line segment which meets the parallel overlapping projection condition with the input line segment from all the output line segments, generating initial wall body data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all the line segments in the line segment set are selected once;
and the wall body merging module is used for adding all the initial wall body data into a wall body result set, merging the overlapped parts in the wall body result set, and obtaining the final wall body data.
Preferably, the wall generation module is further configured to:
constructing a tree-shaped empty set, and adding short edges in all the initial wall data into the tree-shaped empty set to obtain a short edge tree-shaped set; the short edge is a line segment which is in line with a preset thickness range in the initial wall body data;
when any short edge and other short edges in the short edge tree-shaped set are judged to meet the parallel overlapping projection condition, generating short edge wall data according to the short edge and other short edges;
and adding all the short-edge wall data into a wall result set.
In a third aspect, the present invention also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor executes the computer program to implement the parallel line wall data identification method described in any one of the above.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the parallel line wall data identification method described in any one of the above.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a parallel line wall data identification method, which comprises the steps of obtaining construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences; splitting the line segment data to obtain a line segment set comprising a plurality of line segments; constructing a tree line segment set and an index corresponding to the tree line segment set according to the line segment set; selecting an input line segment from the line segment set and searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range; selecting a target line segment which meets the parallel overlapping projection condition with the input line segment from all the output line segments, generating initial wall body data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all the line segments in the line segment set are selected once; and adding all the initial wall data into a wall result set, and combining the overlapped parts in the wall result set to obtain final wall data. The invention can realize the optimization of the wall effect at the junction, and can reduce the data volume and the data complexity by combination and improve the generation efficiency.
Drawings
FIG. 1 is a schematic flow chart of a parallel line wall data identification method according to a first embodiment of the present invention;
FIG. 2 is a schematic view of construction vector map data;
FIG. 3 is a schematic diagram of a set of line segments;
FIG. 4 is a schematic illustration of another set of line segments;
FIG. 5 is a schematic illustration of the effect of only overlapping projections taken on a line segment without elongation;
FIG. 6 is a schematic illustration of the effect on line segment elongation;
FIG. 7 is a schematic view of parallel overlapping projections;
fig. 8 is a schematic structural diagram of a parallel line wall data identification device according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of the present invention provides a parallel line wall data identification method, including the following steps:
s11, obtaining construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences;
s12, splitting the line segment data to obtain a line segment set comprising a plurality of line segments;
s13, constructing a tree-shaped line segment set and an index corresponding to the tree-shaped line segment set according to the line segment set;
s14, selecting an input line segment from the line segment set, searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range, and selecting a target line segment which meets a parallel overlapping projection condition with the input line segment from all output line segments;
s15, generating initial wall data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all line segments in the line segment set are selected once;
and S16, adding all the initial wall data into a wall result set, and combining the overlapped parts in the wall result set to obtain final wall data.
In step S11, building vector map data is acquired and analyzed to obtain a plurality of line segment data of not less than two vertex sequences. Referring to fig. 2, in general, layers of building vector map data are made up of discrete line segments, each line segment generally having more than two vertices, e.g., polyline abc represents a polyline from a to b to c.
In step S12, the line segment data is split to obtain a line segment set including a plurality of line segments. Wherein each line segment in the set of line segments has only two vertices. Because parallel lines need to compare the relationship between two segments with only two vertexes, data needs to be disassembled into an effective segment set with only two points, for example, the original segment abcdefg in fig. 3 is disassembled into 7 segments ab, bc, cd, de, ef, fg, gh.
In step S13, constructing a tree line segment set and an index corresponding to the tree line segment set according to the line segment set, including:
calculating the unit vector of each line segment in the line segment set to obtain the direction information of the line segment; wherein the set of tree line segments includes line segment direction information for each line segment.
The judging process of the line segment parallel relation comprises the following steps:
when abs (abs (unit (l 1)) -abs (unit (l 2))) < err, judging that the line segment l1 is parallel to the line segment l 2; the unit vector unit (l = [ a, b ]) = vector (b-a)/length (b-a), unit (l 1) and unit (l 2) respectively represent line segment direction information of a line segment l1 and a line segment l2, abs represents an absolute value, and err represents a preset error value.
In the present invention, it is necessary to compare the relationship between lines. However, it is not possible to create a wall between two too far data, wasting computation time. Firstly, the search efficiency of the lifting line can be divided by using an R-tree, each line is only close to the lifting line by detection, the range of the R-tree is within the wall thickness and the time complexity O (nlogn), and the comparison of two line segments (O (n ^ 2)) is not needed. By calculating the line segment angle in advance, the time for calculating the parallel relation of the line segments can be saved. When the parallel relation between the lines is matched, the unit vectors of the line segments can be used for matching, and whether the two line segments are parallel or not can be judged by comparing the x values of the unit vectors. Illustratively, vector of line segments [ [10,10], [20,20] ] = [20-10,20-10], length = sqrt (10 ^2+10^ 2) then its unit vector is [0.707,0,707]. At the same time, the error value needs to be controlled: if err =0.02, the absolute value of x of the unit vector + err, -err can be determined when determining the segment parallel relationship, and the x values of 0.705-0.709, -0.709-0.705 are all consistent with being parallel to the segment. Because the parallel relation of the line segments needs to be calculated back and forth in the program, a large amount of repeated work can be reduced by extracting and storing, and the corresponding unit vector can be returned during rtree search, so that the parallel relation with other line segments can be conveniently calculated.
In one embodiment, before said constructing a tree-like set of line segments according to said line-parallel relationship, said method further comprises:
acquiring noise line segments in the line segment set, and deleting all the noise line segments; and the lengths of more than 10 continuous line segments are less than 1.5 times of the maximum thickness, and the line segments with the same angle are noise line segments.
In specific implementation, because CAD plotters do not have uniform drawing standards, some drawings adopt continuous parallel short line shading in a wall body to represent that the wall body is hollow, and the generation efficiency of the data structure can be influenced to a certain degree. The data can be collectively drawn, and the data are collectively judged as noise by utilizing the characteristics of similar length and same direction. Illustratively, before data is input into rtree and the angles of the line segments are calculated in advance, the lengths of the line segments can be recorded simultaneously, and the line segments with the length being less than 1.5 times of the maximum thickness and the same angle are used as judgment noise line segments.
In step S14, an input line segment is selected from the line segment set and searched with the input line segment as a center, so as to obtain all output line segments having a distance from the input line segment within a preset thickness range, and a target line segment satisfying a parallel overlapping projection condition with the input line segment is selected from all output line segments.
In searching rtree, it is desirable to search for all other line segments that are within the wall thickness from the input line segment. As shown in FIG. 6, assume that it is desired to search all other line segments within the ab wall thickness range. In rtree, ab has aibk as the search box, and cannot search only this range, for example, the search box fiif (the search box of the vertical line is very small) of the line fi is not in this search box, but actually the line fi is less than the wall thickness from ab. Therefore, the search box of each line needs to be enlarged, and a thickness parameter is added to the positive and negative x-axis directions and the y-axis directions of each line. As shown in FIG. 4, the thickness search box for ab is: ghij.
In a specific implementation, as shown in fig. 6, if the two line segments do not have the same direction, one line is inverted, and for example, if the input data is ac and fe, the inverted fe is ef. Then projecting one edge onto the line on which the other edge lies (where ac is projected to ed); viewing the distance between the projection line and the two ends of the other line: if the projection points are the same, no change is needed (e.g. a is projected to e); if the distance is greater than the maximum thickness, no change is required; if the distance is less than or equal to the maximum thickness, the data of the shorter side is extended to another projection point (if c is projected to d, ef is extended to ed, if f is projected to b or ef is extended to project the extended point d to c), and the extended part of the mutual projection between the two lines is taken as wall data (here, aecc).
In step S15, initial wall data is generated according to the input line segment and the target line segment, and the step of selecting one input line segment from the line segment set is returned until all line segments in the line segment set are selected once.
Wherein, the judgment process of the parallel overlapping projection condition comprises the following steps:
and when the line segment A is parallel to the line segment B, the distance between the line segment A and the line segment B is within the preset wall thickness parameter, and the line segment A' obtained after the line segment A is projected to the straight line where the line segment B is located is intersected and overlapped with the line segment B, judging that the line segment A and the line segment B meet the parallel overlapping projection condition.
Assuming that there are two lines AB, they are defined as parallel overlapping projections if they meet the following condition:
1) A is parallel to B;
2) A' obtained by projecting A to a straight line (two vertexes are respectively vertically projected) where B is located is intersected and overlapped with B;
3) The distance between the two adjacent plates AB is within the thickness parameter of the wall body;
as shown in fig. 7, assuming ac parallel dg parallel hj, the thickness parameter is not discussed first. The parallel overlapping projections of ac and dg are because the projection of ac on dg is that df intersects dg. ac and eg are projected in parallel and overlapped, because ac is projected on the line dg of eg as if df intersects eg. Similarly, ac and hj are projected in parallel. ab and fg do not overlap in parallel because ab projects on the line dg of eg such that de does not intersect fg. Similarly, ab and ij are projected in a non-parallel overlapping manner, and ac and fg are projected in a non-parallel overlapping manner, because ac is projected on the line dg of eg as if df intersects fg without overlapping portion. Similarly, ac and ij do not overlap the projection in parallel.
Then, considering the thickness parameter, assuming that the distance be between ac and dg is epsilon and the distance eh between hj and dg is epsilon, and assuming that the preset wall thickness parameter is 1/2 epsilon to 3/2 epsilon, considering that the distance 2 epsilon between ac and hj does not accord with the thickness parameter, and then overlapping and projecting the ac and hj in a nonparallel manner.
In a specific application, the thickness parameter ranges from 0 to 0.4 meters, which can satisfy the indoor conditions of most CAD drawings. According to different scenes, defining a partial range of the wall thickness parameter of 0.01 m to 10 m.
In step S16, all the initial wall data are added to a wall result set, and the overlapping portions in the wall result set are merged to obtain final wall data. In order to improve rendering efficiency and reduce data size, the generated data needs to be merged, and polygons may be merged by using a Polygon collision data calculation method.
Further, prior to the merging overlapping portions of the wall result sets, the method further comprises:
constructing a tree-shaped empty set, and adding short edges in all the initial wall data into the tree-shaped empty set to obtain a short edge tree-shaped set; the short edge is a line segment which is in line with a preset thickness range in the initial wall body data;
when any short edge and other short edges in the short edge tree-shaped set meet the parallel overlapping projection condition, generating short edge wall data according to the short edge and other short edges;
and adding all the short-edge wall data into a wall result set.
It should be noted that some walls with length and width smaller than the thickness cannot be described by two parallel lines. As shown in FIG. 4, only one side ij of the rectangle gijd is actually present in the input data, but the resulting data rectangle haig and the pair of parallel lines gi-dj present in the rectangle djbc can describe the desired rectangle. Therefore, each time a rectangle is added, it is necessary to detect the short side (smaller than the thickness) of the rectangle and compare the short side with the short sides of other generated rectangles to check whether there is another line segment which can be projected in parallel and has a length smaller than the thickness in the thickness range. The existence adds rectangles generated by them with length and width smaller than the thickness. To ensure efficiency, all edges generated that are less than the thickness may be stored in rtree.
The invention provides a parallel line wall data identification method, which comprises the steps of obtaining construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences; splitting the line segment data to obtain a line segment set comprising a plurality of line segments; constructing a tree line segment set and an index corresponding to the tree line segment set according to the line segment set; selecting an input line segment from the line segment set and searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range; selecting a target line segment which meets the parallel overlapping projection condition with the input line segment from all the output line segments, generating initial wall body data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all the line segments in the line segment set are selected once; and adding all the initial wall data into a wall result set, and combining the overlapped parts in the wall result set to obtain final wall data. The invention can realize the optimization of the wall effect at the junction, and can reduce the data volume and the data complexity by combination and improve the generation efficiency.
Referring to fig. 8, a second embodiment of the present invention provides a parallel line wall data identification apparatus, including:
the data acquisition module is used for acquiring construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences;
the data splitting module is used for splitting the line segment data to obtain a line segment set comprising a plurality of line segments;
the set construction module is used for constructing a tree-shaped line segment set and an index corresponding to the tree-shaped line segment set according to the line segment set;
the line segment searching module is used for selecting an input line segment from the line segment set and searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range, and selecting a target line segment which meets the parallel overlapping projection condition with the input line segment from all output line segments;
the wall generation module is used for generating initial wall data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all line segments in the line segment set are selected once;
and the wall body merging module is used for adding all the initial wall body data into a wall body result set and merging the overlapped parts in the wall body result set to obtain final wall body data.
Preferably, the wall generation module is further configured to:
constructing a tree-shaped empty set, and adding short edges in all the initial wall data into the tree-shaped empty set to obtain a short edge tree-shaped set; the short edge is a line segment which is in line with a preset thickness range in the initial wall body data;
when any short edge and other short edges in the short edge tree-shaped set are judged to meet the parallel overlapping projection condition, generating short edge wall data according to the short edge and other short edges;
and adding all the short-edge wall data into a wall result set.
It should be noted that, the parallel line wall data identification device provided in the embodiment of the present invention is used for executing all the process steps of the parallel line wall data identification method in the above embodiment, and the working principles and beneficial effects of the two are in one-to-one correspondence, so that no further description is given.
The embodiment of the invention also provides the terminal equipment. The terminal device includes: a processor, a memory, and a computer program, such as a parallel line wall data identification program, stored in the memory and executable on the processor. When the processor executes the computer program, the steps in each embodiment of the parallel line wall data identification method described above are implemented, for example, step S11 shown in fig. 1. Alternatively, the processor implements the functions of the modules/units in the above device embodiments when executing the computer program, such as a data acquisition module.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the terminal device.
The terminal device can be a desktop computer, a notebook, a palm computer, an intelligent tablet and other computing devices. The terminal device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the above components are merely examples of a terminal device and do not constitute a limitation of a terminal device, and that more or fewer components than those described above may be included, or certain components may be combined, or different components may be included, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal device and connects the various parts of the whole terminal device using various interfaces and lines.
The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the terminal device integrated module/unit can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.
Claims (10)
1. A parallel line wall data identification method is characterized by comprising the following steps:
acquiring construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences;
splitting the line segment data to obtain a line segment set comprising a plurality of line segments;
constructing a tree line segment set and an index corresponding to the tree line segment set according to the line segment set;
selecting an input line segment from the line segment set, searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range, and selecting a target line segment which meets parallel overlapping projection conditions with the input line segment from all output line segments;
generating initial wall data according to the input line segment and the target line segment, and returning to the step of selecting one input line segment from the line segment set until all line segments in the line segment set are selected once;
and adding all the initial wall data into a wall result set, and combining the overlapped parts in the wall result set to obtain final wall data.
2. The method of claim 1, wherein prior to said merging overlapping portions of said wall result set, said method further comprises:
constructing a tree-shaped empty set, and adding short edges in all the initial wall data into the tree-shaped empty set to obtain a short edge tree-shaped set; the short edge is a line segment which is in line with a preset thickness range in the initial wall body data;
when any short edge and other short edges in the short edge tree-shaped set are judged to meet the parallel overlapping projection condition, generating short edge wall data according to the short edge and other short edges;
and adding all the short-edge wall data into a wall result set.
3. The method of claim 1, wherein said constructing a tree-like collection of line segments from said collection of line segments comprises:
calculating a unit vector of each line segment in the line segment set to obtain line segment direction information; wherein the set of tree line segments includes line segment direction information for each line segment.
4. The method of claim 3, wherein prior to said computing the unit vector and length for each line segment in the set of line segments, the method further comprises:
acquiring noise line segments in the line segment set, and deleting all the noise line segments; and the lengths of more than 10 continuous line segments are less than 1.5 times of the maximum thickness, and the line segments with the same angle are noise line segments.
5. The parallel line wall data identification method of claim 3, wherein the line segment parallel relationship determination process comprises:
when abs (abs (unit (l 1)) -abs (unit (l 2))) < err, judging that the line segment l1 is parallel to the line segment l 2; the unit vector unit (l = [ a, b ]) = vector (b-a)/length (b-a), unit (l 1) and unit (l 2) respectively represent line segment direction information of a line segment l1 and a line segment l2, abs represents an absolute value, and err represents a preset error value.
6. The parallel line wall data identification method of claim 1, wherein the determination of the parallel overlapping projection condition comprises:
and when the line segment A is parallel to the line segment B, the distance between the line segment A and the line segment B is within the preset wall thickness parameter, and the line segment A' obtained after the line segment A is projected to the straight line where the line segment B is located is intersected and overlapped with the line segment B, judging that the line segment A and the line segment B meet the parallel overlapping projection condition.
7. A parallel line wall data recognition device, comprising:
the data acquisition module is used for acquiring construction vector diagram data and analyzing the construction vector diagram data to obtain a plurality of line segment data of not less than two vertex sequences;
the data splitting module is used for splitting the line segment data to obtain a line segment set comprising a plurality of line segments;
the set construction module is used for constructing a tree-shaped line segment set and an index corresponding to the tree-shaped line segment set according to the line segment set;
the line segment searching module is used for selecting an input line segment from the line segment set and searching by taking the input line segment as a center to obtain all output line segments with the distance from the input line segment within a preset thickness range, and selecting a target line segment meeting parallel overlapping projection conditions with the input line segment from all output line segments;
the wall generation module is used for generating initial wall data according to the input line segment and the target line segment and returning to the step of selecting one input line segment from the line segment set until all line segments in the line segment set are selected once;
and the wall body merging module is used for adding all the initial wall body data into a wall body result set, merging the overlapped parts in the wall body result set, and obtaining the final wall body data.
8. The parallel line wall data identification apparatus of claim 7, wherein the wall generation module is further configured to:
constructing a tree-shaped empty set, and adding short edges in all the initial wall data into the tree-shaped empty set to obtain a short edge tree-shaped set; the short edge is a line segment which is in line with a preset thickness range in the initial wall body data;
when any short edge and other short edges in the short edge tree-shaped set are judged to meet the parallel overlapping projection condition, generating short edge wall data according to the short edge and other short edges;
and adding all the short-edge wall data into a wall result set.
9. A terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the parallel line wall data identification method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the parallel line wall data identification method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211178874.7A CN115481268A (en) | 2022-09-27 | 2022-09-27 | Parallel line wall data identification method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211178874.7A CN115481268A (en) | 2022-09-27 | 2022-09-27 | Parallel line wall data identification method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115481268A true CN115481268A (en) | 2022-12-16 |
Family
ID=84394780
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211178874.7A Pending CN115481268A (en) | 2022-09-27 | 2022-09-27 | Parallel line wall data identification method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115481268A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117473633A (en) * | 2023-12-26 | 2024-01-30 | 合肥坤颐建筑科技合伙企业(有限合伙) | Shaft network generation method, device, equipment and storage medium |
-
2022
- 2022-09-27 CN CN202211178874.7A patent/CN115481268A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117473633A (en) * | 2023-12-26 | 2024-01-30 | 合肥坤颐建筑科技合伙企业(有限合伙) | Shaft network generation method, device, equipment and storage medium |
CN117473633B (en) * | 2023-12-26 | 2024-04-02 | 合肥坤颐建筑科技合伙企业(有限合伙) | Shaft network generation method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11875513B2 (en) | Self-adaptive point cloud stripe division method | |
CN113724401B (en) | Three-dimensional model cutting method and device, computer equipment and storage medium | |
CN112241565A (en) | Modeling method and related device | |
US8249392B2 (en) | Method for aligning point clouds | |
KR20230145197A (en) | Methods, devices, computer devices and storage media for determining spatial relationships | |
CN115481268A (en) | Parallel line wall data identification method, device, equipment and storage medium | |
CN116227209A (en) | Multi-dimensional linear difference method for point cloud data, terminal equipment and storage medium | |
Strodthoff et al. | Automatic decomposition of 3D solids into contractible pieces using Reeb graphs | |
CN116310060B (en) | Method, device, equipment and storage medium for rendering data | |
CN113034515A (en) | Bounding box tree-based polygon clipping method, electronic device and storage medium | |
CN110211227B (en) | Three-dimensional scene data processing method and device and terminal equipment | |
US20230048643A1 (en) | High-Precision Map Construction Method, Apparatus and Electronic Device | |
Rahim et al. | Evaluation of adaptive subdivision method on mobile device | |
CN115909009A (en) | Image recognition method, image recognition device, storage medium and electronic equipment | |
CN110750847B (en) | Method, device, equipment and medium for determining grid segmentation relation | |
CN115482310A (en) | Room data generation method, device, equipment and medium based on building vector diagram | |
CN113297340B (en) | Vectorization method and device for point cloud map and method and device for converting vector map into point cloud map | |
CN115690120B (en) | Method, apparatus, device, medium and program product for generating three-dimensional grid | |
CN112464753B (en) | Method and device for detecting key points in image and terminal equipment | |
Kim et al. | 3D binary morphological operations using run-length representation | |
Coll et al. | Adaptive simplification of huge sets of terrain grid data for geosciences applications | |
CN116226426B (en) | Three-dimensional model retrieval method based on shape, computer device and storage medium | |
CN117633973A (en) | CAD file identification method, device, electronic equipment and storage medium | |
CN115984425A (en) | OpenGL-based method and system for linkage drawing and editing of flat section diagram | |
CN114119708A (en) | Method and device for generating tree structure, computing equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |