CN113297662B - Automatic household attribution identification method based on scanning lines - Google Patents

Automatic household attribution identification method based on scanning lines Download PDF

Info

Publication number
CN113297662B
CN113297662B CN202110646581.6A CN202110646581A CN113297662B CN 113297662 B CN113297662 B CN 113297662B CN 202110646581 A CN202110646581 A CN 202110646581A CN 113297662 B CN113297662 B CN 113297662B
Authority
CN
China
Prior art keywords
room
node
information
type
line
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.)
Active
Application number
CN202110646581.6A
Other languages
Chinese (zh)
Other versions
CN113297662A (en
Inventor
丁松阳
朱晓珺
高胜跃
马慧萌
梁雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Third Dimension Henan Software Technology Co ltd
Original Assignee
Third Dimension Henan Software Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Third Dimension Henan Software Technology Co ltd filed Critical Third Dimension Henan Software Technology Co ltd
Priority to CN202110646581.6A priority Critical patent/CN113297662B/en
Publication of CN113297662A publication Critical patent/CN113297662A/en
Application granted granted Critical
Publication of CN113297662B publication Critical patent/CN113297662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Abstract

The invention provides a house type attribution automatic identification method based on a scanning line, which comprises the following steps: acquiring axis network information and coordinate information of a plurality of households and a plurality of rooms in a building plan; extracting a closed area where a room is located from a building plan, and calculating a central point of the room; determining the room type according to the room function labeling information in the closed area range; determining an indoor door and an entrance door according to the type of the area communicated with the door; determining the number of households according to the number of entrance doors, and establishing a room list to which each household belongs; building an indoor channel topological structure according to an indoor door, and determining a closed area of a user; establishing a corresponding mapping matrix, taking an entrance door as a seed node, scanning all nodes in the mapping matrix by using a scanning line algorithm, positioning all internal room information in a closed area of each house, and storing the internal room information into a room list to which the house belongs, so that the home of the room is automatically identified in a plan view of the whole floor building, and technical support is provided for automatic arrangement of water and electric heating lines.

Description

Automatic household attribution identification method based on scanning lines
Technical Field
The invention relates to the technical field of household type identification based on vector diagrams, in particular to a household type attribution automatic identification method based on a mapping matrix and a scanning line.
Background
In recent years, with the building information modeling of BIM, the design mode of water and electric heating lines tends to be automatically arranged in the building design, so the house type identification technology has important significance in the BIM design project. At present, the technical bias in the aspect of house type identification is to automatically identify the region and function of a certain room or a certain room in an independent and complete house type by using a machine learning training model, but the problem of house-to-house of multiple house types and multiple rooms in a plane diagram of a whole-floor building still needs to be identified by a manual mode at present. Common auxiliary design software such as revit can't discern that the whole floor has several households, also can't discern which rooms belong to one of them family, can only establish the notion of room in the building plane construction drawing, can't correctly acquire the house type information of every family, need the artificially discernment of architectural designer to judge arranging the electric circuit of water heating, and then influenced the automatic arrangement of pipelines such as electric heating of follow-up whole architectural design china water, reduced architectural design automation degree of depth.
The Chinese patent application with the application number of 201911250311.2 discloses a house function room identification method, which comprises the steps of obtaining a house structure diagram based on house structure coordinate information, processing a house structure image by utilizing a neural network to obtain a house characteristic diagram, determining the function of each room by utilizing the information of each characteristic point in the house characteristic diagram, and identifying the type of the room for a house type diagram without marks. However, the training atlas selection and neural network training effects of the method greatly affect the identification accuracy, only the room type is identified under the house structure, the concept of the home of the room is not established, and the subsequent automatic laying of water, electricity, heating and other pipelines is inconvenient.
The chinese patent application No. 201910082366.0 discloses a method for reading a house type picture, which includes determining name and location information of a room name marked in the house type picture on the picture, determining wall information surrounding the room name, and finally determining room information corresponding to the room name according to the determined name and location information and the wall surrounding information, thereby converting the room information on the picture into image data required by AutoCAD software. The method can avoid manual secondary redrawing on the AutoCAD software, and improve the drawing efficiency. However, the concept of the type attribute of the closed area of the room is not established, and the type of the door of the room cannot be judged, so that the concept of establishing the home-to-home of the room cannot be realized in the standard building drawing containing a plurality of users and a plurality of rooms.
Disclosure of Invention
The invention provides a scanning line-based house type attribution automatic identification method, which aims at the technical problem that a standard floor building plan comprising a plurality of house types and a plurality of rooms cannot automatically identify which specific house type a room belongs to in the prior art, namely the problem that computer-aided software at home and abroad cannot automatically identify the specific house type of the room belongs to in the whole floor. The technical support is provided for realizing the automatic arrangement of the water and electricity heating circuit from outdoor to indoor in the whole-storey building construction drawing, and the automatic process of domestic and foreign building design can be promoted.
In order to achieve the purpose, the technical scheme of the invention is realized as follows: a house type attribution automatic identification method based on scanning lines comprises the following steps:
the method comprises the following steps: acquiring axis network information and coordinate information of a plurality of households and a plurality of rooms in a building plan by using software, and extracting coordinate information and room function information of doors, windows and wall lines;
step two: extracting a room closed area from the building plan, calculating a central point of a room, and storing the central point into a room information data structure;
step three: matching the room function information extracted in the step one with the room closed area obtained in the step two, determining the type of the room closed area, and storing the type into a room information data structure;
step four: judging the type of the door by utilizing the coordinate information of the door and the type of a closed area of a room associated with the door, and determining the number of entrance doors of the whole floor in a building plan;
step five: according to the type and the coordinates of the door, an indoor channel topological structure in the house type is built, a mapping matrix is built according to the structure diagram, and all doors, wall lines and room center points are mapped into the mapping matrix;
step six: initializing node information in the mapping matrix, establishing a room dictionary, and initializing a room list to which each user belongs according to the number of entrance doors in the fourth step;
step seven: and taking the nodes of the entrance doors as seed nodes, scanning all the nodes in the whole house type graph area in the mapping matrix by using a scanning line algorithm, positioning the central point of the room of each house, and storing the obtained internal room information into the room list of the house.
The coordinate information in the first step comprises an X-axis coordinate value and a Y-axis coordinate value of each point under a world coordinate system of the building plan; the coordinate information of the door comprises coordinate values, a central line, two parallel lines, coordinate information of an opening direction radian line and the width of the door; the coordinate information of the window comprises coordinates, a central line, two parallel lines and the width of the window; the coordinate information of the wall line comprises the coordinates of the initial point of the central line of the wall and the thickness of the wall; the room function information comprises function marking text information and marking coordinates of the room.
And the method for extracting the closed area where the room is located in the second step is to form the contour line of the closed area of the room, namely, the wall lines of the positions where the door and the window are located in the building plan are connected, so that all the rooms are converted into the closed areas which are respectively taken as the contour lines along the wall lines of the rooms.
The method for calculating the center point of the room comprises the following steps: solving a minimum inscribed rectangle for the contour line of the room closed region, and calculating the geometric center point of the minimum inscribed rectangle as the center point of the whole room closed region; or the closed area of the room is reduced in equal proportion to a line, and the coordinate of the middle point of the line is taken as the geometric center point of the room.
The room function information matched with the closed area in the third step is function marking text information of the room, namely, the coordinates of the function marking text information are matched with the enclosed area of the closed area of the room; if the position of the current function marking text information is in the range of the enclosed coordinate of the closed area of the room, the function marking text information is taken as the function attribute of the closed area and is stored in a room information data structure; the method for determining the type of the closed area of the room comprises the following steps: and determining whether the room is an indoor type or an outdoor type according to the function marking character information, and storing the indoor type or the outdoor type as the room attribute into a room information data structure.
The method for judging the type of the door in the fourth step comprises the following steps: aiming at all doors in the building plan, each door is respectively communicated with two different closed areas, the type of the door is determined according to the two closed area types, the entrance doors are found out, and the number of doors in the building plan is determined according to the number of the entrance doors.
The method for establishing the mapping matrix according to the indoor channel topological structure in the step five comprises the following steps: calculating the coordinate range and span of door and wall lines in the building plane graph according to the axis network information, dividing the coordinate range and span into nodes according to a certain specification, and establishing a mapping matrix with equal proportion size consisting of node information;
the method for mapping the wall line into the mapping matrix comprises the following steps: the method comprises the steps that two-dimensional coordinate information of a wall line is utilized, nodes of the wall line are scribed according to standards at a mapping matrix position according to a starting point to an end point of a vertical coordinate or a horizontal coordinate of the wall line, node type attributes are set to be first fixed values, and the nodes cannot pass through during scanning;
the method for mapping the gate into the mapping matrix comprises the following steps: for an entrance door, dividing nodes according to the width and thickness information of a root door, mapping the row and column position coordinate information of the nodes into a mapping matrix, setting a second fixed value for the type of the nodes, and regarding the value of the entrance door as impenetrable during scanning; for the room door, converting the room door into nodes according to the width and thickness information of the room door and the division standard, mapping the room door into a mapping matrix according to the shape and position information, setting a third fixed value for the type of the node, and forming an indoor channel area in a user unit if the room door is considered to be penetrable during scanning;
the method for mapping the central point of the room into the mapping matrix comprises the following steps: and mapping the position information of the room center point into a mapping matrix according to the position information of the room center point, and setting the node type as a fourth fixed value.
The initializing of the node information in the mapping matrix in the sixth step includes: the node accesses the attribute visited, and the initial value is 0; mapping row coordinates and column col coordinates of the matrix; node type nodeType; the room dictionary establishing method comprises the following steps: taking the position information of the center point of the room as an index number, and storing the wall line and the room information data structure of the corresponding room into a room dictionary, wherein the room dictionary has the structure as follows: < index number, RoomInfo >, which facilitates finding detailed room information RoomInfo through the index number;
the room list is used for storing the information of the identified rooms after the scan line is traversed, and the room list roomlist = (room) 1 ,room 2 …room k ) Room, roomThe number k is not less than 0, room 1 ,room 2 …room k Respectively, for each room.
In the seventh step, the nodes of the entrance door are used as seed nodes, all the nodes in the whole house type graph area are scanned in the mapping matrix by using a scanning line algorithm, each node is scanned without a blind point, the central point of the room of each house is positioned, and the obtained internal room information is stored in the room list of the house, wherein the implementation method of the scanning line algorithm comprises the following steps:
step 1: the row coordinate of the seed node is unchanged, the column coordinate moves along the increasing direction of the Y axis until meeting the wall line node, the node at the position immediately below the adjacent wall line is selected as the scanning starting point of the scanning line, and the scanning starting point is set as the current node preNode;
step 2: initializing scan line moving direction mark: setting the left moving direction and the right moving direction as movable states, and determining a new seed node of the scanning line according to the marking state of the moving direction of the scanning line;
and step 3: judging whether the current node preNode is a room central point, if so, finding out corresponding room information through a room dictionary index number, adding the room information into a room list of the user, and simultaneously marking the node access attribute as visited = 1; if the node is not the room center, the node access attribute is only required to be marked as visited = 1;
and 4, step 4: judging the left moving direction flag state of the current node, if the node is in an effective state, obtaining left node information of the current node, firstly determining the node type values as a non-wall line and a non-entrance door, then determining the access attribute of the node, namely, visited =0, storing the left node information as a seed node of a new scanning line, and simultaneously setting the left moving direction flag as an ineffective state false; if the node is in the invalid state false, the type value of the node on the left side of the current node is obtained, and if the node is judged to be a wall line or an entrance door, the left moving direction flag is set to be in the valid state tube.
And 5: judging the right movement direction flag state of the current node, if the current node is in an effective state, obtaining right node information of the current node, firstly determining the node type values as a non-wall line and a non-entrance door, then determining the access attribute of the node, namely visual =0, storing the right node information as a seed node of a new scanning line, and simultaneously setting the right movement direction flag to be in an ineffective state false; if the node is in the invalid state false, the type value of the node on the right side of the current node is obtained, and if the node is judged to be a wall line or an entrance door, the right movement direction flag is set to be in the valid state tube.
Step 6: and (5) scanning downwards along a vertical line from the current node preNode, repeating the steps 3 to 5 when a new node is obtained, until a wall line node on the vertical line is met, and finishing the scanning line.
And 7: taking out the nodes stored in the step 5 as new seed nodes, repeating the steps 1 to 6, and moving the nodes to the right along the right side for scanning until the nodes meet the wall or are scanned;
and 8: and taking out the nodes stored in the step 4 as new seed nodes, repeating the steps 1 to 6, and performing left shift scanning along the left side nodes until the nodes meet the wall or are scanned.
And after all the nodes in the closed room area of the current house type are accessed, selecting another new seed node of the entrance door to continue scanning until all the users on the whole floor building plan are scanned, and obtaining a room list contained in each user according to the specific number of the users on the building plan.
In the step 4 or the step 5, the moving direction flag state is changeable, after a new seed node is saved, the state of the new seed node is changed from the valid state capture to the invalid state ffalse, and in the subsequent scanning process of the current scanning line, if the left and right nodes are of the wall line type, the states of the new seed node are changed into valid states, so that the scanning line can enter each room for scanning, and each continuous scanning line only has one starting point.
Compared with the prior art, the invention has the following beneficial effects: the method is based on a dwg file format and takes a standard floor building plan containing a plurality of house types as an object, the types of doors in all room doors in the plan are identified, an entrance door is determined, then the entrance door is taken as a starting point, the whole house type is scanned and traversed by utilizing a mapping matrix and a scanning line algorithm, all rooms to which each house belongs are automatically identified, the standard floor building plan taking the room as a unit is successfully converted into the house as a unit, the technical blank of the market about the room returning to the home is made up, and the technical support is provided for the automatic arrangement of the later-stage water electric heating pipeline from the outdoor to the indoor.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of the present invention.
Fig. 2 is a plan view of a multi-dwelling multi-room building with hub network information.
Fig. 3 is a schematic diagram of extraction of a layer door and window.
Fig. 4 is a schematic diagram of extracting a closed area of a room.
Fig. 5 is a schematic view of a door.
Figure 6 is a schematic view of a door connecting two closure areas.
Fig. 7 is a schematic view of the indoor door of the present invention connected to form an indoor passageway.
Fig. 8 is a schematic diagram of a partitioning node for a room area with a channel.
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 obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, a method for automatically identifying a residential home based on a mapping matrix and a scan line includes the following steps:
the method comprises the following steps: and acquiring the axis network information and the coordinate information of a plurality of households and a plurality of rooms in the building plan by using software, and extracting the coordinate information and the room function information of doors, windows and wall lines.
And opening the building plan in the dwg format by using software such as AutoCAD (AutoCAD), revit and the like, and acquiring the shaft network information and the related coordinate information of multiple households and rooms in the building plan. The shaft net is a net composed of building axes, the detailed sizes of the graphic elements are marked in a building plan, standards can be set artificially according to rules, and all the graphic element positions in the building plan of the dwg file are positioned according to the shaft net, as shown in fig. 2. The coordinate range and the span can be calculated according to the axle network information, a mapping matrix with equal proportional size is further established according to the axle network information, and then the elements can be mapped into the mapping matrix according to the corresponding position information. The coordinate information includes an X-axis coordinate value and a Y-axis coordinate value of each point in a world coordinate system of the building plan, which is a plan view of the building without reference to the z-axis.
Furthermore, in each layer of the building plan, the coordinates, the width, the center line, two parallel lines and the opening direction radian line of all doors in the whole building plan are extracted according to the world coordinate system of the drawing, as shown in fig. 3, the coordinates and the width of a window, the coordinates of the starting point of the center line of the wall, the thickness of the wall, and data information such as room function labeling text information, labeling coordinates and the like are extracted.
Step two: and extracting a closed area where the room is located in the building plan, calculating the center point of the room according to the closed area and storing the center point in a room information data structure.
And extracting a closed area where the room is positioned to form a contour line of the closed area of the room, and connecting wall lines where windows are positioned in the building plan to form new wall line coordinate data (treating the windows as walls). On the basis, the wall lines of the positions of the doors are also connected (the doors are also treated as walls), so that all the rooms are converted into complete closed areas which are formed by contour lines along the wall lines of the rooms, as shown in fig. 4.
Further, the method for calculating the central point of the closed area of each room comprises the following steps: and solving the minimum inscribed rectangle of the contour line of the extracted room closed region, calculating the geometric center point of the minimum inscribed rectangle according to the symmetric geometric characteristics of the rectangle, taking the geometric center point as the center point of the whole room closed region, and storing the coordinates of the geometric center point into a room information data structure.
Optionally, for the extracted closed room area, an equal-scale reduction method may also be adopted to reduce the extracted closed room area to a line, and a coordinate of a center point of the line is taken to be a geometric center point of the closed room area.
Step three: and matching the related information of the room label extracted in the step one with the closed area obtained in the step two, determining the type of the closed area of the room, and storing the type in a room information data structure.
And determining the position of the current function marking text information and the range of the enclosed coordinate of the closed area of the room, taking the function marking text information as the function attribute of the closed area, and storing the function marking text information into a room information data structure. If the position of the function labeling text information is between the adjacent closed area ranges, the position is determined to belong to by judging which closed area has the nearest distance from the central point.
Further, whether the room is of an indoor type or an outdoor type is determined according to the function labeling text information. For example, if the function labeling character information is a living room, a dining room, a bedroom, a cloakroom, a bathroom, a kitchen, a balcony and the like, the type is judged to be an indoor type; if the function labeling text information is that outdoor channels, elevator shafts, staircases, water wells, electric wells and the like are set as outdoor types, the obtained type values are used as marks and are also stored in the room information data structure.
Step four: and judging the type of the door by utilizing the coordinate information of the door and the type of the closed area of the room associated with the door, and determining the number of the entrance doors of the whole floor in the building plan.
For all doors in a building plan, each door has two parallel line coordinate positions, as shown in fig. 5, the two parallel line positions of each door are respectively communicated with two different closed areas, as shown in fig. 6, the type of the door is determined according to the two closed area types, and an entrance door is found out.
Optimally, according to the direction of the opening arc of the door, a coordinate point 1 is arranged at a certain offset distance perpendicular to the center point of the door, and a coordinate point 2 is arranged at a certain offset distance perpendicular to the center point of the door in the opposite direction, as shown in fig. 5, the coordinate enclosing range and the type of the closed area obtained in the second step are used for determining two closed area types where the coordinate point 1 and the coordinate point 2 are located, and the type of the door is determined according to the types.
Further, if the door is an entrance door, the two closed area attributes must satisfy the following condition: one is an indoor functional area and the other is an outdoor functional area, the door can be identified as an entrance door. If the attribute values of the types of the two closed areas are the same as indoor, judging the closed areas as indoor doors; if the type attribute value of the closed area is outdoor at the same time, the closed area is judged as an outdoor door.
Furthermore, the number of the entrance door types is calculated according to all the door types in the identified building plan, and a plurality of specific doors in the building plan can be obtained.
Step five: and establishing an indoor channel topological structure according to the coordinate information of the door, establishing a mapping matrix formed by the node information based on the indoor channel topological structure, and mapping all doors, wall lines and central points of rooms into the mapping matrix.
A node is an information description of each element in the mapping matrix. And (3) keeping the position relation of the house type room in the room closed area formed by the wall lines obtained in the step two, defining the property of the entrance door as impenetrable (the same as the wall lines), regarding the indoor door as penetrable, and constructing an indoor channel topological structure according to the coordinate information of the indoor door, as shown in fig. 7. Then, the coordinate ranges and the span sizes of the walls and the doors in the drawing are calculated according to the axis network information, the walls and the doors are divided according to proper specifications (1 CM, 5CM, 10CM and the like), each node is divided into one node, and a mapping matrix with equal proportion size and composed of node information is established, as shown in FIG. 8.
Further, the mapping of the wall line is completed. The wall is formed by connecting two points into a line, and two-dimensional coordinate information of the wall line obtained according to the step one in the mapping matrix is as follows: the wall line is in the horizontal direction, the nodes of the wall line are drawn according to the standard at the corresponding mapping matrix position according to the position from the vertical coordinate starting point to the end point of the wall line, the node type nodeType attribute is set as the first fixed value of the wall, and the wall line cannot pass through during scanning. And for the wall line in the vertical direction, according to the abscissa of the wall line, marking the node of the wall line from the starting point to the end point at the position of the corresponding mapping matrix. The corner is formed by oppositely connecting horizontal and vertical wall lines without special treatment.
Further, the mapping of doors is done, the doors including entrance doors and room doors. For an entrance door, firstly, the width and thickness information of the root door is divided into nodes, the row and column position information of the nodes is mapped into a mapping matrix, the type value of the nodes can be set as a second fixed value, and the value of the entrance door is considered to be impenetrable during mapping and is equal to a wall line. And for the indoor door, converting the width and thickness information of the indoor door into matrix points, namely nodes according to division standards, setting a node type value as a third fixed value, and enabling the indoor door to be considered as a passable indoor channel region in a user unit during scanning. This process is repeated until all room doors have been processed.
Further, room location information: mapping the calculated position information of the room center point into a mapping matrix according to the calculated position information of the room center point, wherein the node type nodeType takes a fourth fixed value so as to be uniquely identified; meanwhile, the position information of the center point of the room is used as an index number, and the function marking text information, the room type, the room wall list and the like of the corresponding room are stored in the room information dictionary.
Furthermore, after all the walls, doors and center points are mapped into a data matrix, all the rooms in the whole house type graph are finally connected into large closed areas with indoor channels and with the house as a unit.
Step six: initializing node information in the mapping matrix, establishing a room dictionary, and establishing a room list to which each user belongs according to the number of entrance doors in the fourth step.
Establishing node information for each node, which should include: the node accesses the attribute visited, and the initial value is 0; mapping row coordinates and col column coordinates of the matrix; node type nodeType.
The structure of the room dictionary is: the indexing < index number, RoomInfo > is convenient for finding out the detailed room information RoomInfo through the index number, and provides reliable data basis for laying pipelines at the later stage. The room information includes: the function labels text information, i.e. room name (bedroom, living room, kitchen, etc.), room wall list, room type, center point, etc.
Establishing a room list to which each user belongs according to the number of the users calculated in the step four, wherein the room list is used for storing the information of the rooms to which the scanning line algorithm is identified after traversing, and the room list roomlist = (room) 1 ,room 2 …room k ) The number k of rooms is more than or equal to 0, room 1 ,room 2 …room k Information for each room separately; when a room is searched in the house type by using the scan line algorithm, the room is added to a room list roomlist belonging to the user.
Step seven: and taking the nodes of the entrance doors as seed nodes, scanning all the nodes in the whole house type graph area in the mapping matrix by using a scanning line algorithm, positioning the central point of the room of each house, and storing the obtained internal room information into the room list of the house.
The node of the entrance door can select the node of the center point of the entrance door adjacent to the indoor as the seed node; and obtaining the coordinate point 2 as a seed node in the fourth step. The invention uses the scanning line algorithm to scan all nodes in the whole house type graph area in the mapping matrix, locates the central point of the room of each house, and stores the obtained internal room information into the room list of the house.
The scanning process of the scanning line algorithm is specifically as follows:
step 1: and the row coordinate of the seed node is unchanged, the column coordinate moves along the increasing direction of the Y axis until the node meets the wall line node, the node at the position immediately below the adjacent wall line is selected as the scanning starting point of the scanning line, and the scanning starting point is set as the current node preNode.
Step 2: initializing scan line moving direction flag: the left moving direction and the right moving direction are set to be movable states; and determining a new seed node of the scanning line according to the marking state of the moving direction of the scanning line.
And step 3: judging whether the current node preNode is a room central point, if so, finding out corresponding room information through a room dictionary index number, adding the room information into a room list of the user, and simultaneously marking the node access attribute as visited = 1; if not, the node access attribute is only required to be marked as visited = 1.
And 4, step 4: judging the left moving direction flag state of the current node, if the current node is in an effective state, obtaining the left node information of the current node, firstly determining the node type values as a non-wall line and a non-entrance door, then determining the access attribute of the node, namely, visited =0, storing the left node information as a seed node of a new scanning line, and simultaneously setting the left moving direction flag to be in an ineffective state false.
If the node is in the invalid state false, acquiring the type value of the node on the left side of the current node, judging whether the node is a wall line or an entrance door, and setting a left moving direction flag to be in the valid state tube; the arrangement is that after the obstacle is crossed, the first node which can form a continuous scanning line is stored as a seed node, so that after the scanning line is interrupted at the wall or the entrance door and the point is crossed, the subsequent scanning line can continue to start new scanning after the point is broken, and each node of each room can be traversed.
The marking state of the moving direction is changeable, after the new seed node is stored, the state of the new seed node is changed from the effective state tube to the ineffective state false, and in the subsequent scanning process of the current scanning line, if the left and right nodes are of the wall line type, the marking state of the new seed node is changed into the effective state tube, so that the scanning line can enter each room for scanning, and each continuous scanning line only has one starting point.
The node information may be stored in a stack manner, a queue manner, or the like, regardless of the storage manner in the specific embodiment.
And 5: judging the right shift direction flag state of the current node, if the current node is in the effective state, acquiring right node information of the current node, firstly determining the node type values as a non-wall line and a non-entrance door, then determining the access attribute of the node, namely visited =0, storing the right node information as a seed node of a new scanning line, and simultaneously setting the right shift direction flag to be in the ineffective state false; if the node is in the invalid state false, acquiring the type value of the node on the right side of the current node, judging whether the node is a wall line or an entrance door, and setting a right movement direction flag to be in the valid state tube;
the node information may be stored in a stack manner, a queue manner, or the like, regardless of the storage manner in the specific embodiment.
Step 6: scanning downwards along a vertical line from a current node preNode, repeating the steps 3 to 5 when a new node is obtained, until a wall line node on the vertical line is met, and ending the scanning line;
and 7: taking out the nodes stored in the step 5 as new seed nodes, repeating the steps 1 to 6, and moving the nodes to the right along the right side for scanning until the nodes are met with the wall or scanned;
and 8: and taking out the nodes stored in the step 4 as new seed nodes, repeating the steps 1 to 6, and performing left shift scanning along the left side nodes until the nodes meet the wall or are scanned.
And after all the nodes in the closed area of the current house type are accessed, entering the initial node of another new entrance door to continue scanning until all the houses on the whole floor building plan are scanned, and obtaining a room list contained in each house according to the specific house number of the building plan.
The invention adopts a scanning line algorithm to map the paper information into a matrix, combines nodes to move in four directions of up, down, left and right, achieves the aim of flood scanning, ensures that the nodes traverse to each node position of the whole house type graph, thereby ensuring that the center point of each room is scanned, and realizes automatic home-setting of the room in the building plan.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A house type attribution automatic identification method based on a scanning line is characterized by comprising the following steps:
the method comprises the following steps: acquiring axis network information and coordinate information of a plurality of households and a plurality of rooms in a building plan by using software, and extracting coordinate information and room function information of doors, windows and wall lines;
step two: extracting a room closed area from the building plan, calculating a central point of a room, and storing the central point into a room information data structure;
step three: matching the room function information extracted in the step one with the room closed area obtained in the step two, determining the type of the room closed area, and storing the type into a room information data structure;
step four: judging the type of the door by utilizing the coordinate information of the door and the type of a closed area of a room associated with the door, and determining the number of entrance doors of the whole floor in a building plan;
step five: building a house type indoor channel topological structure according to the type and coordinate information of the door, building a mapping matrix according to the indoor channel topological structure, and mapping all doors, wall lines and central points of rooms into the mapping matrix;
step six: initializing node information in the mapping matrix, establishing a room dictionary, and initializing a room list to which each user belongs according to the number of entrance doors in the fourth step;
step seven: taking the nodes of the entrance doors as seed nodes, scanning all the nodes in the whole house type graph area in a mapping matrix by using a scanning line algorithm, positioning the central point of a room of each house, and storing the obtained internal room information into a room list of the house;
the method adopts a scanning line algorithm to map the paper information into a matrix, combines the nodes to move in four directions, namely up, down, left and right, to achieve the purpose of flood scanning, and ensures that each node position of the whole house type graph is traversed, thereby ensuring that the central point of each room is scanned, and realizing automatic home setting of the room in the building plan graph.
2. The method for automatically identifying house type attribution based on scanning lines as claimed in claim 1, wherein the coordinate information in the first step comprises an X-axis coordinate value and a Y-axis coordinate value of each point in a world coordinate system of a building plan; the coordinate information of the door comprises coordinate values, a center line, two parallel lines, the coordinate information of an opening direction radian line and the width of the door; the coordinate information of the window comprises coordinates, a central line, two parallel lines and the width of the window; the coordinate information of the wall line comprises the coordinates of the initial point of the central line of the wall and the thickness of the wall; the room function information comprises function marking text information and marking coordinates of the room.
3. The method for automatically identifying house type affiliations based on scanning lines according to claim 1 or 2, wherein the method for extracting the closed areas where the rooms are located in the second step is to form the contour lines of the closed areas of the rooms, i.e. the wall lines of the positions where the doors and the windows are located in the building plan are connected, so that all the rooms are converted into the closed areas which are respectively the contour lines along the wall lines of the rooms;
the method for calculating the center point of the room in the second step comprises the following steps: solving a minimum inscribed rectangle for the contour line of the room closed region, and calculating the geometric center point of the minimum inscribed rectangle as the center point of the whole room closed region; or the closed area of the room is reduced in an equal proportion to a line, and the coordinate of the middle point of the line is taken as the geometric center point of the room.
4. The method for automatically identifying the home type attribution based on the scanning lines as claimed in claim 1, wherein the room function information matched with the closed area in the third step is function tagging text information of the room, that is, coordinates of the function tagging text information are matched with a closed area enclosing area of the room; if the position of the current function labeling text information is in the range of the enclosed coordinates of the closed area of the room, the function labeling text information is used as the function attribute of the closed area and is stored in a room information data structure; the method for determining the type of the room closed area comprises the following steps: and determining whether the room is an indoor type or an outdoor type according to the function labeling character information, and storing the indoor type or the outdoor type as a room attribute into a room information data structure.
5. The method for automatically identifying house type attribution based on scanning lines as claimed in claim 1 or 4, wherein the method for judging the type of the gate in the fourth step is as follows: aiming at all doors in a building plan, each door is respectively communicated with two different room closed areas, the type of the door is determined according to the types of the two room closed areas, and an entrance door is found out.
6. The method for automatically identifying house type attribution based on scanning lines as claimed in claim 1, wherein the method for establishing the mapping matrix according to the indoor channel topology structure in the fifth step is as follows: calculating the coordinate range and span of door and wall lines in the building plane graph according to the axis network information, dividing the coordinate range and span into nodes according to a certain specification, and establishing a mapping matrix with equal proportion size consisting of node information;
the method for mapping the wall line into the mapping matrix comprises the following steps: the method comprises the steps that two-dimensional coordinate information of a wall line is utilized, nodes of the wall line are scribed according to standards at a mapping matrix position according to a starting point to an end point of a vertical coordinate or a horizontal coordinate of the wall line, node type attributes are set to be first fixed values, and the nodes cannot pass through during scanning;
the method for mapping the gate into the mapping matrix comprises the following steps: for the entrance door, dividing nodes according to the width and thickness information of the entrance door, mapping the row and column position coordinate information of the nodes into a mapping matrix, setting a second fixed value for the type of the nodes, and considering the value of the entrance door as impenetrable during scanning; for the room door, converting the room door into nodes according to the width and thickness information of the room door and a division standard, mapping the room door into a mapping matrix according to shape and position information, setting a third fixed value for the type of the node, and enabling the room door to be penetrated during scanning to form an indoor channel area in a user unit;
the method for mapping the central point of the room into the mapping matrix comprises the following steps: and mapping the position information of the room center point into a mapping matrix according to the position information of the room center point, and setting the node type as a fourth fixed value.
7. The method for automatically identifying the house type attribution based on the scanning lines as claimed in claim 6, wherein the initialization of the node information in the mapping matrix in the sixth step comprises: the node accesses the attribute visited, and the initial value is 0; mapping row coordinates and column col coordinates of the matrix; node type nodeType; the room dictionary establishing method comprises the following steps: taking the position information of the center point of the room as an index number, and storing the wall line and the room information data structure of the corresponding room into a room dictionary, wherein the room dictionary has the structure as follows: < index number, RoomInfo >, which facilitates finding detailed room information RoomInfo through the index number;
the room list is used for storing the information of the rooms identified after the scanning line is traversed, and the room list roomlist = (room) 1 ,room 2 …room k ) The number k of rooms is more than or equal to 0, room 1 ,room 2 …room k Information for each room separately.
8. The method for automatically identifying the house type attribution based on the scanning lines as claimed in claim 1 or 7, wherein the method for realizing the scanning line algorithm is that the house door node is taken as a seed node, each node is scanned without blind spots, and the center points of all the internal rooms of the house are found, and the method comprises the following steps:
step 1: the row coordinates along the seed nodes are unchanged, the column coordinates move along the Y-axis increasing direction until meeting the wall line node, the node immediately below the adjacent wall line is selected as the scanning line scanning starting point, and the scanning line scanning starting point is set as the current node preNode;
step 2: initializing scan line moving direction mark: setting the left moving direction and the right moving direction as movable states, and determining a new seed node of the scanning line according to the marking state of the moving direction of the scanning line;
and step 3: judging whether the current node preNode is a room central point, if so, finding out corresponding room information through a room dictionary index number, adding the room information into a room list of the user, and simultaneously marking the node access attribute as visited = 1; if the node is not the center point of the room, the node access attribute is only required to be marked as virtual = 1;
and 4, step 4: judging the left moving direction flag state of the current node, if the left moving direction flag state is in an effective state, acquiring left node information of the current node, firstly determining the node type values as a non-wall line and a non-entrance door, then determining the access attribute of the node, namely visified =0, storing the left node information as a seed node of a new scanning line, and simultaneously setting the left moving direction flag to be in an ineffective state false; if the node is in the invalid state false, acquiring the type value of the node on the left side of the current node, judging whether the node is a wall line or an entrance door, and setting a left moving direction flag to be in the valid state tube;
and 5: judging the right movement direction flag state of the current node, if the current node is in the effective state, acquiring right node information of the current node, firstly determining the node type values as a non-wall line and a non-entrance door, then determining the access attribute of the node, namely visified =0, storing the right node information as a seed node of a new scanning line, and simultaneously setting the right movement direction flag to be in the ineffective state false; if the node is in the invalid state false, acquiring the type value of the node on the right side of the current node, judging whether the node is a wall line or an entrance door, and setting a right movement direction flag to be in the valid state tube;
and 6: scanning downwards along a vertical line from a current node preNode, repeating the steps 3 to 5 when a new node is obtained, until a wall line node on the vertical line is met, and finishing the scanning of the scanning line;
and 7: taking out the nodes stored in the step 5 as new seed nodes, repeating the steps 1 to 6, and performing right shift scanning along the right side nodes until the nodes meet the wall line or are scanned;
and 8: and taking out the nodes stored in the step 4 as new seed nodes, repeating the steps 1 to 6, and performing left shift scanning along the left side nodes until the nodes meet the wall or are scanned.
9. The method as claimed in claim 8, wherein the method for automatically identifying the home of the house type based on the scan line comprises the steps of selecting a seed node of another new entrance door to continue scanning after all nodes in the closed room area of the current house type have been visited, and obtaining a room list of each house according to the specific number of houses of the building plan until all the houses on the whole floor of the building plan have been scanned.
10. The method as claimed in claim 8, wherein the moving direction flag state is changeable, the new seed node is saved and then changed from the valid state tune to the invalid state false, and during the subsequent scanning process of the current scan line, if the left and right nodes are wall line type, the flag state is changed to the valid state tune to ensure that the scan line can enter each room for scanning, and each consecutive scan line has only one starting point.
CN202110646581.6A 2021-06-10 2021-06-10 Automatic household attribution identification method based on scanning lines Active CN113297662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110646581.6A CN113297662B (en) 2021-06-10 2021-06-10 Automatic household attribution identification method based on scanning lines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110646581.6A CN113297662B (en) 2021-06-10 2021-06-10 Automatic household attribution identification method based on scanning lines

