CN115482310A - Room data generation method, device, equipment and medium based on building vector diagram - Google Patents
Room data generation method, device, equipment and medium based on building vector diagram Download PDFInfo
- Publication number
- CN115482310A CN115482310A CN202211178786.7A CN202211178786A CN115482310A CN 115482310 A CN115482310 A CN 115482310A CN 202211178786 A CN202211178786 A CN 202211178786A CN 115482310 A CN115482310 A CN 115482310A
- Authority
- CN
- China
- Prior art keywords
- data
- line
- line segment
- discrete
- point
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
-
- 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
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/181—Segmentation; Edge detection involving edge growing; involving edge linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/04—Indexing scheme for image data processing or generation, in general involving 3D image data
-
- 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)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Remote Sensing (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a room data generation method, a device, equipment and a medium based on a building vector diagram, wherein the method comprises the steps of obtaining building vector diagram data and wall linear data according to the building vector diagram data; door data are generated according to the wall linear data, preset wall thickness parameters and the door maximum length, and a line data set is constructed according to the door data and the wall linear data; decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set; obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and a discrete point set; determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of which the side length in each closed contour line is greater than the diameter of the circle; and restoring according to all the vertexes to obtain the room polygon. The method can generate room data through the wall linear data, and does not need to analyze accurate door information to fill the wall interval.
Description
Technical Field
The invention relates to the technical field of building vector diagrams, in particular to a room data generation method, a room data generation device, room data generation equipment and room data generation media based on a building vector diagram.
Background
At present, a traditional 3d map room is generally formed by manually drawing a polygonal room and converting the polygonal room into 3d stereo data, so that a large amount of labor cost is wasted, the time for drawing the map is long, and errors are easy to exist due to manual drawing. However, in the method for identifying the room by the wall, the idea of restoring the room through the wall data is provided, but the method needs to analyze accurate door, column and window information so as to fill up the wall interval and obtain closed room polygon data. Typically, the door is arc data, and needs to be parsed into wall-filled wall data intervals that conform to the surrounding environment, and some areas without doors will be merged into other rooms or aisles. However, the room generation process is susceptible to corners such as pillars, and seamless structure data is difficult to obtain, which does not meet practical requirements.
Disclosure of Invention
The invention provides a room data generation method, a room data generation device, room data generation equipment and a room data generation medium based on a building vector diagram, so that room data can be generated through wall linear data, and wall intervals do not need to be filled with door information accurately analyzed.
In order to solve the above technical problem, the present invention provides a room data generating method based on a building vector diagram, including:
obtaining building vector diagram data, and obtaining wall linear data according to the building vector diagram data;
generating door data according to the wall linear data, preset wall thickness parameters and door maximum length, and constructing a line data set according to the door data and the wall linear data;
decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set;
obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set;
determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of each closed contour line with the side length larger than the diameter of the circle;
and restoring according to all the vertexes to obtain a room polygon.
Preferably, the generating door data according to the wall linear data, the preset wall thickness parameter and the door maximum length, and constructing a line data set according to the door data and the wall linear data includes:
traversing all edges of the wall linear data, converting each edge of the wall linear data into a two-point discrete line segment, and storing the two-point discrete line segment into a line segment group;
traversing the line segment group, selecting an input line segment within a preset thickness range from the line segment group, 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 gate width;
selecting a target line segment which meets the parallel overlapping projection condition with the input line segment and has the distance smaller than the maximum length of the door from all the output line segments, generating door data according to the input line segment and the target line segment, and constructing a line data set according to the door data and the wall linear data.
Preferably, decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set includes:
splitting the line data set into a line segment set consisting of two discrete points;
uniformly sampling on each line segment in the line segment set according to a preset sampling density to obtain point data;
and constructing a discrete point set according to all the point data and the head point and the tail point of each line segment.
Preferably, the determining the vertex of the closed contour line according to the valid edge in the closed contour line includes:
when the number of the effective edges in any one closed contour line is more than 3, determining the closed contour line as an effective polygon;
carrying out extension operation on every two adjacent effective edges in the effective polygon to obtain an effective edge extension line;
and determining the intersection point of the extension lines of two adjacent effective edges as the vertex of the closed contour line.
Preferably, the method further comprises:
and when any two room polygons are overlapped, deleting the polygon which is overlapped with the wall or door data in the two room polygons.
In a second aspect, the present invention provides a room data generating apparatus based on a building vector diagram, including:
the data acquisition module is used for acquiring the building vector diagram data and acquiring wall linear data according to the building vector diagram data;
the line set generating module is used for generating door data according to the wall linear data, preset wall thickness parameters and door maximum length, and constructing a line data set according to the door data and the wall linear data;
the vertex sampling module is used for decomposing the line data set into discrete line segments and carrying out point sampling on the discrete line segments to obtain a discrete point set;
the contour generation module is used for obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set;
the vertex determining module is used for determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of each closed contour line with the side length larger than the diameter of the circle;
and the room generating module is used for restoring according to all the vertexes to obtain a room polygon.
Preferably, the line set generating module includes:
the line segment generation unit is used for traversing all edges of the wall linear data, converting each edge of the wall linear data into a two-point discrete line segment and storing the two-point discrete line segment into a line segment group;
the traversal search unit is used for traversing the line segment group, selecting an input line segment within a preset thickness range from the line segment group 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 gate width;
and the line set generating unit is used for selecting a target line segment which meets the parallel overlapping projection condition with the input line segment and has a distance smaller than the maximum length of the gate from all the output line segments, generating gate data according to the input line segment and the target line segment, and constructing a line data set according to the gate data and the wall linear data.
Preferably, the vertex sampling module includes:
the array splitting unit is used for splitting the line data set into a line segment set consisting of two discrete points;
the point sampling unit is used for uniformly sampling each line segment in the line segment set according to a preset sampling density to obtain point data;
and the set construction unit is used for constructing a discrete point set according to all the point data and the head point and the tail point of each line segment.
In a third aspect, the present invention further 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, and when the processor executes the computer program, the processor implements the building vector diagram-based room data generation 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, where the computer program, when running, controls an apparatus on which the computer-readable storage medium is located to execute any one of the above-mentioned room data generation methods based on the building vector diagram.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a room data generation method based on a building vector diagram, which comprises the steps of obtaining building vector diagram data and obtaining wall linear data according to the building vector diagram data; according to the wall linear data, the preset wall thickness parameter and the maximum door length, efficiency optimization can be carried out by combining a short edge with a spatial data index Rtree, a polygonal array of door data is generated, and a line data set containing the door data is constructed by combining the original wall linear data; decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set; obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set; determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of each closed contour line with the side length larger than the diameter of the circle; and restoring according to all the vertexes to obtain a room polygon. According to the invention, the closed contour line of the room is constructed by utilizing the alphaShape (rolling sphere method), the polygon of the room is restored through the scattered points of the contour, the wall interval is filled without analyzing accurate door information in the whole process, the influence of the pillars and the corners is less, and the actual requirements are met better.
Drawings
Fig. 1 is a schematic flow chart of a room data generation method based on a building vector diagram according to a first embodiment of the present invention;
FIG. 2 is a schematic view of parallel overlapping projections;
FIG. 3 is a schematic representation of wall line data;
FIG. 4 is a schematic diagram of a line data set after gate data is generated;
FIG. 5 is a schematic diagram of a set of discrete points;
FIG. 6 is a schematic illustration of a generated closed contour and its edge point data;
FIG. 7 is an overall schematic view of a room polygon;
fig. 8 is a schematic structural diagram of a room data generating device based on a building vector diagram 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 room data generating method based on a building vector diagram, including the following steps:
s11, obtaining construction vector diagram data, and obtaining wall linear data according to the construction vector diagram data;
s12, door data are generated according to the wall linear data, preset wall thickness parameters and door maximum length, and a line data set is constructed according to the door data and the wall linear data;
s13, decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set;
s14, obtaining a plurality of closed contour lines based on a rolling ball method according to a preset circle diameter and the discrete point set;
s15, determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of each closed contour line with the side length larger than the diameter of the circle;
and S16, restoring according to all the vertexes to obtain a room polygon.
In step S11, building vector image data is acquired, and wall linear data is obtained from the building vector image data. The wall linear data comprise wall polygons or wall polygonal sidelines.
It should be noted that, in the present invention, room data is generated through a wall, after building vector diagram data (such as CAD data) is obtained, wall line data can be generally directly obtained from a wall data layer, some CAD also have wall polygons that are completely drawn, and at this time, side line data of the polygons need to be analyzed. In rare cases, the building vector diagram lacks wall data, and the wall sideline data needs to be drawn manually.
In step S12, door data is generated according to the wall linear data, a preset wall thickness parameter, and a door maximum length, and a line data set is constructed according to the door data and the wall linear data, including:
traversing all edges of the wall linear data, converting each edge of the wall linear data into a two-point discrete line segment, and storing the two-point discrete line segment into a line segment group;
traversing the line segment group, selecting an input line segment within a preset thickness range from the line segment group, 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 gate width;
selecting a target line segment which meets the parallel overlapping projection condition with the input line segment and has a distance smaller than the maximum length of the door from all the output line segments, generating door data according to the input line segment and the target line segment, and constructing a line data set according to the door data and the wall linear data.
In practical applications, a maximum door length parameter of 0.5 to 5 meters can satisfy most CAD drawings indoors. According to different scenes, the maximum length parameter of the door is 0-20 m.
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 of AB is within the thickness parameter of the wall body;
assuming ac parallel dg parallel hj, as shown in fig. 2, 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 particular application, a thickness range parameter of 0.05 to 0.4 meters may be satisfactory for most CAD drawings in-room situations. According to different scenes, the wall thickness parameter is defined to be 0.01 m to 10 m.
Referring to fig. 3 and 4, in step S12, door data is generated, first, all the edges of the wall linear data are traversed to find all the edges smaller than the thickness of the wall, and an R-tree is searched to see whether the edge can be projected in parallel with a nearby edge with a distance smaller than the width of the door to generate a wall. There is no effect if the resulting part is already inside the wall, since this step primarily functions as an enclosure. In the process, rtree can be used to reduce the search amount and reduce the time cost.
In step S13, decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set, including:
splitting the line data set into a line segment set consisting of two discrete points;
uniformly sampling on each line segment in the line segment set according to a preset sampling density to obtain point data;
and constructing a discrete point set according to all the point data and the head point and the tail point of each line segment.
Wherein, the sampling density can directly adopt the wall thickness. In the specific implementation, the polygon is decomposed into discrete lines, then each line is sampled by using points, all the points are put into a set by adding the head and the tail of each line segment to the fixed width between each point, and a discrete point set can be obtained, as shown in fig. 5.
In step S14, a plurality of closed contour lines are obtained based on a rolling sphere method according to a preset circle diameter and the discrete point set.
It should be noted that this step is intended to determine the approximate shape of each room, and AlphaShape can be used to restore the contour. Specifically, a discrete point set is input, the circle diameter of the alpha parameter is controlled to be larger than the distance between discrete points, a plurality of closed curves can be obtained by directly adopting the alpha value with the radius as the sampling distance, and then a plurality of closed contour lines of the room are formed through the closed curves. As shown in fig. 6, the polygon generated by AlphaShape and its edge point data are called. Since AlphaShape cannot restore information of a specific angle, the right angles around the polygon need to be further restored.
In step S15, determining a vertex of the closed contour line according to the valid edge in the closed contour line includes:
when the number of the effective edges in any one closed contour line is more than 3, determining the closed contour line as an effective polygon;
carrying out extension operation on every two adjacent effective edges in the effective polygon to obtain an effective edge extension line;
and determining the intersection point of the extension lines of two adjacent effective edges as the vertex of the closed contour line.
And the effective edge is an edge of which the edge length in each closed contour line is greater than the diameter of the circle.
After the approximate shape of the room is obtained, because alphashape is composed of scattered points, a large number of scattered points appear on the same straight line edge and corner information is ignored, edges larger than the diameter of the alpha circle need to be restored first, and the edges are called effective edges. When the number of valid edges is greater than 3, it is considered to be a valid polygon. Between every two adjacent effective edges, a point of their extension lines needs to be found, and the intersection point of the extension lines is the vertex of the polygon. After all vertices are found, the room polygon can be restored.
Further, the room size and the limit can be controlled to control the legality of the room. When a special condition occurs, such as that two adjacent effective sides are parallel or the intersection point is very far away, only two sides are regarded as not being adjacent sides of an actual room, and a perpendicular line is drawn to restore the other effective side between the two sides.
In step S16, a room polygon is obtained by performing restoration according to all the vertices. This step can achieve polygon reduction simplification, and the finally generated room polygon is shown in fig. 7.
Further, when any two room polygons overlap, a polygon having an overlapping portion with the wall or door data is deleted from the two room polygons. It should be noted that, because the desired rooms are independent of each other, there is no overlapping, and AlphaShape may obtain overlapping data structures, such as the outer contour of a map, and will also generate room regions. Therefore, when the room polygons are overlapped, the obtained room data needs to be subjected to overlap detection, a smaller polygonal room area is generally reserved, and a larger room is used as a local or overall outer contour.
The invention provides a room data generation method based on a building vector diagram, which comprises the steps of obtaining building vector diagram data and obtaining wall linear data according to the building vector diagram data; generating a line data set containing door data according to the wall linear data, preset wall thickness parameters and the maximum door length, and performing efficiency optimization by using a short edge in combination with a spatial data index Rtree to construct a line data set containing door data; decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set; obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set; determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of each closed contour line with the side length larger than the diameter of the circle; and restoring according to all the vertexes to obtain a room polygon. According to the method, the closed contour line of the room is constructed by using an alpha Shape (rolling sphere method), a line data set containing door data is constructed, the room polygon is restored by scattered points of the contour, the whole process does not need to analyze accurate door information to fill in wall intervals, the influence of pillars and corners is small, and the actual requirements are met better.
Referring to fig. 8, a second embodiment of the present invention provides a room data generating apparatus based on a building vector diagram, including:
the data acquisition module is used for acquiring the building vector diagram data and acquiring wall linear data according to the building vector diagram data;
the line set generation module is used for generating door data according to the wall linear data, preset wall thickness parameters and door maximum length, and constructing a line data set according to the door data and the wall linear data;
the vertex sampling module is used for decomposing the line data set into discrete line segments and carrying out point sampling on the discrete line segments to obtain a discrete point set;
the contour generation module is used for obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set;
the vertex determining module is used for determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is the edge of each closed contour line with the side length larger than the diameter of the circle;
and the room generating module is used for restoring according to all the vertexes to obtain a room polygon.
Preferably, the line set generating module includes:
the line segment generation unit is used for traversing all edges of the wall linear data, converting each edge of the wall linear data into a two-point discrete line segment and storing the two-point discrete line segment into a line segment group;
the traversal search unit is used for traversing the line segment group, selecting an input line segment within a preset thickness range from the line segment group 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 gate width;
and the line set generating unit is used for selecting a target line segment which meets the parallel overlapping projection condition with the input line segment and has a distance smaller than the maximum length of the gate from all the output line segments, generating gate data according to the input line segment and the target line segment, and constructing a line data set according to the gate data and the wall linear data.
Preferably, the vertex sampling module includes:
the array splitting unit is used for splitting the line data set into a line segment set consisting of two discrete points;
the point sampling unit is used for uniformly sampling each line segment in the line segment set according to a preset sampling density to obtain point data;
and the set construction unit is used for constructing a discrete point set according to all the point data and the head point and the tail point of each line segment.
Preferably, the vertex determining module comprises:
the polygon determining unit is used for determining the closed contour lines as effective polygons when the number of the effective edges in any one of the closed contour lines is larger than 3;
the extension unit is used for carrying out extension operation on every two adjacent effective sides in the effective polygon to obtain an effective side extension line;
and the vertex determining unit is used for determining the intersection point of the extension lines of the two adjacent effective edges as the vertex of the closed contour line.
Preferably, the apparatus further comprises:
and the overlap deletion module is used for deleting a polygon of which the part is overlapped with the wall or door data in the two room polygons when any two room polygons are overlapped.
It should be noted that the room data generating device based on the building vector diagram provided in the embodiment of the present invention is used for executing all the process steps of the room data generating method based on the building vector diagram in the above embodiment, and the working principles and beneficial effects of the two are in one-to-one correspondence, and thus are not described again.
The embodiment of the invention also provides the terminal equipment. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a room data generating program based on a building vector map. The processor, when executing the computer program, implements the steps in each of the above-described embodiments of the building vector diagram-based room data generating method, such as step S11 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units in the above-described apparatus embodiments, such as a contour generation 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 a stand-alone 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 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 suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with 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 room data generation method based on a building vector diagram is characterized by comprising the following steps:
obtaining building vector diagram data, and obtaining wall linear data according to the building vector diagram data;
generating door data according to the wall linear data, preset wall thickness parameters and door maximum length, and constructing a line data set according to the door data and the wall linear data;
decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set;
obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set;
determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is an edge of which the side length in each closed contour line is larger than the diameter of the circle;
and restoring according to all the vertexes to obtain a room polygon.
2. The room data generating method based on the building vector diagram according to claim 1, wherein the generating door data according to the wall line data, a preset wall thickness parameter and a door maximum length, and constructing a line data set according to the door data and the wall line data comprises:
traversing all edges of the wall linear data, converting each edge of the wall linear data into a two-point discrete line segment, and storing the two-point discrete line segment into a line segment group;
traversing the line segment group, selecting an input line segment within a preset thickness range from the line segment group, 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 gate width;
selecting a target line segment which meets the parallel overlapping projection condition with the input line segment and has a distance smaller than the maximum length of the door from all the output line segments, generating door data according to the input line segment and the target line segment, and constructing a line data set according to the door data and the wall linear data.
3. The room data generating method based on the building vector diagram according to claim 1, wherein the decomposing the line data set into discrete line segments, and performing point sampling on the discrete line segments to obtain a discrete point set comprises:
splitting the line data set into a line segment set consisting of two discrete points;
uniformly sampling on each line segment in the line segment set according to a preset sampling density to obtain point data;
and constructing a discrete point set according to all the point data and the head point and the tail point of each line segment.
4. The method for generating room data based on an architectural vector diagram according to claim 1, wherein said determining vertices of the closed contour line based on the valid edges in the closed contour line comprises:
when the number of the effective edges in any one closed contour line is more than 3, determining the closed contour line as an effective polygon;
carrying out extension operation on every two adjacent effective edges in the effective polygon to obtain an effective edge extension line;
and determining the intersection point of the extension lines of two adjacent effective edges as the vertex of the closed contour line.
5. The building vector diagram-based room data generation method according to claim 1, wherein the method further comprises:
and when any two room polygons are overlapped, deleting the polygon which is overlapped with the wall or door data in the two room polygons.
6. A room data generating apparatus based on a building vector diagram, comprising:
the data acquisition module is used for acquiring the building vector diagram data and acquiring wall linear data according to the building vector diagram data;
the line set generating module is used for generating door data according to the wall linear data, preset wall thickness parameters and door maximum length, and constructing a line data set according to the door data and the wall linear data;
the vertex sampling module is used for decomposing the line data set into discrete line segments and carrying out point sampling on the discrete line segments to obtain a discrete point set;
the contour generation module is used for obtaining a plurality of closed contour lines based on a rolling sphere method according to a preset circle diameter and the discrete point set;
the vertex determining module is used for determining the vertex of the closed contour line according to the effective edge in the closed contour line; the effective edge is an edge of which the side length in each closed contour line is larger than the diameter of the circle;
and the room generating module is used for restoring according to all the vertexes to obtain a room polygon.
7. The building vector diagram-based room data generation apparatus according to claim 6, wherein the line set generation module includes:
the line segment generation unit is used for traversing all edges of the wall linear data, converting each edge of the wall linear data into a two-point discrete line segment and storing the two-point discrete line segment into a line segment group;
the traversal search unit is used for traversing the line segment group, selecting an input line segment within a preset thickness range from the line segment group 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 gate width;
and the line set generating unit is used for selecting a target line segment which meets the parallel overlapping projection condition with the input line segment and has the distance smaller than the maximum length of the door from all the output line segments, generating door data according to the input line segment and the target line segment, and constructing a line data set according to the door data and the wall linear data.
8. The building vector diagram-based room data generation apparatus according to claim 6, wherein the vertex sampling module includes:
the array splitting unit is used for splitting the line data set into a line segment set consisting of two discrete points;
the point sampling unit is used for uniformly sampling each line segment in the line segment set according to a preset sampling density to obtain point data;
and the set construction unit is used for constructing a discrete point set according to all the point data and the head point and the tail point of each line segment.
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 building vector diagram-based room data generation method according to any one of claims 1 to 5 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 on which the computer-readable storage medium is located to perform the building vector diagram-based room data generation method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211178786.7A CN115482310A (en) | 2022-09-27 | 2022-09-27 | Room data generation method, device, equipment and medium based on building vector diagram |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211178786.7A CN115482310A (en) | 2022-09-27 | 2022-09-27 | Room data generation method, device, equipment and medium based on building vector diagram |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115482310A true CN115482310A (en) | 2022-12-16 |
Family
ID=84394169
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211178786.7A Pending CN115482310A (en) | 2022-09-27 | 2022-09-27 | Room data generation method, device, equipment and medium based on building vector diagram |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115482310A (en) |
-
2022
- 2022-09-27 CN CN202211178786.7A patent/CN115482310A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11270497B2 (en) | Object loading method and apparatus, storage medium, and electronic device | |
US11875513B2 (en) | Self-adaptive point cloud stripe division method | |
US7499053B2 (en) | Real-time precision ray tracing | |
CN112233240B (en) | Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment | |
CN110633262B (en) | Spark-based map intersection area calculation method and system | |
CN113724401B (en) | Three-dimensional model cutting method and device, computer equipment and storage medium | |
CN107464286B (en) | Method, device, equipment and readable medium for repairing holes in three-dimensional city model | |
CN111127615A (en) | Data scheduling method and device of three-dimensional model and electronic equipment | |
CN115439607A (en) | Three-dimensional reconstruction method and device, electronic equipment and storage medium | |
CN116415652A (en) | Data generation method and device, readable storage medium and terminal equipment | |
CN115481268A (en) | Parallel line wall data identification method, device, equipment and storage medium | |
CN115482310A (en) | Room data generation method, device, equipment and medium based on building vector diagram | |
CN112231801A (en) | BIM-based hole protection generation method and device and computer storage medium | |
JP2015210672A (en) | Information processor, control method, program and recording medium | |
CN112465692A (en) | Image processing method, device, equipment and storage medium | |
CN111617475A (en) | Interactive object construction method, device, equipment and storage medium | |
CN116663107A (en) | Pile foundation construction work area self-adaptive partitioning method, device, computer equipment and medium | |
Cogo et al. | SpaceSubdivisionTestbed: A graphical tool for arbitrary shaped 2D polygon subdivision | |
CN113987652A (en) | Wall model generation method and device | |
Apostu et al. | Analytic ambient occlusion using exact from-polygon visibility | |
CN114299214A (en) | Virtual indoor scene generation method and device, storage medium and electronic device | |
CN110837707B (en) | Finite element analysis system, method, computer equipment and storage medium | |
CN114238528A (en) | Map loading method and device, electronic equipment and storage medium | |
CN114399583B (en) | Three-dimensional model splicing method and device based on geometry | |
CN108062793A (en) | Processing method, device, equipment and storage medium at the top of object based on elevation |
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 |