CN-120070235-B - House type vector diagram processing method and electronic equipment
Abstract
The embodiment of the disclosure discloses a processing method and electronic equipment of a house type vector diagram, which are characterized in that on the basis of an initial house type vector diagram of a target house, optimization adjustment of wall lines and vertexes is performed, unnecessary wall lines, vertexes and the like are reduced to noise interference, unnecessary details are removed, the obtained house type vector diagram does not appear to be finely divided, global optimization is further performed on the house type vector diagram subjected to wall lines and vertexes optimization through a preset global optimization algorithm, distortion of the house type vector diagram caused by the wall lines and vertexes optimization is reduced, the real position of the wall surface of the target house is truly restored, and regular simplification and optimization of the structure of the house type vector diagram are realized, so that a clean, neat, clear and accurate house type vector diagram is obtained.
Inventors
- LI LINYUAN
- LI WEI
- MIAO ZEHUA
Assignees
- 如你所视(北京)科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250206
Claims (11)
- 1. A method for processing a house type vector graph, the method comprising: receiving a first house type vector diagram of a target house; respectively carrying out optimization adjustment on wall lines and vertexes in the first house type vector diagram based on the first house type vector diagram of the target house to obtain a second house type vector diagram; Performing global optimization on the second house type vector diagram according to a preset global optimization algorithm to obtain a third house type vector diagram of the target house; Outputting a third house type vector diagram of the target house; The optimizing adjustment is carried out on the wall line and the vertex in the first house type vector diagram based on the first house type vector diagram of the target house to obtain a second house type vector diagram, and the optimizing adjustment comprises the following steps: The method comprises the steps of carrying out merging processing on any one first wall line meeting a first preset merging condition in a first house type vector diagram and a second wall line adjacent to the first wall line, obtaining point cloud data information of a target house, determining a door frame endpoint of a door frame of the target house in the first house type vector diagram based on the point cloud data information, traversing each vertex in the first house type vector diagram, determining a door frame endpoint from all vertices, judging whether the distance between a first vertex and a second vertex except the door frame endpoint meets a second distance threshold, and if the distance between the first vertex and the second vertex meets the second distance threshold, determining that the first vertex and the second vertex meet the second preset merging condition so as to carry out merging processing on the first vertex and the second vertex meeting the second preset merging condition.
- 2. The method of claim 1, wherein the optimizing and adjusting the wall line and the vertex in the first house type vector diagram based on the first house type vector diagram of the target house respectively to obtain a second house type vector diagram, further comprises: Traversing each wall line in the first house type vector diagram, and determining whether any first wall line and a second wall line adjacent to the first wall line meet the first preset merging condition; under the condition that the first wall line and the second wall line meet the first preset merging condition, merging the first wall line and the second wall line to obtain merged wall lines; Under the condition that the first vertex and the second vertex meet the second preset merging condition, merging the first vertex and the second vertex to obtain a merged vertex; and obtaining the second house type vector graph based on all the merging wall lines and the merging vertexes.
- 3. The method of claim 2, wherein traversing each wall line in the first house type vector graph, determining whether any first wall line and a second wall line adjacent thereto satisfy a first preset merge condition, comprises: traversing each wall line in the first house type vector diagram, and judging whether any first wall line and a second wall line adjacent to the first wall line form an included angle or not; Under the condition that an included angle is formed, judging whether the included angle between the first wall line and the second wall line meets a first included angle threshold value or not; Judging whether the first wall line and the second wall line have a common endpoint or not under the condition that the included angle meets a first included angle threshold value; and under the condition of common endpoints, determining that the first wall line and the second wall line meet a first preset merging condition.
- 4. The method of claim 3, wherein traversing each wall line in the first house type vector graph, determining whether any first wall line and a second wall line adjacent thereto satisfy a first preset merge condition, further comprises: Judging whether the distance between two adjacent endpoints of the first wall line and the second wall line meets a first distance threshold or not under the condition that the first wall line and the second wall line do not have common endpoints; And under the condition that the distance meets a first distance threshold value, determining that the first wall line and the second wall line meet a first preset merging condition.
- 5. The method according to any one of claims 2 to 4, wherein, in the case where it is determined that the first wall line and the second wall line meet the first preset merging condition, merging the first wall line and the second wall line to obtain a merged wall line, including: And under the condition that the first wall line and the second wall line meet the first preset merging condition, connecting a first end point of the first wall line and a second end point of the second wall line to obtain the merging wall line.
- 6. The method of claim 2, wherein the determining a door frame endpoint of the door frame of the target house in the first house type vector diagram based on the point cloud data information comprises: determining a door frame plane of the target house based on the point cloud data information; performing coordinate conversion on a door frame plane of the target house to obtain a door frame line segment; And matching the door frame line segment to a target wall line of the first house type vector diagram to obtain a door frame endpoint on the target wall line, wherein the target wall line is a wall line matched by the door frame endpoint in the merging wall line.
- 7. The method of claim 6, wherein, in the case where it is determined that the first vertex and the second vertex meet the second preset merging condition, performing merging processing on the first vertex and the second vertex to obtain a merged vertex, including: And merging the first vertex to the second vertex to obtain the merged vertex under the condition that the first vertex and the second vertex meet the second preset merging condition.
- 8. The method according to claim 1 or 2, wherein the performing global optimization on the second house type vector diagram according to a preset global optimization algorithm to obtain a third house type vector diagram of the target house comprises: Acquiring point cloud data information of the target house; Performing coordinate transformation on the point cloud data information of the target house to obtain all third wall lines of the target house; determining target wall lines matched with any fourth wall line in the second house type vector diagram from all third wall lines; constraining the direction of the fourth wall line by using a preset point cloud plane two-dimensional linear equation to enable the direction of the fourth wall line to be consistent with the direction of a target wall line matched with the fourth wall line; And obtaining a third house type vector diagram of the target house based on all the fourth wall lines behind the constraint.
- 9. The method according to claim 1, wherein the performing global optimization on the second house type vector diagram according to a preset global optimization algorithm to obtain a third house type vector diagram of the target house includes: Judging whether any one of the included angles between the fourth wall line and a first coordinate axis and a second coordinate axis in a preset two-dimensional coordinate system meets a second included angle threshold value or not based on any one fourth wall line in the second house type vector diagram, wherein the first coordinate axis and the second coordinate axis are mutually perpendicular; Under the condition that the included angle between the fourth wall line and the first coordinate axis or the second coordinate axis meets the second included angle threshold value, adjusting the coordinate direction of the fourth wall line to obtain a corresponding fifth wall line, so that the coordinate direction of the fifth wall line is consistent with the coordinate direction of the first coordinate axis or the second coordinate axis; judging whether the included angle between the fifth wall line and the sixth wall line adjacent to the fifth wall line meets a third included angle threshold value or not; Under the condition that the included angle between the fifth wall line and the sixth wall line adjacent to the fifth wall line meets a third included angle threshold value, adjusting the coordinate direction of the sixth wall line to obtain a seventh wall line, and enabling the seventh wall line and the fifth wall line to be perpendicular to each other; And obtaining a third house type vector diagram of the target house based on all the fifth wall lines and the seventh wall lines.
- 10. The method of claim 9, wherein the performing global optimization on the second house type vector diagram according to a preset global optimization algorithm to obtain a third house type vector diagram of the target house, further comprises: Judging whether an included angle between the fourth wall line and an eighth wall line meets a fourth included angle threshold value or not based on any fourth wall line in the second house type vector diagram, wherein the eighth wall line is an adjacent wall line of the fourth wall line; Under the condition that the included angle between the fourth wall line and the eighth wall line meets a fourth included angle threshold value, adding a first punishment item to the included angle between the fourth wall line and the eighth wall line through a preset regularization algorithm; When the coordinate direction of the sixth wall line is adjusted to obtain a seventh wall line and the seventh wall line is perpendicular to the fifth wall line, judging whether the coordinate distance of any endpoint movement of the sixth wall line meets a third distance threshold value or not; Under the condition that the third distance threshold is met, adding a second punishment item to the coordinate distance of the endpoint movement of the sixth wall line through the preset regularization algorithm; And obtaining the third house type vector diagram based on the first penalty term, the second penalty term and other wall lines except the added penalty term in the second house type vector diagram.
- 11. An electronic device, comprising: a memory for storing a computer program product; A processor for executing a computer program product stored in said memory, which, when executed, implements the method of any of the preceding claims 1-10.
Description
House type vector diagram processing method and electronic equipment Technical Field The disclosure relates to a three-dimensional reconstruction technology and a point cloud processing technology, in particular to a processing method of a house type vector diagram and electronic equipment. Background The wall structure is extracted from the point cloud of the indoor scene, and the house type vector diagram is obtained by calculation, which is a common method for automatically calculating the house type diagram, the method is widely applied to building design and construction, can help designers and engineers to understand building structures more intuitively, and improves design efficiency and accuracy. However, the directly obtained calculation result tends to be relatively finely divided due to influence of noise interference or the like, and unnecessary details exist, as shown in fig. 1. In the related art, aiming at noise interference in the house type vector diagram, common processing modes are generally limited to modes of removing collinear vertexes, combining similar vertexes and the like, but on one hand, processing results of the modes are often not clean and tidy, and on the other hand, the house type diagram can be distorted. Disclosure of Invention In order to solve the technical problems in the related art, the embodiment of the disclosure provides a processing method of a house type vector diagram and electronic equipment. According to a first aspect of the disclosed embodiments, the disclosed embodiments provide a method for processing a household vector diagram, the method comprising: receiving a first house type vector diagram of a target house; respectively carrying out optimization adjustment on wall lines and vertexes in the first house type vector diagram based on the first house type vector diagram of the target house to obtain a second house type vector diagram; Performing global optimization on the second house type vector diagram according to a preset global optimization algorithm to obtain a third house type vector diagram of the target house; and outputting a third house type vector diagram of the target house. As an optional embodiment of the disclosure, the optimizing and adjusting the wall line and the vertex in the first house type vector diagram based on the first house type vector diagram of the target house to obtain a second house type vector diagram includes: Traversing each wall line in the first house type vector diagram, and determining whether any first wall line and a second wall line adjacent to the first wall line meet a first preset merging condition; under the condition that the first wall line and the second wall line meet the first preset merging condition, merging the first wall line and the second wall line to obtain merged wall lines; Traversing each vertex in the first house type vector graph, and determining whether any one of the first vertices and second vertices adjacent to the first vertices meet a second preset merging condition; Under the condition that the first vertex and the second vertex meet the second preset merging condition, merging the first vertex and the second vertex to obtain a merged vertex; and obtaining the second house type vector graph based on all the merging wall lines and the merging vertexes. As an optional embodiment of the disclosure, the traversing each wall line in the first house type vector graph, determining whether any first wall line and a second wall line adjacent to the first wall line meet a first preset merging condition includes: traversing each wall line in the first house type vector diagram, and judging whether any first wall line and a second wall line adjacent to the first wall line form an included angle or not; Under the condition that an included angle is formed, judging whether the included angle between the first wall line and the second wall line meets a first included angle threshold value or not; Judging whether the first wall line and the second wall line have a common endpoint or not under the condition that the included angle meets a first included angle threshold value; and under the condition of common endpoints, determining that the first wall line and the second wall line meet a first preset merging condition. As an optional embodiment of the disclosure, the traversing each wall line in the first house type vector graph, determining whether any first wall line and a second wall line adjacent to the first wall line meet a first preset merging condition, further includes: Judging whether the distance between two adjacent endpoints of the first wall line and the second wall line meets a first distance threshold or not under the condition that the first wall line and the second wall line do not have common endpoints; And under the condition that the distance meets a first distance threshold value, determining that the first wall line and the second wall line meet a first preset merging condition.