Publications (2)

Publication Number Publication Date
CN113297662A CN113297662A (en) 2021-08-24
CN113297662B true CN113297662B (en) 2022-09-27

Family

ID=77327796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110646581.6A Active CN113297662B (en) 2021-06-10 2021-06-10 Automatic household attribution identification method based on scanning lines

Country Status (1)

Country Link
CN (1) CN113297662B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375873B (en) * 2022-10-24 2023-04-07 深圳小库科技有限公司 Building space processing method and device and related equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110631561A (en) * 2019-08-31 2019-12-31 天韵(广州)房地产开发有限公司 Method for actually measuring actual quantity in building room

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6446030B1 (en) * 1998-01-24 2002-09-03 Quantapoint, Inc. Method and apparatus for establishing the layout of a building
CA2779525C (en) * 2009-11-02 2016-05-17 Archaio, Llc System and method employing three-dimensional and two-dimensional digital images
CN106528904B (en) * 2016-07-09 2018-05-04 陈志静 The automatic planning and designing method of residence model figure building structure intelligent recognition and functional areas
CN108426579B (en) * 2018-02-14 2021-08-27 安徽师范大学 Automatic generation method for internal floor path network
CN109711018B (en) * 2018-12-15 2022-11-22 武汉兴联云立方科技有限公司 Two-dimensional to three-dimensional house type design method
US11367264B2 (en) * 2019-07-17 2022-06-21 The Regents Of The University Of California Semantic interior mapology: a tool box for indoor scene description from architectural floor plans
CN111145294B (en) * 2019-12-18 2021-05-07 北京城市网邻信息技术有限公司 Two-dimensional house type graph construction method and device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110631561A (en) * 2019-08-31 2019-12-31 天韵(广州)房地产开发有限公司 Method for actually measuring actual quantity in building room

Also Published As

Publication number Publication date
CN113297662A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN106528904B (en) The automatic planning and designing method of residence model figure building structure intelligent recognition and functional areas
CN108763606B (en) Method and system for automatically extracting house type graphic primitive based on machine vision
CN106484940B (en) A kind of home decoration Intelligentized design method and system
CN108320323B (en) Building three-dimensional modeling method and device
CN109974703B (en) Method, system and device for constructing indoor navigation network
CN113436319B (en) Special-shaped arrangement matrix construction method and system of urban indoor three-dimensional semantic model
CN108416707A (en) House house type appraisal procedure and device
CN105512344B (en) A kind of querying method of indoor moving object relative location
CN113297662B (en) Automatic household attribution identification method based on scanning lines
CN109840338A (en) A kind of three-dimensional building model building method applied to three-dimensional real estate information management
CN111723419A (en) Method and system for determining residential building design
CN114022895A (en) Method for accurately identifying house type in building professional residential plan
CN110221604A (en) A kind of quick global paths planning method based on genetic algorithm
CN111754526A (en) Home graph dividing method, classification method, dividing device, device and storage medium
CN116579114A (en) Planning simulation design method based on multiple agents
CN115393583A (en) Method for carrying out artificial intelligence semantic segmentation on wall
CN115222873A (en) Three-dimensional property picture batch association method based on annotation and spatial semantics
CN106611425A (en) Panchromatic remote sensing image segmentation method
CN112883798B (en) Method for identifying components in plane graph space of building specialty based on deep learning
CN115493596A (en) Semantic map construction and navigation method for mobile robot
CN113887508A (en) Method for accurately identifying center line of public corridor space in building professional residential plan
CN114626167B (en) Automatic laying method for floor heating in heating plan of heating and ventilation major
CN113626907B (en) Automatic building drawing identification method based on boundary scanning algorithm
CN113160235A (en) Room segmentation method based on internal circle and adjacency graph
CN111105124A (en) Multi-landmark influence calculation method based on distance constraint

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
GR01 Patent grant
GR01 Patent grant