WO2021073530A1 - Building model simplification processing method and apparatus, electronic device, and storage medium - Google Patents

Building model simplification processing method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2021073530A1
WO2021073530A1 PCT/CN2020/120868 CN2020120868W WO2021073530A1 WO 2021073530 A1 WO2021073530 A1 WO 2021073530A1 CN 2020120868 W CN2020120868 W CN 2020120868W WO 2021073530 A1 WO2021073530 A1 WO 2021073530A1
Authority
WO
WIPO (PCT)
Prior art keywords
mesh
area
region
polygon
planar
Prior art date
Application number
PCT/CN2020/120868
Other languages
French (fr)
Chinese (zh)
Inventor
赵靖
Original Assignee
贝壳找房(北京)科技有限公司
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 贝壳找房(北京)科技有限公司 filed Critical 贝壳找房(北京)科技有限公司
Publication of WO2021073530A1 publication Critical patent/WO2021073530A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a simplified processing method, device, electronic equipment, and storage medium of a house model.
  • the collected 3D point cloud is modeled and processed to generate a polygonal mesh model.
  • the polygonal mesh can be a model such as a triangular mesh, a quadrilateral mesh, and a pentagonal mesh.
  • a triangular mesh For example, for an object to build a three-dimensional triangular mesh model, as the complexity of the triangular mesh model increases, the number of triangular meshes required by the object is greatly increased. For a high-precision triangular mesh model, the number of triangular meshes It often reaches millions or even tens of millions.
  • the accuracy of the model is high, it is difficult to display it directly on the mobile device due to the large amount of stored data. Therefore, it is necessary to simplify the model so that the model can store less without losing too much accuracy. data.
  • the Edge Collapse algorithm is usually used to reduce the number of triangle meshes of the model.
  • the hemming simplification algorithm does not consider the global information of the entire model, it cannot distinguish the planar area from the non-planar area well, which affects the simplification effect of the model and reduces the quality of model reconstruction.
  • the embodiments of the present disclosure provide a simplified processing method, device, electronic equipment, and storage medium of a house model.
  • a simplified processing method for a house model including: performing a first plane inspection on an original three-dimensional model, and determining at least one planar area and at least one non-planar area in the original three-dimensional model; Perform a second plane detection on the non-planar area to determine at least one approximately planar sub-area in the non-planar area; and perform polygonal division on the planar area and the approximately planar sub-area to generate the planar area And the second polygonal mesh in the approximate plane sub-region to construct a simplified three-dimensional model.
  • the original three-dimensional model is a three-dimensional model established based on the three-dimensional point cloud of the house, and the planar area and the non-planar area are composed of multiple first polygonal grids.
  • the number of the second polygonal mesh is smaller than the number of the first polygonal mesh.
  • the performing the first plane detection on the original three-dimensional model, and determining the planar area and the non-planar area in the original three-dimensional model includes: based on a preset area growth algorithm and a first planar area judgment rule, Determining the plane area in the original three-dimensional model; and determining the remaining area in the original three-dimensional model excluding the plane area as the non-planar area.
  • determining the planar area in the original three-dimensional model includes: obtaining data that does not belong to any planar area in the original three-dimensional model A polygonal mesh as the first area; use this polygonal mesh as the first central polygonal mesh; obtain the first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the first center
  • the direction deviation between the normal vector of the polygonal mesh and the normal vector of the first adjacent polygonal mesh is less than a preset first normal vector direction deviation threshold, and the first adjacent polygonal mesh is used as the first region Polygon mesh, and merge the polygon mesh of the first region into the first region; wherein, the first adjacent polygon mesh does not belong to any planar region; and the polygon mesh of the first region is used as the first region A central polygonal mesh; repeated execution to obtain the first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the normal vector of the
  • performing second plane detection on the non-planar area, and determining the approximate planar sub-areas in the non-planar area includes: based on a preset area growth algorithm and a second planar area judgment rule, In the non-planar area, the approximate planar sub-area is determined.
  • determining the approximate planar sub-region in the non-planar region includes: obtaining that the non-planar region does not belong to any approximate A polygonal mesh of the plane sub-region is used as the second region; this polygonal mesh is used as the second central polygonal mesh; the second adjacent polygonal mesh around the second central polygonal mesh is obtained, and in response to the determination
  • the direction deviation between the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh is less than a preset second normal vector direction deviation threshold, and the second adjacent polygonal mesh As the second area polygon mesh, and merge the second area polygon mesh in the second area; wherein, the second adjacent polygon mesh does not belong to any flat area or approximate flat sub-area;
  • the second area polygonal mesh is used as the second central polygonal mesh; repeated execution to obtain the second adjacent polygonal mesh around the second central polygonal mesh, in response to
  • the at least one planar area includes a plurality of planar areas
  • the method may further include: aligning the first boundary polygon mesh at the junction of every two adjacent planar areas in the plurality of planar areas.
  • the grid performs area adjustment processing so that the normal vector direction deviation between the first boundary polygon mesh and the third adjacent polygon mesh is smaller than that between the first boundary polygon mesh and the fourth adjacent polygon mesh The deviation of the normal vector direction.
  • the third adjacent polygon grid and the first boundary polygon grid belong to the same plane area, and the fourth adjacent polygon grid and the first boundary polygon grid do not belong to the same plane area.
  • the at least one approximately planar sub-areas includes a plurality of approximately planar sub-areas
  • the method may further include: tracing every two adjacent approximately planar sub-areas located in the plurality of approximately planar sub-areas
  • the second boundary polygon mesh at the junction is subjected to region adjustment processing, so that the normal vector direction deviation between the second boundary polygon mesh and the fifth adjacent polygon mesh is smaller than that of the second boundary polygon mesh and the first boundary polygon mesh.
  • the fifth adjacent polygon mesh and the second boundary polygon mesh belong to the same approximate plane sub-region, and the sixth adjacent polygon mesh and the second boundary polygon mesh do not belong to the same approximate plane subregion.
  • the method may further include: performing straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the planar area or The boundary line of the approximate plane sub-region.
  • the second polygonal mesh is a triangular mesh.
  • the polygonal division of the planar area and the approximate planar sub-region includes: using a preset division algorithm to triangulate the planar area and the approximate planar sub-region.
  • a simplified processing device for a house model including: a first detection module configured to perform a first plane detection on an original three-dimensional model to determine at least one plane in the original three-dimensional model Area and at least one non-planar area; wherein, the original three-dimensional model is a three-dimensional model established based on a three-dimensional point cloud of a house, and wherein, the planar area and the non-planar area are composed of a plurality of first polygonal grids Constitution; a second detection module configured to perform a second planar detection on the non-planar area to determine at least one approximate planar sub-region in the non-planar area; and a model generation module configured to perform a second planar detection on the non-planar area
  • the approximate plane sub-region is divided into polygons, and a second polygonal mesh constituting the plane region and the approximate plane sub-region is generated to construct a simplified three-dimensional model.
  • the number of the second polygonal mesh is smaller than
  • the first detection module is further configured to: determine the planar area in the original three-dimensional model based on a preset area growth algorithm and a first planar area judgment rule; and The remaining area in the original three-dimensional model excluding the planar area is determined as the non-planar area.
  • the first detection module is further configured to: obtain a polygon mesh that does not belong to any plane area in the original three-dimensional model, as the first region; and use this polygon mesh as the first region.
  • a central polygonal mesh obtaining a first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the normal vector of the first central polygonal mesh and the method of the first adjacent polygonal mesh The direction deviation between the vectors is less than the preset first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged into the first region polygon mesh.
  • the first adjacent polygonal mesh does not belong to any planar region; the first regional polygonal mesh is used as the first central polygonal mesh; repeated execution to obtain the first central polygonal mesh periphery
  • An adjacent polygonal mesh in response to determining that the direction deviation between the normal vector of the first central polygonal mesh and the normal vector of the first adjacent polygonal mesh is less than the preset first normal vector direction deviation threshold, the first The adjacent polygon meshes are used as the first region polygon meshes, the first region polygon meshes are merged in the first region, and the first region polygon meshes are used as the first center polygon meshes until it is determined that there is no new polygon mesh.
  • the polygon meshes of the first region can be merged in the first region; and in response to determining that the number of polygon meshes in the first region is greater than a preset first polygon mesh number threshold, the first region Determined as the plane area.
  • the second detection module is further configured to determine the approximate planar sub-region in the non-planar region based on a preset region growth algorithm and a second planar region judgment rule.
  • the second detection module is further configured to: obtain a polygonal grid that does not belong to any approximate planar sub-region in the non-planar area as the second area; and use this polygonal grid as the second area.
  • a second central polygonal mesh obtaining a second adjacent polygonal mesh around the second central polygonal mesh, in response to determining that the normal vector of the second central polygonal mesh is the same as the second adjacent polygonal mesh
  • the direction deviation between the normal vectors of the normal vector is less than the preset second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged in the In the second area; wherein, the second adjacent polygonal grid does not belong to any planar area and approximately planar sub-areas; the second area polygonal grid is used as the second central polygonal grid; repeat execution to obtain the second The second adjacent polygonal mesh around the central polygonal mesh is in response to determining that the direction deviation between the normal vector of the
  • the at least one planar area includes a plurality of planar areas.
  • the model generation module includes a region adjustment unit.
  • the area adjustment unit is configured to: perform area adjustment processing on the first boundary polygon mesh at the junction of every two adjacent planar areas in the plurality of planar areas, so that the first boundary polygon mesh and the first boundary polygon mesh are connected to the first boundary polygon mesh.
  • the normal vector direction deviation between the three adjacent polygonal meshes is smaller than the normal vector direction deviation between the first boundary polygonal mesh and the fourth adjacent polygonal mesh.
  • the third adjacent polygon grid and the first boundary polygon grid belong to the same plane area, and the fourth adjacent polygon grid and the first boundary polygon grid do not belong to the same plane area.
  • the at least one approximately planar sub-region includes a plurality of approximately planar sub-regions.
  • the area adjustment unit is further configured to: perform area adjustment processing on the second boundary polygon grid located at the junction of every two adjacent approximate flat sub-areas in the plurality of approximate flat sub-areas, so that the first The normal vector direction deviation between the second boundary polygon mesh and the fifth adjacent polygon mesh is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh.
  • the fifth adjacent polygon mesh and the second boundary polygon mesh belong to the same approximate plane sub-region, and the sixth adjacent polygon mesh and the second boundary polygon mesh do not belong to the same approximate plane subregion.
  • the model generation module includes a boundary processing unit.
  • the boundary processing unit is configured to: perform straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the planar area or the approximate planar sub-region The boundary line.
  • the second polygonal mesh is a triangular mesh.
  • the model generation module includes a polygon dividing unit.
  • the polygon dividing unit is configured to triangulate the planar area and the approximate planar sub-areas by using a preset division algorithm.
  • a computer-readable storage medium storing a computer program.
  • the processor executes the method according to the exemplary embodiment of the present disclosure. .
  • an electronic device including: a processor and a memory configured to store instructions executable by the processor.
  • the processor is used to execute a method according to an exemplary embodiment of the present disclosure.
  • the number of polygon meshes required to characterize each flat area and approximate flat sub-area can be reduced, and the redundancy of the model can be eliminated.
  • the remaining information can be processed globally for the simplification of details in the model, which improves the real-time performance of 3D model transmission and browsing.
  • Fig. 1 is a flowchart of a simplified processing method for a house model according to some exemplary embodiments of the present disclosure
  • Fig. 2 is a flowchart of performing first plane detection on an original three-dimensional model according to some exemplary embodiments of the present disclosure
  • Fig. 3 is a flowchart of determining a plane area according to some exemplary embodiments of the present disclosure
  • Fig. 5A is a partial schematic diagram of an original triangle mesh model according to some exemplary embodiments of the present disclosure
  • FIG. 5B is a schematic diagram of a result of performing plane detection on an original triangle mesh model according to some exemplary embodiments of the present disclosure
  • 5C is a schematic diagram of a simplified triangle mesh model constructed according to some exemplary embodiments of the present disclosure.
  • Fig. 6 is a schematic block diagram of a simplified processing device for a house model according to some exemplary embodiments of the present disclosure
  • Fig. 7 is a schematic block diagram of a simplified processing device for a house model according to other exemplary embodiments of the present disclosure.
  • FIG. 8 is a schematic diagram of an electronic device according to some exemplary embodiments of the present disclosure.
  • plural may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
  • the term "and/or" in the present disclosure is only an association relationship that describes associated objects, indicating that there can be three relationships, such as A and/or B, which can mean: A alone exists, and A and B exist at the same time. There are three cases of B alone.
  • the character "/" in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
  • the embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general-purpose or special-purpose computing system environments or configurations.
  • Examples of well-known terminal devices, computing systems, environments and/or configurations suitable for use with electronic devices such as terminal devices, computer systems, or servers include, but are not limited to: personal computer systems, server computer systems, thin clients, and thick clients Computers, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
  • Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by the computer system.
  • program modules may include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types.
  • the computer system/server can be implemented in a distributed cloud computing environment.
  • tasks can be performed by remote processing devices linked through a communication network.
  • program modules may be located on a storage medium of a local or remote computing system including a storage device.
  • the number of polygon meshes required to construct a high-precision polygon mesh model often reaches millions or even tens of millions. Although the accuracy of the model is high, it is difficult to display it directly on mobile devices due to the large amount of data stored.
  • the existing hemming simplification algorithm is used to reduce the number of polygonal meshes of the model, and the simplification effect of the model is not good.
  • the simplified processing method of the house model performs first plane detection on the original three-dimensional model, determines the plane area and non-planar area in the original three-dimensional model, performs the second plane detection on the non-planar area, and determines the non-planar area Approximate plane sub-region, divide the plane region and approximate plane sub-region into polygons, and construct a simplified three-dimensional model.
  • redundant information of the model can be removed, the number of polygon meshes required to characterize each planar region and approximate planar subregion can be reduced, the details in the model can be simplified and global processing can be improved, and the transmission and browsing of the 3D model can be improved. Real-time, improve user experience.
  • Fig. 1 is a flowchart of a simplified processing method for a house model according to some exemplary embodiments of the present disclosure. As shown in Fig. 1, the method includes the following steps.
  • step S101 a first plane detection is performed on the original three-dimensional model, and at least one planar area and at least one non-planar area in the original three-dimensional model are determined.
  • the original three-dimensional model is a three-dimensional model established based on a three-dimensional point cloud of a house, and the planar area and the non-planar area are composed of a plurality of first polygonal meshes.
  • the object is scanned to obtain a three-dimensional point cloud, the three-dimensional point cloud of objects such as furniture, a room, etc. is collected, and modeling is performed based on the three-dimensional point cloud to generate an original three-dimensional model.
  • the original three-dimensional model may be a triangular mesh model, a quadrilateral mesh model, or a pentagonal mesh model, etc., which is not limited in the present disclosure.
  • the first polygonal mesh constituting the planar area and the non-planar area may be a triangular mesh, a quadrilateral mesh, a pentagonal mesh, or the like, and the present disclosure does not limit the shape of the first polygonal mesh.
  • step S102 a second plane detection is performed on the non-planar area, and at least one approximate planar sub-areas in the non-planar area is determined.
  • the approximate plane sub-region may refer to a connected region formed by several triangles on the surface of the original three-dimensional model. If the angle between the normal vectors of any two triangles in the connected area does not exceed the preset angle threshold (for example, 10 degrees), and the area of the connected area is greater than the preset area threshold (the preset area threshold can be 0), you can change This connected area is called an approximate plane.
  • a polygonal division is performed on the planar area and the approximate planar sub-region, and a second polygonal mesh constituting the planar area and the approximate planar sub-region is generated to construct a simplified three-dimensional model.
  • the number of second polygonal meshes is less than the number of first polygonal meshes.
  • the second polygonal mesh may be a triangular mesh, a quadrilateral mesh or a pentagonal mesh, etc.
  • the present disclosure does not limit the shape of the second polygonal mesh.
  • the second polygonal mesh and the first polygonal mesh may be the same type of polygonal mesh, or different types of polygonal meshes, which is not limited in the present disclosure.
  • the number of the second polygon meshes constituting the planar area and the approximately planar sub-area is smaller than the number of the first polygon meshes constituting the planar area and the approximately planar sub-area.
  • the constructed simplified three-dimensional model can be a triangular mesh model, a quadrilateral mesh model, or a pentagonal mesh model.
  • FIG. 2 is a flowchart of performing first plane detection on an original three-dimensional model according to some exemplary embodiments of the present disclosure. As shown in Fig. 2, the process may include the following steps.
  • a plane region is determined in the original three-dimensional model based on a preset region growth algorithm and a first plane region judgment rule.
  • step S202 the remaining area excluding the planar area in the original three-dimensional model is determined as a non-planar area.
  • Region growing algorithm is an image segmentation technology that combines similar pixels to form regions based on discriminant rules.
  • the first plane area judgment rule can include the first normal vector direction deviation threshold and the first polygon mesh number threshold.
  • the first normal vector direction deviation threshold and the first polygon can be preset Threshold for the number of shaped grids, etc.
  • Fig. 3 is a flowchart of determining a plane area in an embodiment of a simplified processing method for a house model according to some exemplary embodiments of the present disclosure. As shown in Fig. 3, the process may include the following steps.
  • step S301 a polygon mesh that does not belong to any plane area in the original three-dimensional model is obtained as the first area.
  • step S302 use this polygon mesh as the first central polygon mesh.
  • step S303 the first adjacent polygon mesh around the first central polygon mesh is obtained, in response to determining that the direction deviation between the normal vector of the first central polygon mesh and the normal vector of the first adjacent polygon mesh is less than For the first normal vector direction deviation threshold, the first adjacent polygonal mesh is used as the first area polygonal mesh, and the first area polygonal mesh is merged into the first area.
  • the first neighboring polygonal mesh does not belong to any planar area.
  • step S304 the first area polygon mesh is used as the first central polygon mesh.
  • step S305 it is determined whether there is a new polygon mesh of the first area that can be merged in the first area, if yes, step S303 is executed, otherwise, step S306 is executed.
  • step S306 in response to determining that the number of polygonal meshes in the first area is greater than the first polygonal mesh number threshold, the first area is determined to be a flat area.
  • the original three-dimensional model is a triangular mesh model based on the three-dimensional point cloud of the house.
  • the first normal vector direction deviation threshold is A1
  • the first triangle mesh number threshold is N1.
  • the first adjacent triangular mesh of the first central triangular mesh is obtained, and the first adjacent triangular mesh does not belong to any plane area.
  • the first adjacent triangle mesh As the first area triangle mesh, the first area triangle mesh is merged into the first area. This first area triangle mesh is used as the first center triangle mesh. Determine whether there is a new first area polygon mesh that can be merged in the first area. If there is a new first area polygon mesh that can be merged in the first area, then loop the above method to obtain a new first area triangle mesh grid. If no new polygon meshes of the first region can be merged in the first region, the number m1 of triangle meshes in the first region is obtained. If m1 is greater than the first triangle mesh number threshold N1, it is determined that the first area is a flat area. If m1 is less than or equal to the first triangle mesh number threshold N1, it is determined that the first area is not a flat area.
  • the plane detection method to scan all the triangle meshes that constitute the triangle mesh model, first find a certain triangle mesh as the current plane area, use the triangle mesh as the starting point to expand around, determine the first area polygon mesh and Join the flat area.
  • the plane detection through the setting of the first normal vector direction deviation threshold and the first polygon grid number threshold, in order to obtain the real plane area, such as the wall, the floor, the ceiling and other plane areas.
  • the plane area is determined in the triangle mesh model, and the remaining area except the plane area in the triangle mesh model is determined as a non-planar area.
  • multiple methods may be used to perform the second plane detection on the non-planar area. For example, based on a preset region growth algorithm and a second planar region judgment rule, an approximate planar sub-region is determined in a non-planar region.
  • a second planar area judgment rule is set, and the second planar area judgment rule may include a second normal vector direction deviation threshold, a second polygon mesh number threshold, and the like.
  • the second normal vector direction deviation threshold and the second polygon mesh quantity threshold can be preset, where the second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh quantity threshold is less than The first threshold of the number of polygon meshes.
  • the approximate flat sub-area usually has a small area.
  • a spherical surface can be approximated by many approximate flat sub-areas.
  • Each first triangular grid is a plane.
  • FIG. 4 is a flowchart of determining an approximate plane sub-region according to some exemplary embodiments of the present disclosure. As shown in FIG. 4, the process may include the following steps.
  • step S401 a polygonal grid that does not belong to any approximate planar sub-region in the non-planar area is obtained as the second area.
  • step S402 use this polygonal mesh as the second central polygonal mesh.
  • step S403 a second adjacent polygon mesh around the second central polygon mesh is obtained, and in response to determining that the direction deviation between the normal vector of the second central polygon mesh and the normal vector of the second adjacent polygon mesh is less than
  • the second normal vector direction deviation threshold uses the second adjacent polygon mesh as the second region polygon mesh, and merges the second region polygon mesh into the second region.
  • the second adjacent polygonal grid does not belong to any planar area and approximately planar sub-areas.
  • step S404 the second area polygon mesh is used as the second central polygon mesh.
  • step S405 it is determined whether there is a new polygon mesh of the second area that can be merged in the second area, if yes, step S403 is executed, otherwise, step S406 is executed.
  • step S406 in response to determining that the number of polygonal meshes in the second region is greater than the second polygonal mesh number threshold, the second region is determined as an approximately planar subregion.
  • the second normal vector direction deviation threshold is set to A2, and the second triangular mesh number threshold is N2.
  • the second triangular mesh number threshold is N2.
  • the number m2 of triangle meshes in the second region is obtained. If m2 is greater than the first triangular mesh number threshold N2, the second area is determined to be an approximate planar sub-region, and if m2 is less than or equal to the second triangular mesh number threshold N2, it is determined that the second area is not an approximate planar sub-region.
  • the above-mentioned method is used to scan all the triangular meshes that constitute the non-planar area, and the approximate planar sub-region is determined in the non-planar area.
  • the flat area and the approximate flat sub-area contain multiple triangular meshes.
  • the flat area and the approximate flat sub-area will be represented by a plane, and the three-dimensional model can be simplified through the flat area and the approximate flat sub-area.
  • Some unimportant details in the plane area can be ignored, and they can be approximated as a plane uniformly. Since the area of the approximate plane sub-region is small, the details of the approximate plane sub-region can be better preserved.
  • the at least one plane area obtained by performing the first plane detection on the original three-dimensional model may include multiple plane areas.
  • the method of the exemplary embodiment of the present disclosure may further include the following steps: performing area adjustment processing on the first boundary polygon mesh located at the junction of every two adjacent planar regions among the plurality of planar regions, so that the first boundary polygon mesh The normal vector direction deviation between the grid and the third adjacent polygon mesh is smaller than the normal vector direction deviation between the first boundary polygon mesh and the fourth adjacent polygon mesh.
  • the third adjacent polygon mesh and the first boundary polygon mesh belong to the same plane area
  • the fourth adjacent polygon mesh and the first boundary polygon mesh do not belong to the same plane area.
  • a part of the edge of the flat area E is connected with a part of the edge of the flat area F, and a first boundary polygon mesh P1 belonging to the flat area E at the junction of the flat area E and the flat area F is obtained.
  • the third adjacent polygon mesh P2 and the first boundary polygon mesh P1 belong to the same plane area E, and the fourth adjacent polygon mesh P3 belongs to the plane area F.
  • the first boundary polygon mesh P1 remains unchanged in the plane area E, if W1 is greater than W2, the plane area to which the first boundary polygon mesh P1 belongs is changed, that is, the first boundary polygon mesh is set
  • the grid P1 belongs to the plane area F.
  • the first boundary polygon mesh includes the first boundary polygon mesh before the area adjustment, and the first boundary polygon mesh located at the new connection of the plane area E and the plane area F after the area adjustment.
  • the at least one approximately planar sub-areas obtained by performing the second planar detection on the non-planar area may include a plurality of approximately planar sub-areas.
  • the method of the exemplary embodiment of the present disclosure may further include the following steps: performing area adjustment processing on the second boundary polygon grid located at the junction of every two adjacent approximate planar sub-regions among the plurality of approximate planar sub-regions, so that the first The normal vector direction deviation between the second boundary polygon mesh and the fifth adjacent polygon mesh is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh.
  • the fifth adjacent polygonal mesh and the second boundary polygonal mesh belong to the same approximate planar sub-region
  • the sixth adjacent polygonal mesh and the second boundary polygonal mesh do not belong to the same approximate planar subregion.
  • a part of the edge of the approximately planar sub-region H is connected with a part of the edge of the approximately planar sub-region J, and a second boundary polygon that belongs to the approximately planar sub-region H at the junction of the approximately planar sub-region H and the approximate planar sub-region J is obtained.
  • Mesh K1 determine the normal vector direction deviation W3 between the second boundary polygon mesh K1 and the fifth adjacent polygon mesh K2, determine the difference between the second boundary polygon mesh K1 and the sixth adjacent polygon mesh K3 Normal vector direction deviation W4.
  • the fifth adjacent polygon mesh K2 and the second boundary polygon mesh K1 belong to the same approximate planar sub-region H
  • the sixth adjacent polygon mesh K3 belongs to the approximate planar sub-region J.
  • the second boundary polygon mesh K1 remains unchanged. If W3 is greater than W4, the plane area to which the second boundary polygon mesh K1 belongs is changed, that is, the second boundary polygon mesh K1 is set to belong to the approximate plane sub-region J.
  • the second boundary polygon grid includes the original second boundary polygon grid and the second boundary polygon grid located at the new connection of the approximately flat sub-region H and the approximately flat sub-region J after the region adjustment.
  • the above-mentioned area adjustment processing method is used to adjust the segmentation results of the flat area and the approximate flat sub-area to make the segmentation Close to the optimal, can reduce the error.
  • the method of the exemplary embodiment of the present disclosure may further include the following steps: performing straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the planar area Or approximate the boundary line of the plane sub-region.
  • One or more edge line segments of each triangle grid located at the edge of the planar area or approximately planar sub-area form the uneven boundary of the planar area or approximately planar sub-area.
  • the boundary of each planar area or approximately planar sub-area consists of many The small edge line segment is composed, and the boundary information is more redundant, which can be simplified by merging between the edge line segments.
  • each flat area or approximate flat sub-area is approximated by a polygon.
  • Multiple fitting methods can be used for straight line fitting. For example, setting a distance threshold, based on the distance threshold and a straight line fitting algorithm to fit multiple connected edge line segments into a boundary line segment, the vertical distance from the end point of each edge line segment in the multiple edge line segments to the boundary line segment is all Less than this distance threshold.
  • polygonal division of the planar area and the approximate planar sub-areas may use multiple division methods.
  • the second polygon mesh is a triangular mesh
  • the flat area and the approximate flat sub-area are triangulated using a preset division algorithm to generate a simplified three-dimensional model.
  • the subdivision algorithm includes: Delaunay triangulation algorithm and so on.
  • FIG. 5A three-dimensional point clouds for furniture, rooms, etc. are collected, and a triangular mesh model is generated based on the three-dimensional point cloud.
  • the triangular mesh model is composed of multiple triangular meshes.
  • the first flat sheet detection and the second flat detection are performed on the triangle mesh model to determine the flat area and the approximate flat sub-area.
  • a Delaunay triangulation algorithm is used to triangulate the planar area and the approximate planar sub-area to generate a triangular mesh that constitutes the planar area and the approximate planar sub-area to construct a simplified three-dimensional model.
  • the simplified processing method of the house model in the above embodiment obtains the planar area and the approximate planar sub-region in the model, and divides the planar area and the approximate planar sub-region into polygons to construct a simplified three-dimensional model.
  • the redundant information of the model can be removed, the number of polygon meshes required to characterize each planar area and the approximate planar sub-region can be reduced, and the simplification of the model can be realized.
  • Different detection algorithms are used for the flat area and the approximate flat sub-area, which can simplify the details in the model for global processing, can simplify the details in the flat area and retain more details in the approximate flat sub-area, which improves the transmission of the 3D model And real-time browsing, improve user experience.
  • FIG. 6 is a schematic block diagram of a simplified processing device 600 for a house model according to some exemplary embodiments of the present disclosure.
  • the device 600 includes: a first detection module 601, a second detection module 602, and a model generation module 603.
  • the first detection module 601 is configured to perform a first plane detection on the original three-dimensional model, and determine at least one planar area and at least one non-planar area in the original three-dimensional model.
  • the original 3D model is a 3D model based on the 3D point cloud of the house.
  • the planar area and the non-planar area are composed of a plurality of first polygonal meshes.
  • the second detection module 602 is configured to perform a second planar detection on the non-planar area, and determine at least one approximate planar sub-areas in the non-planar area.
  • the model generation module 603 is configured to divide the planar area and the approximate planar sub-area into polygons, and generate a second polygon mesh that constitutes the planar area and the approximate planar sub-area, so as to construct a simplified three-dimensional model.
  • the number of second polygonal meshes is smaller than the number of first polygonal meshes.
  • the first detection module 601 is further configured to determine the plane area in the original three-dimensional model based on the preset area growth algorithm and the first plane area judgment rule, and remove the flat area from the original three-dimensional model. The remaining area is determined as a non-planar area.
  • the first plane area judgment rule includes: a first normal vector direction deviation threshold and a first polygon mesh number threshold.
  • the first detection module 601 is further configured to:
  • This polygonal mesh is used as the first central polygonal mesh; the first adjacent polygonal mesh around the first central polygonal mesh is obtained, and the normal vector of the first central polygonal mesh is determined in response to the first adjacent polygonal mesh
  • the direction deviation between the normal vectors of is less than the first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged into the first region; wherein, The first adjacent polygon mesh does not belong to any plane area;
  • first area polygon mesh as the first central polygon mesh; repeat the obtaining of the first adjacent polygon mesh around the first central polygon mesh, in response to the determination of the first central polygon mesh
  • the direction deviation between the normal vector and the normal vector of the first adjacent polygon mesh is less than a preset first normal vector direction deviation threshold, and the first adjacent polygon mesh is used as the first region polygon mesh,
  • merge the first area polygon mesh in the first area and use the first area polygon mesh as the first central polygon mesh until it is determined that there is no new first area polygon mesh Can be combined in the first area;
  • the first area is determined to be a flat area.
  • the second detection module 602 is further configured to determine an approximate planar sub-region in the non-planar region based on a preset region growth algorithm and a second planar region judgment rule.
  • the second plane area judgment rule includes: a second normal vector direction deviation threshold and a second polygon mesh number threshold.
  • the second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh number threshold is less than the first polygon mesh number threshold.
  • the second detection module 602 is also configured to:
  • This polygon mesh is used as the second central polygon mesh; the second adjacent polygon mesh around the second central polygon mesh is obtained, in response to determining the normal vector of the second central polygon mesh and the second adjacent polygon mesh
  • the direction deviation between the normal vectors of is less than the second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged into the second region; wherein,
  • the second adjacent polygonal grid does not belong to any planar area and approximate planar sub-areas; the polygonal grid of the second area is used as the second central polygonal grid;
  • the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged into the In the second area, and the operation of using the second area polygonal mesh as the second central polygonal mesh, until it is determined that no new second area polygonal mesh can be merged in the second area;
  • the second region is determined to be an approximately planar subregion.
  • the model generation module 603 includes: a region adjustment unit 6031, a boundary processing unit 6032 and a polygon division unit 6033.
  • the area adjustment unit 6031 is configured to perform area adjustment processing on the first boundary polygon mesh located at the junction of two adjacent planar areas, so that the normal vector between the first boundary polygon mesh and the third adjacent polygon mesh is The direction deviation is smaller than the normal vector direction deviation between the first boundary polygon mesh and the fourth adjacent polygon mesh.
  • the third adjacent polygon mesh and the first boundary polygon mesh belong to the same plane area, and the fourth adjacent polygon mesh and the first boundary polygon mesh do not belong to the same plane area.
  • the area adjustment unit 6031 is further configured to: perform area adjustment processing on the second boundary polygon mesh at the junction of two adjacent approximate planar sub-regions, so that the second boundary polygon mesh and the fifth adjacent polygon mesh are different from each other.
  • the normal vector direction deviation between the two is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh.
  • the fifth adjacent polygonal mesh and the second boundary polygonal mesh belong to the same approximate plane subregion, and the sixth adjacent polygonal mesh and the second boundary polygonal mesh do not belong to the same approximate plane subregion.
  • the boundary processing unit 6032 is configured to perform a straight line fitting process on the edge of the first polygonal mesh located at the edge of the planar area or the approximate planar sub-region to generate the boundary of the planar area or the approximate planar sub-region. line.
  • the second polygon mesh is a triangle mesh.
  • the polygon division unit 6033 uses a preset division algorithm to triangulate the planar area and the approximate planar sub-areas.
  • the division algorithm includes the Delaunay triangulation algorithm.
  • FIG. 8 is a schematic diagram of an electronic device 81 according to some exemplary embodiments of the present disclosure. As shown in FIG. 8, the electronic device 81 includes one or more processors 811 and a memory 812.
  • the processor 811 may be a central processing unit (CPU) or another form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 81 to perform desired functions.
  • CPU central processing unit
  • the processor 811 may control other components in the electronic device 81 to perform desired functions.
  • the memory 812 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • Volatile memory for example, may include random access memory (RAM) and/or cache memory (cache).
  • Non-volatile memory for example, may include: read-only memory (ROM), hard disk, flash memory, and so on.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 811 may run the program instructions to implement the simplified processing method of the house model and/or other desired functions of the various embodiments of the present disclosure above. .
  • Various contents such as input signal, signal component, noise component, etc. can also be stored in the computer-readable storage medium.
  • the electronic device 81 may further include: an input device 813, an output device 814, etc., and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
  • the input device 813 may also include, for example, a keyboard, a mouse, and so on.
  • the output device 814 can output various information to the outside.
  • the output device 814 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
  • the electronic device 81 may also include any other appropriate components.
  • the embodiments of the present disclosure may also be computer program products, which include computer program instructions.
  • the processor executes what is described in the “exemplary method” section of this specification. Steps in a simplified processing method of a house model according to various embodiments of the present disclosure.
  • the computer program product may use any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present disclosure.
  • the programming languages include object-oriented programming languages, such as Java, C++, etc. , Also includes conventional procedural programming languages, such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • embodiments of the present disclosure may also be a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the processor executes the "exemplary method" part of this specification.
  • the computer-readable storage medium may adopt any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples (non-exhaustive list) of readable storage media may include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the simplified processing method, device, electronic equipment, and storage medium of the house model in the above embodiment perform plane detection on the original three-dimensional model, determine the plane area and the approximate plane sub-areas in the original three-dimensional model, and determine the plane area and the approximate plane sub-areas in the original three-dimensional model.
  • the number of grids can realize the simplification of the model; different detection algorithms are used for the flat area and the approximate flat sub-area, and the global processing of the simplification of the details in the model can simplify the details in the flat area and can retain the comparison in the approximate flat sub-area. Multiple details improve the real-time performance of 3D model transmission and browsing, and effectively improve customer experience.
  • the method and apparatus of the present disclosure may be implemented in many ways.
  • the method and apparatus of the present disclosure can be implemented by software, hardware, firmware or any combination of software, hardware, and firmware.
  • the above-mentioned order of the steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless specifically stated otherwise.
  • the present disclosure can also be implemented as programs recorded in a recording medium, and these programs include machine-readable instructions for implementing the method according to the present disclosure.
  • the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
  • each component or each step can be decomposed and/or recombined. These decomposition and/or recombination should be regarded as equivalent solutions of the present disclosure.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

A building model simplification processing method and apparatus, an electronic device, and a storage medium, relating to the technical field of computer intelligence. The method comprises: performing first plane detection on an original three-dimensional model to determine at least one plane area and at least one non-plane area in the original three-dimensional model (S101); performing second plane detection on the non-plane area to determine at least one approximate plane sub-area in the non-plane area (S102); and performing polygon division on the plane area and the approximate plane sub-area to generate second polygon meshes forming the plane area and the approximate plane sub-area, so as to build a simplified three-dimensional model (S103).

Description

房屋模型的简化处理方法、装置以及电子设备、存储介质Simplified processing method, device, electronic equipment and storage medium of house model 技术领域Technical field
本公开涉及计算机技术领域,尤其涉及一种房屋模型的简化处理方法、装置以及电子设备、存储介质。The present disclosure relates to the field of computer technology, and in particular to a simplified processing method, device, electronic equipment, and storage medium of a house model.
背景技术Background technique
在三维建模的过程中,对采集到的三维点云进行建模处理,生成多边形网格模型。多边形网格可以为三角形网格、四边形网格、五边形网格等模型。例如,对于物体建立三维的三角形网格模型,随着三角形网格模型的复杂性增加,表示物体所需要的三角形网格的数量大大增加,对于高精度的三角形网格模型,三角形网格的数量常常达到百万甚至千万。虽然模型的精度高,但由于存储了大量的数据,难以直接在移动端设备上进行展示,因此,需要对模型进行简化处理,使模型在精度不损失过多的情况下,能存储较少的数据。In the process of 3D modeling, the collected 3D point cloud is modeled and processed to generate a polygonal mesh model. The polygonal mesh can be a model such as a triangular mesh, a quadrilateral mesh, and a pentagonal mesh. For example, for an object to build a three-dimensional triangular mesh model, as the complexity of the triangular mesh model increases, the number of triangular meshes required by the object is greatly increased. For a high-precision triangular mesh model, the number of triangular meshes It often reaches millions or even tens of millions. Although the accuracy of the model is high, it is difficult to display it directly on the mobile device due to the large amount of stored data. Therefore, it is necessary to simplify the model so that the model can store less without losing too much accuracy. data.
对现有的模型进行简化,通常采用折边简化(Edge Collapse)算法,减少模型的三角形网格数量。但是折边简化算法由于不考虑整个模型的全局信息,不能很好地对平面区域和非平面区域做区分,使得模型的简化效果受到影响,降低了模型重建的质量。To simplify the existing model, the Edge Collapse algorithm is usually used to reduce the number of triangle meshes of the model. However, since the hemming simplification algorithm does not consider the global information of the entire model, it cannot distinguish the planar area from the non-planar area well, which affects the simplification effect of the model and reduces the quality of model reconstruction.
发明内容Summary of the invention
本公开的实施例提供了一种房屋模型的简化处理方法、装置以及电子设备、存储介质。The embodiments of the present disclosure provide a simplified processing method, device, electronic equipment, and storage medium of a house model.
根据本公开实施例的一个方面,提供一种房屋模型的简化处理方法,包括:对原始三维模型进行第一平面检测,确定所述原始三维模型中的至少一个平面区域和至少一个非平面区域;对所述非平面区域进行第二平面检测,确定所述非平面区域中的至少一个近似平面子区域;以及对所述平面区域和所述近似平面子区域进行多边形划分,生成构成所述平面区域和所述近似平面子区域中的第二多边形网格,以构建简化的三维模型。原始三维模型为基于房屋的三维点云建立的三维模型,平面区域和非平面区域由多个第一多边形网格构成。所述第二多边形网格的数量小于所述第一多边形网格的数量。According to one aspect of the embodiments of the present disclosure, there is provided a simplified processing method for a house model, including: performing a first plane inspection on an original three-dimensional model, and determining at least one planar area and at least one non-planar area in the original three-dimensional model; Perform a second plane detection on the non-planar area to determine at least one approximately planar sub-area in the non-planar area; and perform polygonal division on the planar area and the approximately planar sub-area to generate the planar area And the second polygonal mesh in the approximate plane sub-region to construct a simplified three-dimensional model. The original three-dimensional model is a three-dimensional model established based on the three-dimensional point cloud of the house, and the planar area and the non-planar area are composed of multiple first polygonal grids. The number of the second polygonal mesh is smaller than the number of the first polygonal mesh.
根据本公开的一个示例,所述对原始三维模型进行第一平面检测,确定所述原始三维模型中的平面区域和非平面区域包括:基于预设的区域生长算法以及第一平面区域判 断规则,在所述原始三维模型中确定所述平面区域;以及将所述原始三维模型中除去所述平面区域的剩余区域确定为所述非平面区域。According to an example of the present disclosure, the performing the first plane detection on the original three-dimensional model, and determining the planar area and the non-planar area in the original three-dimensional model includes: based on a preset area growth algorithm and a first planar area judgment rule, Determining the plane area in the original three-dimensional model; and determining the remaining area in the original three-dimensional model excluding the plane area as the non-planar area.
根据本公开的一个示例,基于预设的区域生长算法以及第一平面区域判断规则,在所述原始三维模型中确定所述平面区域包括:获得所述原始三维模型中不属于任一平面区域的一个多边形网格,作为第一区域;将此多边形网格作为第一中心多边形网格;获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将第一区域多边形网格合并在所述第一区域内;其中,所述第一相邻多边形网格不属于任一平面区域;将所述第一区域多边形网格作为第一中心多边形网格;重复执行获得第一中心多边形网格周边的第一相邻多边形网格,响应于确定第一中心多边形网格的法向量与第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将第一相邻多边形网格作为第一区域多边形网格,并将第一区域多边形网格合并在第一区域内,以及将第一区域多边形网格作为第一中心多边形网格的操作,直至确定没有新的第一区域多边形网格能够合并在第一区域内;以及响应于确定所述第一区域内的多边形网格数量大于预设的第一多边形网格数量阈值,将所述第一区域确定为所述平面区域。According to an example of the present disclosure, based on a preset area growth algorithm and a first planar area judgment rule, determining the planar area in the original three-dimensional model includes: obtaining data that does not belong to any planar area in the original three-dimensional model A polygonal mesh as the first area; use this polygonal mesh as the first central polygonal mesh; obtain the first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the first center The direction deviation between the normal vector of the polygonal mesh and the normal vector of the first adjacent polygonal mesh is less than a preset first normal vector direction deviation threshold, and the first adjacent polygonal mesh is used as the first region Polygon mesh, and merge the polygon mesh of the first region into the first region; wherein, the first adjacent polygon mesh does not belong to any planar region; and the polygon mesh of the first region is used as the first region A central polygonal mesh; repeated execution to obtain the first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the normal vector of the first central polygonal mesh and the normal vector of the first adjacent polygonal mesh The direction deviation of the first normal vector direction deviation is less than the preset first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged into the first region, and the first The operation of the regional polygon mesh as the first central polygon mesh until it is determined that no new first region polygon mesh can be merged in the first region; and in response to determining that the number of polygon meshes in the first region is greater than the predetermined number Set a threshold value for the number of first polygonal meshes, and determine the first area as the plane area.
根据本公开的一个示例,对所述非平面区域进行第二平面检测,确定所述非平面区域中的近似平面子区域包括:基于预设的区域生长算法以及第二平面区域判断规则,在所述非平面区域中确定所述近似平面子区域。According to an example of the present disclosure, performing second plane detection on the non-planar area, and determining the approximate planar sub-areas in the non-planar area includes: based on a preset area growth algorithm and a second planar area judgment rule, In the non-planar area, the approximate planar sub-area is determined.
根据本公开的一个示例,基于预设的区域生长算法以及第二平面区域判断规则,在所述非平面区域中确定所述近似平面子区域包括:获得所述非平面区域中不属于任一近似平面子区域的一个多边形网格,作为第二区域;将此多边形网格作为第二中心多边形网格;获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,将所述第二相邻多边形网格作为第二区域多边形网格,并将第二区域多边形网格合并在所述第二区域内;其中,所述第二相邻多边形网格不属于任一平面区域和近似平面子区域;将所述第二区域多边形网格作为第二中心多边形网格;重复执行获得第二中心多边形网格周边的第二相邻多边形网格,响应于确定第二中心多边形网格的法向量与第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,则将第二相邻多边形网格作为第二区域多边形网格,并将第二区域多 边形网格合并在第二区域内,以及将第二区域多边形网格作为第二中心多边形网格的操作,直至确定没有新的第二区域多边形网格能够合并在第二区域内;以及响应于确定所述第二区域内的多边形网格数量大于预设的第二多边形网格数量阈值,将所述第二区域确定为所述近似平面子区域。所述第二法向量方向偏差阈值大于所述第一法向量方向偏差阈值,第二多边形网格数量阈值小于第一多边形网格数量阈值。According to an example of the present disclosure, based on a preset region growth algorithm and a second planar region judgment rule, determining the approximate planar sub-region in the non-planar region includes: obtaining that the non-planar region does not belong to any approximate A polygonal mesh of the plane sub-region is used as the second region; this polygonal mesh is used as the second central polygonal mesh; the second adjacent polygonal mesh around the second central polygonal mesh is obtained, and in response to the determination The direction deviation between the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh is less than a preset second normal vector direction deviation threshold, and the second adjacent polygonal mesh As the second area polygon mesh, and merge the second area polygon mesh in the second area; wherein, the second adjacent polygon mesh does not belong to any flat area or approximate flat sub-area; The second area polygonal mesh is used as the second central polygonal mesh; repeated execution to obtain the second adjacent polygonal mesh around the second central polygonal mesh, in response to determining the normal vector of the second central polygonal mesh and the second phase The direction deviation between the normal vectors of adjacent polygonal meshes is less than the preset second normal vector direction deviation threshold, then the second adjacent polygonal mesh is used as the second area polygonal mesh, and the second area polygonal meshes are merged In the second area, and the operation of using the second area polygon mesh as the second central polygon mesh, until it is determined that no new second area polygon mesh can be merged in the second area; and in response to determining the first area The number of polygonal grids in the second area is greater than a preset second threshold for the number of polygonal grids, and the second area is determined as the approximate plane sub-area. The second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh number threshold is less than the first polygon mesh number threshold.
根据本公开的一个示例,所述至少一个平面区域包括多个平面区域,该方法还可以包括:对位于所述多个平面区域中的每两个相邻平面区域连接处的第一边界多边形网格进行区域调整处理,以使所述第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于所述第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差。所述第三相邻多边形网格与所述第一边界多边形网格属于同一平面区域,第四相邻多边形网格与所述第一边界多边形网格不属于同一平面区域。According to an example of the present disclosure, the at least one planar area includes a plurality of planar areas, and the method may further include: aligning the first boundary polygon mesh at the junction of every two adjacent planar areas in the plurality of planar areas. The grid performs area adjustment processing so that the normal vector direction deviation between the first boundary polygon mesh and the third adjacent polygon mesh is smaller than that between the first boundary polygon mesh and the fourth adjacent polygon mesh The deviation of the normal vector direction. The third adjacent polygon grid and the first boundary polygon grid belong to the same plane area, and the fourth adjacent polygon grid and the first boundary polygon grid do not belong to the same plane area.
根据本公开的一个示例,所述至少一个近似平面子区域包括多个近似平面子区域,该方法还可以包括:对位于所述多个近似平面子区域中的每两个相邻近似平面子区域连接处的第二边界多边形网格进行区域调整处理,以使所述第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于所述第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差。所述第五相邻多边形网格与所述第二边界多边形网格属于同一近似平面子区域,第六相邻多边形网格与所述第二边界多边形网格不属于同一近似平面子区域。According to an example of the present disclosure, the at least one approximately planar sub-areas includes a plurality of approximately planar sub-areas, and the method may further include: tracing every two adjacent approximately planar sub-areas located in the plurality of approximately planar sub-areas The second boundary polygon mesh at the junction is subjected to region adjustment processing, so that the normal vector direction deviation between the second boundary polygon mesh and the fifth adjacent polygon mesh is smaller than that of the second boundary polygon mesh and the first boundary polygon mesh. The normal vector direction deviation between six adjacent polygonal meshes. The fifth adjacent polygon mesh and the second boundary polygon mesh belong to the same approximate plane sub-region, and the sixth adjacent polygon mesh and the second boundary polygon mesh do not belong to the same approximate plane subregion.
根据本公开的一个示例,该方法还可以包括:对位于所述平面区域或所述近似平面子区域边缘的第一多边形网格的边线进行直线拟合处理,以生成所述平面区域或所述近似平面子区域的边界线。According to an example of the present disclosure, the method may further include: performing straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the planar area or The boundary line of the approximate plane sub-region.
根据本公开的一个示例,所述第二多边形网格为三角形网格。对所述平面区域和所述近似平面子区域进行多边形划分包括:利用预设的剖分算法对所述平面区域和所述近似平面子区域进行三角形划分。According to an example of the present disclosure, the second polygonal mesh is a triangular mesh. The polygonal division of the planar area and the approximate planar sub-region includes: using a preset division algorithm to triangulate the planar area and the approximate planar sub-region.
根据本公开实施例的另一方面,提供一种房屋模型的简化处理装置,包括:第一检测模块,配置为对原始三维模型进行第一平面检测,确定所述原始三维模型中的至少一个平面区域和至少一个非平面区域;其中,所述原始三维模型为基于房屋的三维点云建立的三维模型,并且其中,所述平面区域和所述非平面区域由多个第一多边形网格构成;第二检测模块,配置为对所述非平面区域进行第二平面检测,确定所述非平面区域中的至少一个近似平面子区域;以及模型生成模块,配置为对所述平面区域和所述近似平面 子区域进行多边形划分,生成构成所述平面区域和所述近似平面子区域中的第二多边形网格,以构建简化的三维模型。所述第二多边形网格的数量小于所述第一多边形网格的数量。According to another aspect of the embodiments of the present disclosure, there is provided a simplified processing device for a house model, including: a first detection module configured to perform a first plane detection on an original three-dimensional model to determine at least one plane in the original three-dimensional model Area and at least one non-planar area; wherein, the original three-dimensional model is a three-dimensional model established based on a three-dimensional point cloud of a house, and wherein, the planar area and the non-planar area are composed of a plurality of first polygonal grids Constitution; a second detection module configured to perform a second planar detection on the non-planar area to determine at least one approximate planar sub-region in the non-planar area; and a model generation module configured to perform a second planar detection on the non-planar area The approximate plane sub-region is divided into polygons, and a second polygonal mesh constituting the plane region and the approximate plane sub-region is generated to construct a simplified three-dimensional model. The number of the second polygonal mesh is smaller than the number of the first polygonal mesh.
根据本公开的一个示例,所述第一检测模块还被配置为:基于预设的区域生长算法以及第一平面区域判断规则,在所述原始三维模型中确定所述平面区域;以及将所述原始三维模型中除去所述平面区域的剩余区域确定为所述非平面区域。According to an example of the present disclosure, the first detection module is further configured to: determine the planar area in the original three-dimensional model based on a preset area growth algorithm and a first planar area judgment rule; and The remaining area in the original three-dimensional model excluding the planar area is determined as the non-planar area.
根据本公开的一个示例,所述第一检测模块还被配置为:获得所述原始三维模型中不属于任一平面区域的一个多边形网格,作为第一区域;将此多边形网格作为第一中心多边形网格;获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将第一区域多边形网格合并在所述第一区域内;其中,所述第一相邻多边形网格不属于任一平面区域;将所述第一区域多边形网格作为第一中心多边形网格;重复执行获得第一中心多边形网格周边的第一相邻多边形网格,响应于确定第一中心多边形网格的法向量与第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将第一相邻多边形网格作为第一区域多边形网格,并将第一区域多边形网格合并在第一区域内,以及将第一区域多边形网格作为第一中心多边形网格的操作,直至确定没有新的第一区域多边形网格能够合并在第一区域内;以及响应于确定所述第一区域内的多边形网格数量大于预设的第一多边形网格数量阈值,将所述第一区域确定为所述平面区域。According to an example of the present disclosure, the first detection module is further configured to: obtain a polygon mesh that does not belong to any plane area in the original three-dimensional model, as the first region; and use this polygon mesh as the first region. A central polygonal mesh; obtaining a first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the normal vector of the first central polygonal mesh and the method of the first adjacent polygonal mesh The direction deviation between the vectors is less than the preset first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged into the first region polygon mesh. Region; wherein, the first adjacent polygonal mesh does not belong to any planar region; the first regional polygonal mesh is used as the first central polygonal mesh; repeated execution to obtain the first central polygonal mesh periphery An adjacent polygonal mesh, in response to determining that the direction deviation between the normal vector of the first central polygonal mesh and the normal vector of the first adjacent polygonal mesh is less than the preset first normal vector direction deviation threshold, the first The adjacent polygon meshes are used as the first region polygon meshes, the first region polygon meshes are merged in the first region, and the first region polygon meshes are used as the first center polygon meshes until it is determined that there is no new polygon mesh. The polygon meshes of the first region can be merged in the first region; and in response to determining that the number of polygon meshes in the first region is greater than a preset first polygon mesh number threshold, the first region Determined as the plane area.
根据本公开的一个示例,所述第二检测模块还被配置为:基于预设的区域生长算法以及第二平面区域判断规则,在所述非平面区域中确定所述近似平面子区域。According to an example of the present disclosure, the second detection module is further configured to determine the approximate planar sub-region in the non-planar region based on a preset region growth algorithm and a second planar region judgment rule.
根据本公开的一个示例,所述第二检测模块还被配置为:获得所述非平面区域中不属于任一近似平面子区域的一个多边形网格,作为第二区域;将此多边形网格作为第二中心多边形网格;获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,将所述第二相邻多边形网格作为第二区域多边形网格,并将第二区域多边形网格合并在所述第二区域内;其中,所述第二相邻多边形网格不属于任一平面区域和近似平面子区域;将所述第二区域多边形网格作为第二中心多边形网格;重复执行获得第二中心多边形网格周边的第二相邻多边形网格,响应于确 定第二中心多边形网格的法向量与第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,则将第二相邻多边形网格作为第二区域多边形网格,并将第二区域多边形网格合并在第二区域内,以及将第二区域多边形网格作为第二中心多边形网格的操作,直至确定没有新的第二区域多边形网格能够合并在第二区域内;以及响应于确定所述第二区域内的多边形网格数量大于预设的第二多边形网格数量阈值,将所述第二区域确定为所述近似平面子区域。所述第二法向量方向偏差阈值大于所述第一法向量方向偏差阈值,第二多边形网格数量阈值小于第一多边形网格数量阈值。According to an example of the present disclosure, the second detection module is further configured to: obtain a polygonal grid that does not belong to any approximate planar sub-region in the non-planar area as the second area; and use this polygonal grid as the second area. A second central polygonal mesh; obtaining a second adjacent polygonal mesh around the second central polygonal mesh, in response to determining that the normal vector of the second central polygonal mesh is the same as the second adjacent polygonal mesh The direction deviation between the normal vectors of the normal vector is less than the preset second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged in the In the second area; wherein, the second adjacent polygonal grid does not belong to any planar area and approximately planar sub-areas; the second area polygonal grid is used as the second central polygonal grid; repeat execution to obtain the second The second adjacent polygonal mesh around the central polygonal mesh is in response to determining that the direction deviation between the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh is smaller than the preset second normal vector Direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, the second region polygon mesh is merged in the second region, and the second region polygon mesh is used as the second central polygon mesh Grid operation until it is determined that no new polygon meshes of the second region can be merged in the second region; and in response to determining that the number of polygon meshes in the second region is greater than the preset number of second polygon meshes Threshold, the second area is determined as the approximate plane sub-area. The second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh number threshold is less than the first polygon mesh number threshold.
根据本公开的一个示例,所述至少一个平面区域包括多个平面区域。所述模型生成模块包括区域调整单元。区域调整单元被配置为:对位于所述多个平面区域中的每两个相邻平面区域连接处的第一边界多边形网格进行区域调整处理,以使所述第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于所述第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差。所述第三相邻多边形网格与所述第一边界多边形网格属于同一平面区域,第四相邻多边形网格与所述第一边界多边形网格不属于同一平面区域。According to an example of the present disclosure, the at least one planar area includes a plurality of planar areas. The model generation module includes a region adjustment unit. The area adjustment unit is configured to: perform area adjustment processing on the first boundary polygon mesh at the junction of every two adjacent planar areas in the plurality of planar areas, so that the first boundary polygon mesh and the first boundary polygon mesh are connected to the first boundary polygon mesh. The normal vector direction deviation between the three adjacent polygonal meshes is smaller than the normal vector direction deviation between the first boundary polygonal mesh and the fourth adjacent polygonal mesh. The third adjacent polygon grid and the first boundary polygon grid belong to the same plane area, and the fourth adjacent polygon grid and the first boundary polygon grid do not belong to the same plane area.
根据本公开的一个示例,所述至少一个近似平面子区域包括多个近似平面子区域。所述区域调整单元还被配置为:对位于所述多个近似平面子区域中的每两个相邻近似平面子区域连接处的第二边界多边形网格进行区域调整处理,以使所述第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于所述第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差。所述第五相邻多边形网格与所述第二边界多边形网格属于同一近似平面子区域,第六相邻多边形网格与所述第二边界多边形网格不属于同一近似平面子区域。According to an example of the present disclosure, the at least one approximately planar sub-region includes a plurality of approximately planar sub-regions. The area adjustment unit is further configured to: perform area adjustment processing on the second boundary polygon grid located at the junction of every two adjacent approximate flat sub-areas in the plurality of approximate flat sub-areas, so that the first The normal vector direction deviation between the second boundary polygon mesh and the fifth adjacent polygon mesh is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh. The fifth adjacent polygon mesh and the second boundary polygon mesh belong to the same approximate plane sub-region, and the sixth adjacent polygon mesh and the second boundary polygon mesh do not belong to the same approximate plane subregion.
根据本公开的一个示例,所述模型生成模块包括边界处理单元。边界处理单元被配置为:对位于所述平面区域或所述近似平面子区域边缘的第一多边形网格的边线进行直线拟合处理,以生成所述平面区域或所述近似平面子区域的边界线。According to an example of the present disclosure, the model generation module includes a boundary processing unit. The boundary processing unit is configured to: perform straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the planar area or the approximate planar sub-region The boundary line.
根据本公开的一个示例,所述第二多边形网格为三角形网格。所述模型生成模块包括多边形划分单元。所述多边形划分单元被配置为利用预设的剖分算法对所述平面区域和所述近似平面子区域进行三角形划分。According to an example of the present disclosure, the second polygonal mesh is a triangular mesh. The model generation module includes a polygon dividing unit. The polygon dividing unit is configured to triangulate the planar area and the approximate planar sub-areas by using a preset division algorithm.
根据本公开实施例的又一方面,提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序由处理器用于执行时,使所述处理器执行根据本公开示例性实施例的方法。According to yet another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the method according to the exemplary embodiment of the present disclosure. .
根据本公开实施例的再一方面,提供一种电子设备,所述电子设备包括:处理器和用于存储所述处理器可执行的指令的存储器。所述处理器用于执行根据本公开示例性实施例的方法。According to still another aspect of the embodiments of the present disclosure, there is provided an electronic device including: a processor and a memory configured to store instructions executable by the processor. The processor is used to execute a method according to an exemplary embodiment of the present disclosure.
基于本公开上述实施例提供的一种房屋模型的简化处理方法、装置以及电子设备、存储介质,能够减少表征每个平面区域和近似平面子区域所需要的多边形网格的数量,去除模型的冗余信息,可以对于模型中的细节简化进行全局处理,提高了三维模型传输和浏览的实时性。Based on the simplified processing method, device, electronic device, and storage medium of a house model provided by the above-mentioned embodiments of the present disclosure, the number of polygon meshes required to characterize each flat area and approximate flat sub-area can be reduced, and the redundancy of the model can be eliminated. The remaining information can be processed globally for the simplification of details in the model, which improves the real-time performance of 3D model transmission and browsing.
下面通过附图和实施例,对本公开的技术方案做进一步的详细描述。The technical solutions of the present disclosure will be further described in detail below through the accompanying drawings and embodiments.
附图说明Description of the drawings
通过结合附图对本公开实施例进行更详细的描述,本公开的上述以及其他目的、特征以及优势将变得更加明显。附图用来提供对本公开实施例的进一步的理解,并且构成说明书的一部分,与本公开实施例一起用于解释本公开,并不构成对本公开的限制。在附图中,相同的参考标号通常代表相同部件或步骤。Through a more detailed description of the embodiments of the present disclosure in conjunction with the accompanying drawings, the above and other objectives, features, and advantages of the present disclosure will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification, and are used to explain the present disclosure together with the embodiments of the present disclosure, and do not constitute a limitation to the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
图1为根据本公开一些示例性实施例的房屋模型的简化处理方法的流程图;Fig. 1 is a flowchart of a simplified processing method for a house model according to some exemplary embodiments of the present disclosure;
图2为根据本公开一些示例性实施例的对原始三维模型进行第一平面检测的流程图;Fig. 2 is a flowchart of performing first plane detection on an original three-dimensional model according to some exemplary embodiments of the present disclosure;
图3为根据本公开一些示例性实施例的确定平面区域的流程图;Fig. 3 is a flowchart of determining a plane area according to some exemplary embodiments of the present disclosure;
图4为本公开一些示例性实施例的确定近似平面子区域的流程图;4 is a flowchart of determining approximate planar sub-regions according to some exemplary embodiments of the present disclosure;
图5A为根据本公开一些示例性实施例的原始三角形网格模型的局部示意图;Fig. 5A is a partial schematic diagram of an original triangle mesh model according to some exemplary embodiments of the present disclosure;
图5B为根据本公开一些示例性实施例的对原始三角形网格模型进行平面检测的结果的示意图;FIG. 5B is a schematic diagram of a result of performing plane detection on an original triangle mesh model according to some exemplary embodiments of the present disclosure;
图5C为根据本公开一些示例性实施例的构建的简化三角形网格模型的示意图;5C is a schematic diagram of a simplified triangle mesh model constructed according to some exemplary embodiments of the present disclosure;
图6为根据本公开一些示例性实施例的房屋模型的简化处理装置的示意框图;Fig. 6 is a schematic block diagram of a simplified processing device for a house model according to some exemplary embodiments of the present disclosure;
图7为根据本公开另一些示例性实施例的房屋模型的简化处理装置的示意框图;以及Fig. 7 is a schematic block diagram of a simplified processing device for a house model according to other exemplary embodiments of the present disclosure; and
图8是根据本公开一些示例性实施例的电子设备的示意图。FIG. 8 is a schematic diagram of an electronic device according to some exemplary embodiments of the present disclosure.
具体实施方式Detailed ways
下面将参考附图详细地描述根据本公开的示例实施例。显然,所描述的实施例仅仅是本公开的一部分实施例,而不是本公开的全部实施例,应理解,本公开不受这里描述的示例实施例的限制。Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited by the exemplary embodiments described herein.
应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。It should be noted that unless specifically stated otherwise, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
本领域技术人员可以理解,本公开实施例中的“第一”、“第二”等术语仅用于区别不同步骤、设备或模块等,既不代表任何特定技术含义,也不表示它们之间的必然逻辑顺序。Those skilled in the art can understand that terms such as “first” and “second” in the embodiments of the present disclosure are only used to distinguish different steps, devices, or modules, etc., and do not represent any specific technical meanings, nor do they mean that they are between them. The necessary logical order.
还应理解,在本公开实施例中,“多个”可以指两个或者两个以上,“至少一个”可以指一个、两个或两个以上。It should also be understood that in the embodiments of the present disclosure, "plurality" may refer to two or more than two, and "at least one" may refer to one, two, or more than two.
还应理解,对于本公开实施例中提及的任一部件、数据或结构,在没有明确限定或者在前后文给出相反启示的情况下,一般可以理解为一个或多个。It should also be understood that any component, data, or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more unless it is clearly defined or given opposite enlightenment in the context.
另外,本公开中术语“和/或”,仅是一种描述关联对象的关联关系,表示可以存在三种关系,如A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本公开中字符“/”,一般表示前后关联对象是一种“或”的关系。In addition, the term "and/or" in the present disclosure is only an association relationship that describes associated objects, indicating that there can be three relationships, such as A and/or B, which can mean: A alone exists, and A and B exist at the same time. There are three cases of B alone. In addition, the character "/" in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
还应理解,本公开对各个实施例的描述着重强调各个实施例之间的不同之处,其相同或相似之处可以相互参考,为了简洁,不再一一赘述。It should also be understood that the description of the various embodiments in the present disclosure emphasizes the differences between the various embodiments, and the same or similarities can be referred to each other, and for the sake of brevity, they will not be repeated one by one.
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn in accordance with actual proportional relationships.
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。The following description of at least one exemplary embodiment is actually only illustrative, and in no way serves as any limitation to the present disclosure and its application or use.
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。The technologies, methods, and equipment known to those of ordinary skill in the relevant fields may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be regarded as part of the specification.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that similar reference numerals and letters indicate similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
本公开的实施例可以应用于终端设备、计算机***、服务器等电子设备,其可与众多其它通用或者专用计算***环境或配置一起操作。适于与终端设备、计算机***或者服务器等电子设备一起使用的众所周知的终端设备、计算***、环境和/或配置的例子包括但不限于:个人计算机***、服务器计算机***、瘦客户机、厚客户机、手持或膝上设备、基于微处理器的***、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机***、大型计算机***和包括上述任何***的分布式云计算技术环境等等。The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and/or configurations suitable for use with electronic devices such as terminal devices, computer systems, or servers include, but are not limited to: personal computer systems, server computer systems, thin clients, and thick clients Computers, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
终端设备、计算机***、服务器等电子设备可以在由计算机***执行的计算机***可执行指令(诸如程序模块)的一般语境下描述。通常,程序模块可以包括例程、程序、 目标程序、组件、逻辑、数据结构等等,它们执行特定的任务或者实现特定的抽象数据类型。计算机***/服务器可以在分布式云计算环境中实施。在分布式云计算环境中,任务可以是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算***存储介质上。Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by the computer system. Generally, program modules may include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system/server can be implemented in a distributed cloud computing environment. In a distributed cloud computing environment, tasks can be performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules may be located on a storage medium of a local or remote computing system including a storage device.
构建高精度的多边形网格模型需要的多边形网格的数量常达到百万甚至千万,虽然模型的精度高,但由于存储了大量的数据,难以直接在移动端设备上进行展示。采用现有的折边简化等算法减少模型的多边形网格数量,模型的简化效果不好。The number of polygon meshes required to construct a high-precision polygon mesh model often reaches millions or even tens of millions. Although the accuracy of the model is high, it is difficult to display it directly on mobile devices due to the large amount of data stored. The existing hemming simplification algorithm is used to reduce the number of polygonal meshes of the model, and the simplification effect of the model is not good.
本公开提供的房屋模型的简化处理方法,对原始三维模型进行第一平面检测,确定原始三维模型中的平面区域和非平面区域,对非平面区域进行第二平面检测,确定非平面区域中的近似平面子区域,对平面区域和近似平面子区域进行多边形划分,构建简化的三维模型。由此,能够去除模型的冗余信息,减少表征每个平面区域和近似平面子区域所需要的多边形网格的数量,可以对于模型中的细节简化进行全局处理,提高了三维模型传输和浏览的实时性,改善用户体验。The simplified processing method of the house model provided by the present disclosure performs first plane detection on the original three-dimensional model, determines the plane area and non-planar area in the original three-dimensional model, performs the second plane detection on the non-planar area, and determines the non-planar area Approximate plane sub-region, divide the plane region and approximate plane sub-region into polygons, and construct a simplified three-dimensional model. As a result, redundant information of the model can be removed, the number of polygon meshes required to characterize each planar region and approximate planar subregion can be reduced, the details in the model can be simplified and global processing can be improved, and the transmission and browsing of the 3D model can be improved. Real-time, improve user experience.
图1为根据本公开一些示例性实施例的房屋模型的简化处理方法的流程图,如图1所示,该方法包括以下步骤。Fig. 1 is a flowchart of a simplified processing method for a house model according to some exemplary embodiments of the present disclosure. As shown in Fig. 1, the method includes the following steps.
在步骤S101,对原始三维模型进行第一平面检测,确定原始三维模型中的至少一个平面区域和至少一个非平面区域。In step S101, a first plane detection is performed on the original three-dimensional model, and at least one planar area and at least one non-planar area in the original three-dimensional model are determined.
在一些示例中,原始三维模型为基于房屋的三维点云建立的三维模型,平面区域和非平面区域由多个第一多边形网格构成。在一些实施例中,对物体扫描得到三维点云,采集对于例如家具、房间等物体的三维点云,基于三维点云进行建模,生成原始三维模型。原始三维模型可以为三角形网格模型、四边形网格模型或五边形网格模型等,本公开对此并不限制。构成平面区域和非平面区域的第一多边形网格可以为三角形网格、四边形网格或五边形网格等,本公开不对第一多边形网格的形状进行限制。In some examples, the original three-dimensional model is a three-dimensional model established based on a three-dimensional point cloud of a house, and the planar area and the non-planar area are composed of a plurality of first polygonal meshes. In some embodiments, the object is scanned to obtain a three-dimensional point cloud, the three-dimensional point cloud of objects such as furniture, a room, etc. is collected, and modeling is performed based on the three-dimensional point cloud to generate an original three-dimensional model. The original three-dimensional model may be a triangular mesh model, a quadrilateral mesh model, or a pentagonal mesh model, etc., which is not limited in the present disclosure. The first polygonal mesh constituting the planar area and the non-planar area may be a triangular mesh, a quadrilateral mesh, a pentagonal mesh, or the like, and the present disclosure does not limit the shape of the first polygonal mesh.
在步骤S102,对非平面区域进行第二平面检测,确定非平面区域中的至少一个近似平面子区域。In step S102, a second plane detection is performed on the non-planar area, and at least one approximate planar sub-areas in the non-planar area is determined.
在一些示例中,近似平面子区域可以指,在原始三维模型表面,由若干三角形构成的联通区域。如果该联通区域中任意两个三角形的法向量的夹角不超过预设角度阈值(例如10度),且该联通区域面积大于预设面积阈值(该预设面积阈值可以为0),可以将该联通区域称为近似平面。在步骤S103,对平面区域和近似平面子区域进行多边形划分,生成构成平面区域和近似平面子区域中的第二多边形网格,以构建简化的三维模型。In some examples, the approximate plane sub-region may refer to a connected region formed by several triangles on the surface of the original three-dimensional model. If the angle between the normal vectors of any two triangles in the connected area does not exceed the preset angle threshold (for example, 10 degrees), and the area of the connected area is greater than the preset area threshold (the preset area threshold can be 0), you can change This connected area is called an approximate plane. In step S103, a polygonal division is performed on the planar area and the approximate planar sub-region, and a second polygonal mesh constituting the planar area and the approximate planar sub-region is generated to construct a simplified three-dimensional model.
在一些示例中,第二多边形网格的数量小于第一多边形网格的数量。In some examples, the number of second polygonal meshes is less than the number of first polygonal meshes.
在一些实施例中,第二多边形网格可以为三角形网格、四边形网格或五边形网格等,本公开不对第二多边形网格的形状进行限制。第二多边形网格与第一多边形网格可以为同一种类型的多边形网格,或不同类型的多边形网格,本公开对此并不限制。构成平面区域和近似平面子区域的第二多边形网格的数量小于构成平面区域和近似平面子区域的第一多边形网格的数量。构建的简化三维模型可以为三角形网格模型、四边形网格模型或五边形网格模型等。In some embodiments, the second polygonal mesh may be a triangular mesh, a quadrilateral mesh or a pentagonal mesh, etc. The present disclosure does not limit the shape of the second polygonal mesh. The second polygonal mesh and the first polygonal mesh may be the same type of polygonal mesh, or different types of polygonal meshes, which is not limited in the present disclosure. The number of the second polygon meshes constituting the planar area and the approximately planar sub-area is smaller than the number of the first polygon meshes constituting the planar area and the approximately planar sub-area. The constructed simplified three-dimensional model can be a triangular mesh model, a quadrilateral mesh model, or a pentagonal mesh model.
对原始三维模型进行第一平面检测可以采用多种检测方法。图2为根据本公开一些示例性实施例的对原始三维模型进行第一平面检测的流程图,如图2所示,该过程可以包括如下步骤。Various detection methods can be used for the first plane detection of the original three-dimensional model. Fig. 2 is a flowchart of performing first plane detection on an original three-dimensional model according to some exemplary embodiments of the present disclosure. As shown in Fig. 2, the process may include the following steps.
在步骤S201,基于预设的区域生长算法以及第一平面区域判断规则,在原始三维模型中确定平面区域。In step S201, a plane region is determined in the original three-dimensional model based on a preset region growth algorithm and a first plane region judgment rule.
在步骤S202,将原始三维模型中除去平面区域的剩余区域确定为非平面区域。In step S202, the remaining area excluding the planar area in the original three-dimensional model is determined as a non-planar area.
区域生长算法是一种影像分割技术,基于判别规则将相似的像素等合并起来构成区域。设置第一平面区域判断规则,第一平面区域判断规则可以包括第一法向量方向偏差阈值和第一多边形网格数量阈值等,可以预先设置第一法向量方向偏差阈值和第一多边形网格数量阈值等。Region growing algorithm is an image segmentation technology that combines similar pixels to form regions based on discriminant rules. Set the first plane area judgment rule. The first plane area judgment rule can include the first normal vector direction deviation threshold and the first polygon mesh number threshold. The first normal vector direction deviation threshold and the first polygon can be preset Threshold for the number of shaped grids, etc.
图3为根据本公开一些示例性实施例的房屋模型的简化处理方法的一个实施例中的确定平面区域的流程图,如图3所示,该过程可以包括如下步骤。Fig. 3 is a flowchart of determining a plane area in an embodiment of a simplified processing method for a house model according to some exemplary embodiments of the present disclosure. As shown in Fig. 3, the process may include the following steps.
在步骤S301,获得原始三维模型中不属于任一平面区域的一个多边形网格,作为第一区域。In step S301, a polygon mesh that does not belong to any plane area in the original three-dimensional model is obtained as the first area.
在步骤S302,将此多边形网格作为第一中心多边形网格。In step S302, use this polygon mesh as the first central polygon mesh.
在步骤S303,获得第一中心多边形网格周边的第一相邻多边形网格,响应于确定第一中心多边形网格的法向量与第一相邻多边形网格的法向量之间的方向偏差小于第一法向量方向偏差阈值,将第一相邻多边形网格作为第一区域多边形网格,并将该第一区域多边形网格合并在第一区域内。In step S303, the first adjacent polygon mesh around the first central polygon mesh is obtained, in response to determining that the direction deviation between the normal vector of the first central polygon mesh and the normal vector of the first adjacent polygon mesh is less than For the first normal vector direction deviation threshold, the first adjacent polygonal mesh is used as the first area polygonal mesh, and the first area polygonal mesh is merged into the first area.
在一些示例中,第一相邻多边形网格不属于任一平面区域。In some examples, the first neighboring polygonal mesh does not belong to any planar area.
在步骤S304,将第一区域多边形网格作为第一中心多边形网格。In step S304, the first area polygon mesh is used as the first central polygon mesh.
在步骤S305,确定是否有新的第一区域多边形网格能够合并在第一区域内,如果是,执行步骤S303,否则,执行步骤S306。In step S305, it is determined whether there is a new polygon mesh of the first area that can be merged in the first area, if yes, step S303 is executed, otherwise, step S306 is executed.
在步骤S306,响应于确定第一区域内的多边形网格数量大于第一多边形网格数量阈值,将第一区域确定为平面区域。In step S306, in response to determining that the number of polygonal meshes in the first area is greater than the first polygonal mesh number threshold, the first area is determined to be a flat area.
例如,原始三维模型为基于对于房屋的三维点云建立的三角形网格模型。第一法向量方向偏差阈值为A1,第一三角形网格数量阈值为N1。获得三角形网格模型中不属于任一平面区域的一个三角形网格,作为第一区域。将此三角形网格作为第一中心三角形网格,获得第一中心三角形网格的第一相邻三角形网格,第一相邻三角形网格不属于任一平面区域。For example, the original three-dimensional model is a triangular mesh model based on the three-dimensional point cloud of the house. The first normal vector direction deviation threshold is A1, and the first triangle mesh number threshold is N1. Obtain a triangle mesh that does not belong to any plane area in the triangle mesh model as the first area. Using this triangular mesh as the first central triangular mesh, the first adjacent triangular mesh of the first central triangular mesh is obtained, and the first adjacent triangular mesh does not belong to any plane area.
计算第一中心三角形网格的法向量与第一相邻三角形的法向量之间的方向偏差,记为a1,如果a1小于第一法向量方向偏差阈值A1,则将第一相邻三角形网格作为第一区域三角形网格,并将此第一区域三角形网格合并在第一区域内。将此第一区域三角形网格作为第一中心三角形网格。确定是否有新的第一区域多边形网格能够合并在第一区域内,如果有新的第一区域多边形网格能够合并在第一区域内,则循环上述方法,获得新的第一区域三角形网格。如果没有新的第一区域多边形网格能够合并在第一区域内,则获得第一区域内的三角形网格数量m1。如果m1大于第一三角形网格数量阈值N1,则确定第一区域为平面区域。如果m1小于或等于第一三角形网格数量阈值N1,则确定第一区域不为平面区域。Calculate the direction deviation between the normal vector of the first central triangle mesh and the normal vector of the first adjacent triangle, and record it as a1. If a1 is less than the first normal vector direction deviation threshold A1, then the first adjacent triangle mesh As the first area triangle mesh, the first area triangle mesh is merged into the first area. This first area triangle mesh is used as the first center triangle mesh. Determine whether there is a new first area polygon mesh that can be merged in the first area. If there is a new first area polygon mesh that can be merged in the first area, then loop the above method to obtain a new first area triangle mesh grid. If no new polygon meshes of the first region can be merged in the first region, the number m1 of triangle meshes in the first region is obtained. If m1 is greater than the first triangle mesh number threshold N1, it is determined that the first area is a flat area. If m1 is less than or equal to the first triangle mesh number threshold N1, it is determined that the first area is not a flat area.
使用上述的平面检测方法扫描构成三角形网格模型的全部三角形网格,先找到某个三角形网格作为当前的平面区域,以该三角形网格为起点向四周扩展,确定第一区域多边形网格并加入到平面区域。在平面检测时,通过第一法向量方向偏差阈值和第一多边形网格数量阈值的设置,以期得到真正的平面区域,例如墙面,地板,天花板等平面区域。在三角形网格模型中确定平面区域,将三角形网格模型中除去平面区域的剩余区域确定为非平面区域。Use the above-mentioned plane detection method to scan all the triangle meshes that constitute the triangle mesh model, first find a certain triangle mesh as the current plane area, use the triangle mesh as the starting point to expand around, determine the first area polygon mesh and Join the flat area. In the plane detection, through the setting of the first normal vector direction deviation threshold and the first polygon grid number threshold, in order to obtain the real plane area, such as the wall, the floor, the ceiling and other plane areas. The plane area is determined in the triangle mesh model, and the remaining area except the plane area in the triangle mesh model is determined as a non-planar area.
在一些实施例中,对非平面区域进行第二平面检测可以采用多种方法。例如,基于预设的区域生长算法以及第二平面区域判断规则,在非平面区域中确定近似平面子区域。设置第二平面区域判断规则,第二平面区域判断规则可以包括第二法向量方向偏差阈值和第二多边形网格数量阈值等。可以预先设置第二法向量方向偏差阈值和第二多边形网格数量阈值等,其中,第二法向量方向偏差阈值大于第一法向量方向偏差阈值,第二多边形网格数量阈值小于第一多边形网格数量阈值。In some embodiments, multiple methods may be used to perform the second plane detection on the non-planar area. For example, based on a preset region growth algorithm and a second planar region judgment rule, an approximate planar sub-region is determined in a non-planar region. A second planar area judgment rule is set, and the second planar area judgment rule may include a second normal vector direction deviation threshold, a second polygon mesh number threshold, and the like. The second normal vector direction deviation threshold and the second polygon mesh quantity threshold can be preset, where the second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh quantity threshold is less than The first threshold of the number of polygon meshes.
与真正的平面区域不同,近似平面子区域通常面积很小,如可以将一个球面通过很多近似平面子区域来近似。每个第一三角形网格都是平面,在对非平面区域划分时,通 过第二法向量方向偏差阈值和第二多边形网格数量阈值的设置,可以获得期望数量的近似平面子区域。Different from the real flat area, the approximate flat sub-area usually has a small area. For example, a spherical surface can be approximated by many approximate flat sub-areas. Each first triangular grid is a plane. When dividing a non-planar area, through the setting of the second normal vector direction deviation threshold and the second polygonal grid number threshold, a desired number of approximate planar sub-areas can be obtained.
图4为本公开一些示例性实施例的确定近似平面子区域的流程图,如图4所示,该过程可以包括以下步骤。FIG. 4 is a flowchart of determining an approximate plane sub-region according to some exemplary embodiments of the present disclosure. As shown in FIG. 4, the process may include the following steps.
在步骤S401,获得非平面区域中不属于任一近似平面子区域的一个多边形网格,作为第二区域。In step S401, a polygonal grid that does not belong to any approximate planar sub-region in the non-planar area is obtained as the second area.
在步骤S402,将此多边形网格作为第二中心多边形网格。In step S402, use this polygonal mesh as the second central polygonal mesh.
在步骤S403,获得第二中心多边形网格周边的第二相邻多边形网格,响应于确定第二中心多边形网格的法向量与第二相邻多边形网格的法向量之间的方向偏差小于第二法向量方向偏差阈值,将第二相邻多边形网格作为第二区域多边形网格,并将第二区域多边形网格合并在第二区域内。In step S403, a second adjacent polygon mesh around the second central polygon mesh is obtained, and in response to determining that the direction deviation between the normal vector of the second central polygon mesh and the normal vector of the second adjacent polygon mesh is less than The second normal vector direction deviation threshold uses the second adjacent polygon mesh as the second region polygon mesh, and merges the second region polygon mesh into the second region.
在一些示例中,第二相邻多边形网格不属于任一平面区域和近似平面子区域。In some examples, the second adjacent polygonal grid does not belong to any planar area and approximately planar sub-areas.
在步骤S404,将第二区域多边形网格作为第二中心多边形网格。In step S404, the second area polygon mesh is used as the second central polygon mesh.
在步骤S405,确定是否有新的第二区域多边形网格能够合并在第二区域内,如果是,执行步骤S403,否则,执行步骤S406。In step S405, it is determined whether there is a new polygon mesh of the second area that can be merged in the second area, if yes, step S403 is executed, otherwise, step S406 is executed.
在步骤S406,响应于确定第二区域内的多边形网格数量大于第二多边形网格数量阈值,将第二区域确定为近似平面子区域。In step S406, in response to determining that the number of polygonal meshes in the second region is greater than the second polygonal mesh number threshold, the second region is determined as an approximately planar subregion.
例如,在三角形网格模型中确定非平面区域,设置第二法向量方向偏差阈值为A2,第二三角形网格数量阈值为N2。获得非平面区域中不属于任一近似平面子区域的一个三角形网格,作为第二区域。将此三角形网格作为第二中心三角形网格,获得第二中心三角形网格周边的第二相邻三角形网格,第二相邻三角形网格不属于任一平面区域和近似平面子区域。For example, in the triangular mesh model to determine the non-planar area, the second normal vector direction deviation threshold is set to A2, and the second triangular mesh number threshold is N2. Obtain a triangular mesh in the non-planar area that does not belong to any approximate planar sub-area as the second area. Using this triangular mesh as the second central triangular mesh, the second adjacent triangular mesh around the second central triangular mesh is obtained, and the second adjacent triangular mesh does not belong to any planar area and approximate planar sub-areas.
计算第二中心三角形网格的法向量与第二相邻三角形的法向量之间的方向偏差,记为a2,如果a2小于第二法向量方向偏差阈值A2,则将第二相邻三角形网格作为第二区域三角形网格,并将此第二区域三角形网格合并在第二区域内。将此第二区域三角形网格作为第二中心三角形网格。确定是否有新的第二区域多边形网格能够合并在第二区域内,如果有新的第二区域多边形网格能够合并在第二区域内,则循环上述方法,获得新的第二区域三角形网格。如果没有新的第二区域多边形网格能够合并在第二区域内,获得第二区域内的三角形网格数量m2。如果m2大于第一三角形网格数量阈值N2,确定 第二区域为近似平面子区域,如果m2小于或等于第二三角形网格数量阈值N2,确定第二区域不为近似平面子区域。Calculate the direction deviation between the normal vector of the second central triangle mesh and the normal vector of the second adjacent triangle, denoted as a2, if a2 is less than the second normal vector direction deviation threshold A2, then the second adjacent triangle mesh As the triangle mesh of the second area, the triangle mesh of the second area is merged into the second area. This second area triangular mesh is used as the second central triangular mesh. Determine whether there is a new polygon mesh of the second area that can be merged in the second area, if there is a new polygon mesh of the second area that can be merged in the second area, then loop the above method to obtain a new second area triangle mesh grid. If no new polygon meshes of the second region can be merged in the second region, the number m2 of triangle meshes in the second region is obtained. If m2 is greater than the first triangular mesh number threshold N2, the second area is determined to be an approximate planar sub-region, and if m2 is less than or equal to the second triangular mesh number threshold N2, it is determined that the second area is not an approximate planar sub-region.
使用上述的方法扫描构成非平面区域的全部三角形网格,在非平面区域中确定近似平面子区域。平面区域和近似平面子区域包含多个三角形网格,在进行模型简化时,平面区域和近似平面子区域都将用一个平面来表示,通过平面区域和近似平面子区域实现三维模型的简化。可以忽略平面区域中一些不重要的细节,统一将其近似为平面。由于近似平面子区域的面积较小,近似平面子区域的细节可以被保留的较好。The above-mentioned method is used to scan all the triangular meshes that constitute the non-planar area, and the approximate planar sub-region is determined in the non-planar area. The flat area and the approximate flat sub-area contain multiple triangular meshes. When the model is simplified, the flat area and the approximate flat sub-area will be represented by a plane, and the three-dimensional model can be simplified through the flat area and the approximate flat sub-area. Some unimportant details in the plane area can be ignored, and they can be approximated as a plane uniformly. Since the area of the approximate plane sub-region is small, the details of the approximate plane sub-region can be better preserved.
在一些实施例中,对原始三维模型进行第一平面检测得到的至少一个平面区域可以包括多个平面区域。本公开示例性实施例的方法还可以包括以下步骤:对位于多个平面区域中的每两个相邻平面区域连接处的第一边界多边形网格进行区域调整处理,以使第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差。在一些示例中,第三相邻多边形网格与第一边界多边形网格属于同一平面区域,第四相邻多边形网格与第一边界多边形网格不属于同一平面区域。In some embodiments, the at least one plane area obtained by performing the first plane detection on the original three-dimensional model may include multiple plane areas. The method of the exemplary embodiment of the present disclosure may further include the following steps: performing area adjustment processing on the first boundary polygon mesh located at the junction of every two adjacent planar regions among the plurality of planar regions, so that the first boundary polygon mesh The normal vector direction deviation between the grid and the third adjacent polygon mesh is smaller than the normal vector direction deviation between the first boundary polygon mesh and the fourth adjacent polygon mesh. In some examples, the third adjacent polygon mesh and the first boundary polygon mesh belong to the same plane area, and the fourth adjacent polygon mesh and the first boundary polygon mesh do not belong to the same plane area.
例如,平面区域E边缘的一部分和平面区域F边缘的一部分相连接,获得在平面区域E和平面区域F的连接处并属于平面区域E的第一边界多边形网格P1。确定第一边界多边形网格P1与第三相邻多边形网格P2之间的法向量方向偏差W1,确定第一边界多边形网格P1与第四相邻多边形网格P3之间的法向量方向偏差W2。第三相邻多边形网格P2与第一边界多边形网格P1属于同一平面区域E,第四相邻多边形网格P3属于平面区域F。如果W1小于或等于W2,则第一边界多边形网格P1保持在平面区域E内不变,如果W1大于W2,则改变第一边界多边形网格P1所属的平面区域,即设置第一边界多边形网格P1属于平面区域F。For example, a part of the edge of the flat area E is connected with a part of the edge of the flat area F, and a first boundary polygon mesh P1 belonging to the flat area E at the junction of the flat area E and the flat area F is obtained. Determine the normal vector direction deviation W1 between the first boundary polygon mesh P1 and the third adjacent polygon mesh P2, and determine the normal vector direction deviation between the first boundary polygon mesh P1 and the fourth adjacent polygon mesh P3 W2. The third adjacent polygon mesh P2 and the first boundary polygon mesh P1 belong to the same plane area E, and the fourth adjacent polygon mesh P3 belongs to the plane area F. If W1 is less than or equal to W2, the first boundary polygon mesh P1 remains unchanged in the plane area E, if W1 is greater than W2, the plane area to which the first boundary polygon mesh P1 belongs is changed, that is, the first boundary polygon mesh is set The grid P1 belongs to the plane area F.
使用上述的区域调整处理方法,扫描平面区域E和平面区域F连接处的所有第一边界多边形网格,进行区域调整处理,直至第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差。第一边界多边形网格包括在进行区域调整之前的第一边界多边形网格,以及在进行区域调整后,位于平面区域E和平面区域F的新连接处的第一边界多边形网格。Using the above-mentioned area adjustment processing method, scan all the first boundary polygon meshes at the connection of the flat area E and the flat area F, and perform the area adjustment processing until there is a gap between the first boundary polygon mesh and the third adjacent polygon mesh. The normal vector direction deviation is smaller than the normal vector direction deviation between the first boundary polygon mesh and the fourth adjacent polygon mesh. The first boundary polygon mesh includes the first boundary polygon mesh before the area adjustment, and the first boundary polygon mesh located at the new connection of the plane area E and the plane area F after the area adjustment.
在一些实施例中,对非平面区域进行第二平面检测得到的至少一个近似平面子区域可以包括多个近似平面子区域。本公开示例性实施例的方法还可以包括以下步骤:对位于多个近似平面子区域中的每两个相邻近似平面子区域连接处的第二边界多边形网格进 行区域调整处理,以使第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差。在一些示例中,第五相邻多边形网格与第二边界多边形网格属于同一近似平面子区域,第六相邻多边形网格与第二边界多边形网格不属于同一近似平面子区域。In some embodiments, the at least one approximately planar sub-areas obtained by performing the second planar detection on the non-planar area may include a plurality of approximately planar sub-areas. The method of the exemplary embodiment of the present disclosure may further include the following steps: performing area adjustment processing on the second boundary polygon grid located at the junction of every two adjacent approximate planar sub-regions among the plurality of approximate planar sub-regions, so that the first The normal vector direction deviation between the second boundary polygon mesh and the fifth adjacent polygon mesh is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh. In some examples, the fifth adjacent polygonal mesh and the second boundary polygonal mesh belong to the same approximate planar sub-region, and the sixth adjacent polygonal mesh and the second boundary polygonal mesh do not belong to the same approximate planar subregion.
例如,近似平面子区域H边缘的一部分和近似平面子区域J边缘的一部分相连接,获得在近似平面子区域H和近似平面子区域J的连接处并属于近似平面子区域H的第二边界多边形网格K1,确定第二边界多边形网格K1与第五相邻多边形网格K2之间的法向量方向偏差W3,确定第二边界多边形网格K1与第六相邻多边形网格K3之间的法向量方向偏差W4。第五相邻多边形网格K2与第二边界多边形网格K1属于同一近似平面子区域H,第六相邻多边形网格K3属于近似平面子区域J。如果W3小于W4,则第二边界多边形网格K1保持不变,如果W3大于W4,则改变第二边界多边形网格K1所属的平面区域,即设置第二边界多边形网格K1属于近似平面子区域J。For example, a part of the edge of the approximately planar sub-region H is connected with a part of the edge of the approximately planar sub-region J, and a second boundary polygon that belongs to the approximately planar sub-region H at the junction of the approximately planar sub-region H and the approximate planar sub-region J is obtained. Mesh K1, determine the normal vector direction deviation W3 between the second boundary polygon mesh K1 and the fifth adjacent polygon mesh K2, determine the difference between the second boundary polygon mesh K1 and the sixth adjacent polygon mesh K3 Normal vector direction deviation W4. The fifth adjacent polygon mesh K2 and the second boundary polygon mesh K1 belong to the same approximate planar sub-region H, and the sixth adjacent polygon mesh K3 belongs to the approximate planar sub-region J. If W3 is less than W4, the second boundary polygon mesh K1 remains unchanged. If W3 is greater than W4, the plane area to which the second boundary polygon mesh K1 belongs is changed, that is, the second boundary polygon mesh K1 is set to belong to the approximate plane sub-region J.
使用上述的区域调整处理方法,扫描近似平面子区域H和近似平面子区域J连接处的所有第二边界多边形网格,进行区域调整处理,直至第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差。第二边界多边形网格包括原有的第二边界多边形网格,以及在进行区域调整后,位于近似平面子区域H和近似平面子区域J的新连接处的第二边界多边形网格。Using the above-mentioned area adjustment processing method, scan all the second boundary polygon meshes at the connection of the approximate flat sub-region H and the approximate flat sub-region J, and perform area adjustment processing until the second boundary polygon mesh and the fifth adjacent polygon mesh The normal vector direction deviation between the grids is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh. The second boundary polygon grid includes the original second boundary polygon grid and the second boundary polygon grid located at the new connection of the approximately flat sub-region H and the approximately flat sub-region J after the region adjustment.
将原始三维模型分为平面区域和近似平面子区域之后,会产生与原始三维模型之间的误差,使用上述的区域调整处理方法,对平面区域和近似平面子区域的分割结果做调整,使得分割接近于最优,能够减少误差。After the original 3D model is divided into a flat area and an approximate flat sub-area, there will be errors with the original 3D model. The above-mentioned area adjustment processing method is used to adjust the segmentation results of the flat area and the approximate flat sub-area to make the segmentation Close to the optimal, can reduce the error.
在一些实施例中,本公开示例性实施例的方法还可以包括以下步骤:对位于平面区域或近似平面子区域边缘的第一多边形网格的边线进行直线拟合处理,以生成平面区域或近似平面子区域的边界线。通过位于平面区域或近似平面子区域边缘的每个三角形网格的一条或多条边线段组成平面区域或近似平面子区域参差不齐的边界,每个平面区域或近似平面子区域的边界由很多小的边线段构成,边界信息较为冗余,可以通过边线段之间的合并来进行简化。In some embodiments, the method of the exemplary embodiment of the present disclosure may further include the following steps: performing straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the planar area Or approximate the boundary line of the plane sub-region. One or more edge line segments of each triangle grid located at the edge of the planar area or approximately planar sub-area form the uneven boundary of the planar area or approximately planar sub-area. The boundary of each planar area or approximately planar sub-area consists of many The small edge line segment is composed, and the boundary information is more redundant, which can be simplified by merging between the edge line segments.
把每个平面区域或近似平面子区域的边界用多边形来近似。基于边线段进行直线拟合处理,生成一个或多个较长的边界线段。直线拟合可以使用多种拟合方式。例如,设置 距离阈值,基于距离阈值以及直线拟合算法将依次连接的多条边线段拟合为一条边界线段,此多条边线段中的每条边线段的端点到此边界线段的垂直距离都小于此距离阈值。The boundary of each flat area or approximate flat sub-area is approximated by a polygon. Perform straight-line fitting processing based on edge line segments to generate one or more longer boundary line segments. Multiple fitting methods can be used for straight line fitting. For example, setting a distance threshold, based on the distance threshold and a straight line fitting algorithm to fit multiple connected edge line segments into a boundary line segment, the vertical distance from the end point of each edge line segment in the multiple edge line segments to the boundary line segment is all Less than this distance threshold.
在一些实施例中,对平面区域和近似平面子区域进行多边形划分可以使用多种划分方法。例如,第二多边形网格为三角形网格,利用预设的剖分算法对平面区域和近似平面子区域进行三角形划分,生成简化三维模型。剖分算法包括:Delaunay三角剖分算法等。In some embodiments, polygonal division of the planar area and the approximate planar sub-areas may use multiple division methods. For example, the second polygon mesh is a triangular mesh, and the flat area and the approximate flat sub-area are triangulated using a preset division algorithm to generate a simplified three-dimensional model. The subdivision algorithm includes: Delaunay triangulation algorithm and so on.
如图5A所示,采集对于家具、房间等的三维点云,基于三维点云生成三角形网格模型,三角形网格模型由多个三角形网格组成。如图5B所示,对三角形网格模型进行第一平片检测和第二平面检测,确定平面区域、近似平面子区域。如图5C所示,对平面区域和近似平面子区域使用Delaunay三角剖分算法进行三角形划分,生成构成平面区域和近似平面子区域中的三角形网格,构建简化的三维模型。As shown in FIG. 5A, three-dimensional point clouds for furniture, rooms, etc. are collected, and a triangular mesh model is generated based on the three-dimensional point cloud. The triangular mesh model is composed of multiple triangular meshes. As shown in FIG. 5B, the first flat sheet detection and the second flat detection are performed on the triangle mesh model to determine the flat area and the approximate flat sub-area. As shown in FIG. 5C, a Delaunay triangulation algorithm is used to triangulate the planar area and the approximate planar sub-area to generate a triangular mesh that constitutes the planar area and the approximate planar sub-area to construct a simplified three-dimensional model.
上述实施例的房屋模型的简化处理方法,获得模型中的平面区域和近似平面子区域,对平面区域和近似平面子区域进行多边形划分,构建简化的三维模型。通过对模型中的平面区域和近似平面子区域进行多边形划分,能够去除模型的冗余信息,减少表征每个平面区域和近似平面子区域所需要的多边形网格的数量,实现模型的简化。对平面区域和近似平面子区域采用不同的检测算法,能够对于模型中的细节简化进行全局处理,可以简化平面区域中的细节并能够保留近似平面子区域中的较多细节,提高了三维模型传输和浏览的实时性,改善用户体验。The simplified processing method of the house model in the above embodiment obtains the planar area and the approximate planar sub-region in the model, and divides the planar area and the approximate planar sub-region into polygons to construct a simplified three-dimensional model. By polygonally dividing the planar area and the approximate planar sub-region in the model, the redundant information of the model can be removed, the number of polygon meshes required to characterize each planar area and the approximate planar sub-region can be reduced, and the simplification of the model can be realized. Different detection algorithms are used for the flat area and the approximate flat sub-area, which can simplify the details in the model for global processing, can simplify the details in the flat area and retain more details in the approximate flat sub-area, which improves the transmission of the 3D model And real-time browsing, improve user experience.
在一些实施例中,图6为根据本公开一些示例性实施例的房屋模型的简化处理装置600的示意框图。如图6所示,该装置600包括:第一检测模块601、第二检测模块602和模型生成模块603。第一检测模块601被配置为对原始三维模型进行第一平面检测,确定原始三维模型中的至少一个平面区域和至少一个非平面区域。原始三维模型为基于房屋的三维点云建立的三维模型。平面区域和非平面区域由多个第一多边形网格构成。第二检测模块602被配置为对非平面区域进行第二平面检测,确定非平面区域中的至少一个近似平面子区域。模型生成模块603被配置为对平面区域和近似平面子区域进行多边形划分,生成构成平面区域和近似平面子区域中的第二多边形网格,以构建简化的三维模型。第二多边形网格的数量小于第一多边形网格的数量。In some embodiments, FIG. 6 is a schematic block diagram of a simplified processing device 600 for a house model according to some exemplary embodiments of the present disclosure. As shown in FIG. 6, the device 600 includes: a first detection module 601, a second detection module 602, and a model generation module 603. The first detection module 601 is configured to perform a first plane detection on the original three-dimensional model, and determine at least one planar area and at least one non-planar area in the original three-dimensional model. The original 3D model is a 3D model based on the 3D point cloud of the house. The planar area and the non-planar area are composed of a plurality of first polygonal meshes. The second detection module 602 is configured to perform a second planar detection on the non-planar area, and determine at least one approximate planar sub-areas in the non-planar area. The model generation module 603 is configured to divide the planar area and the approximate planar sub-area into polygons, and generate a second polygon mesh that constitutes the planar area and the approximate planar sub-area, so as to construct a simplified three-dimensional model. The number of second polygonal meshes is smaller than the number of first polygonal meshes.
在一些实施例中,第一检测模块601还被配置为:基于预设的区域生长算法以及第一平面区域判断规则,在原始三维模型中确定平面区域,以及将原始三维模型中除去平 面区域的剩余区域确定为非平面区域。第一平面区域判断规则包括:第一法向量方向偏差阈值和第一多边形网格数量阈值。In some embodiments, the first detection module 601 is further configured to determine the plane area in the original three-dimensional model based on the preset area growth algorithm and the first plane area judgment rule, and remove the flat area from the original three-dimensional model. The remaining area is determined as a non-planar area. The first plane area judgment rule includes: a first normal vector direction deviation threshold and a first polygon mesh number threshold.
在一些实施例中,第一检测模块601还被配置为:In some embodiments, the first detection module 601 is further configured to:
获得原始三维模型中不属于任一平面区域的一个多边形网格,作为第一区域;Obtain a polygon mesh that does not belong to any plane area in the original 3D model as the first area;
将此多边形网格作为第一中心多边形网格;获得第一中心多边形网格周边的第一相邻多边形网格,响应于确定第一中心多边形网格的法向量与第一相邻多边形网格的法向量之间的方向偏差小于第一法向量方向偏差阈值,将第一相邻多边形网格作为第一区域多边形网格,并将第一区域多边形网格合并在第一区域内;其中,第一相邻多边形网格不属于任一平面区域;This polygonal mesh is used as the first central polygonal mesh; the first adjacent polygonal mesh around the first central polygonal mesh is obtained, and the normal vector of the first central polygonal mesh is determined in response to the first adjacent polygonal mesh The direction deviation between the normal vectors of is less than the first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged into the first region; wherein, The first adjacent polygon mesh does not belong to any plane area;
将第一区域多边形网格作为第一中心多边形网格;重复执行所述获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将所述第一区域多边形网格合并在所述第一区域内,以及将所述第一区域多边形网格作为第一中心多边形网格的操作,直至确定没有新的第一区域多边形网格能够合并在所述第一区域内;以及Use the first area polygon mesh as the first central polygon mesh; repeat the obtaining of the first adjacent polygon mesh around the first central polygon mesh, in response to the determination of the first central polygon mesh The direction deviation between the normal vector and the normal vector of the first adjacent polygon mesh is less than a preset first normal vector direction deviation threshold, and the first adjacent polygon mesh is used as the first region polygon mesh, And merge the first area polygon mesh in the first area, and use the first area polygon mesh as the first central polygon mesh until it is determined that there is no new first area polygon mesh Can be combined in the first area; and
响应于确定第一区域内的多边形网格数量大于第一多边形网格数量阈值,将第一区域确定为平面区域。In response to determining that the number of polygonal meshes in the first area is greater than the first polygonal mesh number threshold, the first area is determined to be a flat area.
在一些实施例中,第二检测模块602还被配置为:基于预设的区域生长算法以及第二平面区域判断规则,在非平面区域中确定近似平面子区域。第二平面区域判断规则包括:第二法向量方向偏差阈值和第二多边形网格数量阈值。第二法向量方向偏差阈值大于第一法向量方向偏差阈值,第二多边形网格数量阈值小于第一多边形网格数量阈值。In some embodiments, the second detection module 602 is further configured to determine an approximate planar sub-region in the non-planar region based on a preset region growth algorithm and a second planar region judgment rule. The second plane area judgment rule includes: a second normal vector direction deviation threshold and a second polygon mesh number threshold. The second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh number threshold is less than the first polygon mesh number threshold.
第二检测模块602还被配置为:The second detection module 602 is also configured to:
获得非平面区域中不属于任一近似平面子区域的一个多边形网格,作为第二区域;Obtain a polygonal mesh in the non-planar area that does not belong to any approximate planar sub-area as the second area;
将此多边形网格作为第二中心多边形网格;获得第二中心多边形网格周边的第二相邻多边形网格,响应于确定第二中心多边形网格的法向量与第二相邻多边形网格的法向量之间的方向偏差小于第二法向量方向偏差阈值,将第二相邻多边形网格作为第二区域多边形网格,并将第二区域多边形网格合并在第二区域内;其中,第二相邻多边形网格不属于任一平面区域和近似平面子区域;将第二区域多边形网格作为第二中心多边形网格;This polygon mesh is used as the second central polygon mesh; the second adjacent polygon mesh around the second central polygon mesh is obtained, in response to determining the normal vector of the second central polygon mesh and the second adjacent polygon mesh The direction deviation between the normal vectors of is less than the second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged into the second region; wherein, The second adjacent polygonal grid does not belong to any planar area and approximate planar sub-areas; the polygonal grid of the second area is used as the second central polygonal grid;
重复执行所述获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,则将所述第二相邻多边形网格作为第二区域多边形网格,并将所述第二区域多边形网格合并在所述第二区域内,以及将所述第二区域多边形网格作为所述第二中心多边形网格的操作,直至确定没有新的第二区域多边形网格能够合并在所述第二区域内;以及Repeatedly performing the obtaining of the second adjacent polygonal mesh around the second central polygonal mesh, in response to determining the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh If the direction deviation between the two is less than the preset second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged into the In the second area, and the operation of using the second area polygonal mesh as the second central polygonal mesh, until it is determined that no new second area polygonal mesh can be merged in the second area; and
响应于确定第二区域内的多边形网格数量大于第二多边形网格数量阈值,将第二区域确定为近似平面子区域。In response to determining that the number of polygonal meshes in the second region is greater than the second polygonal mesh number threshold, the second region is determined to be an approximately planar subregion.
在一些实施例中,如图7所示,模型生成模块603包括:区域调整单元6031、边界处理单元6032和多边形划分单元6033。区域调整单元6031被配置为对位于两个相邻平面区域连接处的第一边界多边形网格进行区域调整处理,以使第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差。第三相邻多边形网格与第一边界多边形网格属于同一平面区域,第四相邻多边形网格与第一边界多边形网格不属于同一平面区域。In some embodiments, as shown in FIG. 7, the model generation module 603 includes: a region adjustment unit 6031, a boundary processing unit 6032 and a polygon division unit 6033. The area adjustment unit 6031 is configured to perform area adjustment processing on the first boundary polygon mesh located at the junction of two adjacent planar areas, so that the normal vector between the first boundary polygon mesh and the third adjacent polygon mesh is The direction deviation is smaller than the normal vector direction deviation between the first boundary polygon mesh and the fourth adjacent polygon mesh. The third adjacent polygon mesh and the first boundary polygon mesh belong to the same plane area, and the fourth adjacent polygon mesh and the first boundary polygon mesh do not belong to the same plane area.
区域调整单元6031还被配置为:对位于两个相邻近似平面子区域连接处的第二边界多边形网格进行区域调整处理,以使第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差。第五相邻多边形网格与第二边界多边形网格属于同一近似平面子区域,第六相邻多边形网格与第二边界多边形网格不属于同一近似平面子区域。The area adjustment unit 6031 is further configured to: perform area adjustment processing on the second boundary polygon mesh at the junction of two adjacent approximate planar sub-regions, so that the second boundary polygon mesh and the fifth adjacent polygon mesh are different from each other. The normal vector direction deviation between the two is smaller than the normal vector direction deviation between the second boundary polygon mesh and the sixth adjacent polygon mesh. The fifth adjacent polygonal mesh and the second boundary polygonal mesh belong to the same approximate plane subregion, and the sixth adjacent polygonal mesh and the second boundary polygonal mesh do not belong to the same approximate plane subregion.
在一些实施例中,边界处理单元6032被配置为对位于平面区域或近似平面子区域边缘的第一多边形网格的边线进行直线拟合处理,以生成平面区域或近似平面子区域的边界线。第二多边形网格为三角形网格,多边形划分单元6033利用预设的剖分算法对平面区域和近似平面子区域进行三角形划分,剖分算法包括:Delaunay三角剖分算法等。In some embodiments, the boundary processing unit 6032 is configured to perform a straight line fitting process on the edge of the first polygonal mesh located at the edge of the planar area or the approximate planar sub-region to generate the boundary of the planar area or the approximate planar sub-region. line. The second polygon mesh is a triangle mesh. The polygon division unit 6033 uses a preset division algorithm to triangulate the planar area and the approximate planar sub-areas. The division algorithm includes the Delaunay triangulation algorithm.
图8是根据本公开一些示例性实施例的电子设备81的示意图,如图8所示,电子设备81包括一个或多个处理器811和存储器812。FIG. 8 is a schematic diagram of an electronic device 81 according to some exemplary embodiments of the present disclosure. As shown in FIG. 8, the electronic device 81 includes one or more processors 811 and a memory 812.
处理器811可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备81中的其他组件以执行期望的功能。The processor 811 may be a central processing unit (CPU) or another form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 81 to perform desired functions.
存储器812可以包括一个或多个计算机程序产品,计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。易失性存储器,例如,可以包括:随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。非易失性存 储器,例如,可以包括:只读存储器(ROM)、硬盘以及闪存等。在计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器811可以运行程序指令,以实现上文的本公开的各个实施例的房屋模型的简化处理方法以及/或者其他期望的功能。在计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。The memory 812 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory, for example, may include random access memory (RAM) and/or cache memory (cache). Non-volatile memory, for example, may include: read-only memory (ROM), hard disk, flash memory, and so on. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 811 may run the program instructions to implement the simplified processing method of the house model and/or other desired functions of the various embodiments of the present disclosure above. . Various contents such as input signal, signal component, noise component, etc. can also be stored in the computer-readable storage medium.
在一个示例中,电子设备81还可以包括:输入装置813以及输出装置814等,这些组件通过总线***和/或其他形式的连接机构(未示出)互连。此外,该输入设备813还可以包括例如键盘、鼠标等等。该输出装置814可以向外部输出各种信息。该输出设备814可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。In an example, the electronic device 81 may further include: an input device 813, an output device 814, etc., and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown). In addition, the input device 813 may also include, for example, a keyboard, a mouse, and so on. The output device 814 can output various information to the outside. The output device 814 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
当然,为了简化,图8中仅示出了该电子设备81中与本公开有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备81还可以包括任何其他适当的组件。Of course, for simplification, only some of the components related to the present disclosure in the electronic device 81 are shown in FIG. 8, and components such as buses, input/output interfaces, etc. are omitted. In addition, according to specific application conditions, the electronic device 81 may also include any other appropriate components.
除了上述方法和设备以外,本公开的实施例还可以是计算机程序产品,其包括计算机程序指令,计算机程序指令在被处理器运行时使得处理器执行本说明书上述“示例性方法”部分中描述的根据本公开各种实施例的房屋模型的简化处理方法中的步骤。In addition to the above-mentioned methods and devices, the embodiments of the present disclosure may also be computer program products, which include computer program instructions. When the computer program instructions are executed by a processor, the processor executes what is described in the “exemplary method” section of this specification. Steps in a simplified processing method of a house model according to various embodiments of the present disclosure.
所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。The computer program product may use any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages, such as Java, C++, etc. , Also includes conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
此外,本公开的实施例还可以是计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本公开各种实施例的房屋模型的简化处理方法中的步骤。In addition, the embodiments of the present disclosure may also be a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the processor executes the "exemplary method" part of this specification. The steps in the simplified processing method of the house model according to various embodiments of the present disclosure described in.
所述计算机可读存储介质可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列举)可以包括:具有一个或者多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM 或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The computer-readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples (non-exhaustive list) of readable storage media may include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
以上结合具体实施例描述了本公开的基本原理,但是,需要指出的是,在本公开中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势以及效果等是本公开的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本公开为必须采用上述具体的细节来实现。The above describes the basic principles of the present disclosure in conjunction with specific embodiments. However, it should be pointed out that the advantages, advantages, effects, etc. mentioned in the present disclosure are only examples and not limitations. These advantages, advantages, effects, etc. cannot be considered as Required for each embodiment of the present disclosure. In addition, the specific details of the foregoing disclosure are only for exemplary function and easy-to-understand function, rather than limitation, and the foregoing details do not limit the present disclosure to be implemented by the foregoing specific details.
上述实施例中的房屋模型的简化处理方法、装置以及电子设备、存储介质,对原始三维模型进行平面检测,确定原始三维模型中的平面区域和近似平面子区域,对平面区域和近似平面子区域进行多边形划分,构建简化的三维模型;通过对模型中的平面区域和近似平面子区域进行多边形划分,能够去除模型的冗余信息,减少表征每个平面区域和近似平面子区域所需要的多边形网格的数量,实现模型的简化;对平面区域和近似平面子区域采用不同的检测算法,对于模型中的细节简化进行全局处理,可以简化平面区域中的细节并能够保留近似平面子区域中的较多细节,提高了三维模型传输和浏览的实时性,有效的改善了客户体验。The simplified processing method, device, electronic equipment, and storage medium of the house model in the above embodiment perform plane detection on the original three-dimensional model, determine the plane area and the approximate plane sub-areas in the original three-dimensional model, and determine the plane area and the approximate plane sub-areas in the original three-dimensional model. Perform polygonal division to construct a simplified three-dimensional model; by polygonal division of the plane area and approximate flat sub-areas in the model, the redundant information of the model can be removed, and the polygon mesh required to characterize each flat area and approximate flat sub-area can be reduced. The number of grids can realize the simplification of the model; different detection algorithms are used for the flat area and the approximate flat sub-area, and the global processing of the simplification of the details in the model can simplify the details in the flat area and can retain the comparison in the approximate flat sub-area. Multiple details improve the real-time performance of 3D model transmission and browsing, and effectively improve customer experience.
本说明书中各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似的部分相互参见即可。对于***实施例而言,由于其与方法实施例基本对应,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. As for the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
本公开中涉及的器件、装置、设备、***的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备以及***。诸如“包括”、“包含、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, devices, devices, and systems can be connected, arranged, and configured in any manner. Words such as "include", "include, "have", etc. are open words that refer to "including but not limited to" and can be used interchangeably. The words "or" and "and" used herein refer to the words " And/or", and can be used interchangeably, unless the context clearly indicates otherwise. The term "such as" used herein refers to the phrase "such as but not limited to" and can be used interchangeably with it.
可能以许多方式来实现本公开的方法和装置。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法和装置。用于所述方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这 些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本公开的方法的程序的记录介质。The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure can be implemented by software, hardware, firmware or any combination of software, hardware, and firmware. The above-mentioned order of the steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless specifically stated otherwise. In addition, in some embodiments, the present disclosure can also be implemented as programs recorded in a recording medium, and these programs include machine-readable instructions for implementing the method according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
还需要指出的是,在本公开的装置、设备和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本公开的等效方案。It should also be pointed out that in the device, equipment and method of the present disclosure, each component or each step can be decomposed and/or recombined. These decomposition and/or recombination should be regarded as equivalent solutions of the present disclosure.
提供所公开的方面的以上描述,以使本领域的任何技术人员能够做出或者使用本公开。对这些方面的各种修改等对于本领域技术人员而言,是非常显而易见的,并且在此定义的一般原理可以应用于其他方面,而不脱离本公开的范围。因此,本公开不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown here, but in accordance with the widest scope consistent with the principles and novel features disclosed herein.
为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本公开的实施例限制到在此公开的形式中。尽管以上已经讨论了多个示例方面以及实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The above description has been given for the purposes of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and subcombinations thereof.

Claims (22)

  1. 一种房屋模型的简化处理方法,包括:A simplified processing method for a house model, including:
    对原始三维模型进行第一平面检测,确定所述原始三维模型中的至少一个平面区域和至少一个非平面区域;其中,所述原始三维模型为基于房屋的三维点云建立的三维模型,并且其中,所述平面区域和所述非平面区域由多个第一多边形网格构成;Perform first plane detection on the original three-dimensional model to determine at least one planar area and at least one non-planar area in the original three-dimensional model; wherein, the original three-dimensional model is a three-dimensional model established based on a three-dimensional point cloud of a house, and wherein , The planar area and the non-planar area are composed of a plurality of first polygonal meshes;
    对所述非平面区域进行第二平面检测,确定所述非平面区域中的至少一个近似平面子区域;以及Performing a second plane detection on the non-planar area to determine at least one approximate planar sub-region in the non-planar area; and
    对所述平面区域和所述近似平面子区域进行多边形划分,生成构成所述平面区域和所述近似平面子区域的第二多边形网格,以构建简化的三维模型;其中,所述第二多边形网格的数量小于所述第一多边形网格的数量。The plane area and the approximate plane sub-region are divided into polygons, and a second polygonal mesh constituting the plane area and the approximate plane sub-region is generated to construct a simplified three-dimensional model; wherein, the first The number of the second polygon mesh is smaller than the number of the first polygon mesh.
  2. 如权利要求1所述的方法,其中,对所述原始三维模型进行第一平面检测,确定所述原始三维模型中的所述平面区域和所述非平面区域包括:The method according to claim 1, wherein performing first plane detection on the original three-dimensional model, and determining the plane area and the non-planar area in the original three-dimensional model comprises:
    基于预设的区域生长算法以及第一平面区域判断规则,在所述原始三维模型中确定所述平面区域;以及Determine the plane area in the original three-dimensional model based on a preset area growth algorithm and a first plane area judgment rule; and
    将所述原始三维模型中除去所述平面区域的剩余区域确定为所述非平面区域。The remaining area in the original three-dimensional model excluding the planar area is determined as the non-planar area.
  3. 如权利要求2所述的方法,其中,基于所述预设的区域生长算法以及所述第一平面区域判断规则,在所述原始三维模型中确定所述平面区域包括:3. The method of claim 2, wherein, based on the preset area growth algorithm and the first planar area judgment rule, determining the planar area in the original three-dimensional model comprises:
    获得所述原始三维模型中不属于任一平面区域的一个多边形网格,作为第一区域;Obtain a polygon mesh that does not belong to any plane area in the original three-dimensional model as the first area;
    将此多边形网格作为第一中心多边形网格;Use this polygon grid as the first central polygon grid;
    获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将所述第一区域多边形网格合并在所述第一区域内;其中,所述第一相邻多边形网格不属于任一平面区域;Obtain a first adjacent polygon mesh around the first central polygon mesh, in response to determining the direction between the normal vector of the first central polygon mesh and the normal vector of the first adjacent polygon mesh The deviation is less than a preset first normal vector direction deviation threshold, using the first adjacent polygon mesh as a first region polygon mesh, and combining the first region polygon mesh in the first region; Wherein, the first adjacent polygon mesh does not belong to any plane area;
    将所述第一区域多边形网格作为第一中心多边形网格;Use the first area polygon grid as a first central polygon grid;
    重复执行所述获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将所述第一区域多边形网格合并在所述第一区域内,以及将所述第一区域多 边形网格作为第一中心多边形网格的操作,直至确定没有新的第一区域多边形网格能够合并在所述第一区域内;以及Repeatedly performing the obtaining of the first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the normal vector of the first central polygonal mesh and the normal vector of the first adjacent polygonal mesh The direction deviation between the two is smaller than the preset first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged in the first region polygon mesh. Within a region, and the operation of using the polygon mesh of the first region as the first central polygon mesh until it is determined that no new polygon mesh of the first region can be merged in the first region; and
    响应于确定所述第一区域内的多边形网格数量大于预设的第一多边形网格数量阈值,将所述第一区域确定为所述平面区域。In response to determining that the number of polygonal meshes in the first region is greater than a preset first polygonal mesh number threshold, the first region is determined as the plane region.
  4. 如权利要求3所述的方法,其中,对所述非平面区域进行第二平面检测,确定所述非平面区域中的所述近似平面子区域包括:The method according to claim 3, wherein, performing a second plane detection on the non-planar area, and determining the approximately planar sub-areas in the non-planar area comprises:
    基于预设的区域生长算法以及第二平面区域判断规则,在所述非平面区域中确定所述近似平面子区域。Based on a preset region growth algorithm and a second planar region judgment rule, the approximate planar sub-region is determined in the non-planar region.
  5. 如权利要求4所述的方法,其中,基于所述预设的区域生长算法以及所述第二平面区域判断规则,在所述非平面区域中确定所述近似平面子区域包括:The method according to claim 4, wherein, based on the preset region growth algorithm and the second planar region judgment rule, determining the approximate planar sub-region in the non-planar region comprises:
    获得所述非平面区域中不属于任一近似平面子区域的一个多边形网格,作为第二区域;Obtaining a polygonal mesh that does not belong to any approximate planar sub-region in the non-planar area as the second area;
    将此多边形网格作为第二中心多边形网格;Use this polygon grid as the second central polygon grid;
    获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,将所述第二相邻多边形网格作为第二区域多边形网格,并将所述第二区域多边形网格合并在所述第二区域内;其中,所述第二相邻多边形网格不属于任一平面区域和近似平面子区域;Obtain a second adjacent polygonal mesh around the second central polygonal mesh, in response to determining the direction between the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh The deviation is less than a preset second normal vector direction deviation threshold, using the second adjacent polygon mesh as a second region polygon mesh, and combining the second region polygon mesh in the second region; Wherein, the second adjacent polygonal grid does not belong to any planar area and approximate planar sub-areas;
    将所述第二区域多边形网格作为所述第二中心多边形网格;Use the second area polygon grid as the second central polygon grid;
    重复执行所述获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,将所述第二相邻多边形网格作为第二区域多边形网格,并将所述第二区域多边形网格合并在所述第二区域内,以及将所述第二区域多边形网格作为所述第二中心多边形网格的操作,直至确定没有新的第二区域多边形网格能够合并在所述第二区域内;以及Repeatedly performing the obtaining of the second adjacent polygonal mesh around the second central polygonal mesh, in response to determining the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh The direction deviation between the two is smaller than the preset second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged in the first region. In the second area, and the operation of using the second area polygon mesh as the second central polygon mesh, until it is determined that no new second area polygon mesh can be merged in the second area; and
    响应于确定所述第二区域内的多边形网格数量大于预设的第二多边形网格数量阈值,将所述第二区域确定为所述近似平面子区域。In response to determining that the number of polygonal meshes in the second region is greater than a preset threshold for the number of second polygonal meshes, the second region is determined as the approximately planar subregion.
  6. 根据权利要求5所述的方法,其中,所述第二法向量方向偏差阈值大于所述第一法向量方向偏差阈值,所述第二多边形网格数量阈值小于所述第一多边形网格数量阈值。The method according to claim 5, wherein the second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh number threshold is smaller than the first polygon Threshold for the number of grids.
  7. 如权利要求1-6中任一项所述的方法,其中,所述至少一个平面区域包括多个平面区域,并且The method according to any one of claims 1-6, wherein the at least one planar area includes a plurality of planar areas, and
    其中,所述方法还包括:Wherein, the method further includes:
    对位于所述多个平面区域中的每两个相邻平面区域连接处的第一边界多边形网格进行区域调整处理,以使所述第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于所述第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差,The region adjustment process is performed on the first boundary polygon mesh at the junction of every two adjacent planar regions in the plurality of planar regions, so that the first boundary polygon mesh and the third adjacent polygon mesh are different from each other. The normal vector direction deviation between the two is smaller than the normal vector direction deviation between the first boundary polygonal mesh and the fourth adjacent polygonal mesh,
    其中,所述第三相邻多边形网格与所述第一边界多边形网格属于同一平面区域,所述第四相邻多边形网格与所述第一边界多边形网格不属于同一平面区域。Wherein, the third adjacent polygon grid and the first boundary polygon grid belong to the same plane area, and the fourth adjacent polygon grid and the first boundary polygon grid do not belong to the same plane area.
  8. 根据权利要求1-6中任一项所述的方法,其中,所述至少一个近似平面子区域包括多个近似平面子区域,并且,The method according to any one of claims 1 to 6, wherein the at least one approximately planar sub-region includes a plurality of approximately planar sub-regions, and,
    其中,所述方法还包括:Wherein, the method further includes:
    对位于所述多个近似平面子区域中的每两个相邻近似平面子区域连接处的第二边界多边形网格进行区域调整处理,以使所述第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于所述第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差,Region adjustment processing is performed on the second boundary polygon mesh located at the junction of every two adjacent approximate planar sub-regions in the plurality of approximate planar sub-regions, so that the second boundary polygon mesh is adjacent to the fifth The normal vector direction deviation between the polygonal meshes is smaller than the normal vector direction deviation between the second boundary polygonal mesh and the sixth adjacent polygonal mesh,
    其中,所述第五相邻多边形网格与所述第二边界多边形网格属于同一近似平面子区域,所述第六相邻多边形网格与所述第二边界多边形网格不属于同一近似平面子区域。Wherein, the fifth adjacent polygonal mesh and the second boundary polygonal mesh belong to the same approximate plane sub-region, and the sixth adjacent polygonal mesh and the second boundary polygonal mesh do not belong to the same approximate plane Sub-area.
  9. 如权利要求1-6中任一项所述的方法,还包括:The method according to any one of claims 1-6, further comprising:
    对位于所述平面区域或所述近似平面子区域边缘的第一多边形网格的边线进行直线拟合处理,以生成所述平面区域或所述近似平面子区域的边界线。Perform straight line fitting processing on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region to generate the boundary line of the planar area or the approximate planar sub-region.
  10. 如权利要求1-6中任一项所述的方法,其中,所述第二多边形网格为三角形网格;并且其中,对所述平面区域和所述近似平面子区域进行多边形划分包括:The method according to any one of claims 1 to 6, wherein the second polygonal mesh is a triangular mesh; and wherein, polygonally dividing the planar area and the approximate planar sub-areas comprises :
    利用预设的剖分算法对所述平面区域和所述近似平面子区域进行三角形划分。Triangulation is performed on the planar area and the approximate planar sub-areas by using a preset division algorithm.
  11. 一种房屋模型的简化处理方法装置,包括:A simplified processing method device for a house model, including:
    第一检测模块,配置为对原始三维模型进行第一平面检测,确定所述原始三维模型中的至少一个平面区域和至少一个非平面区域;其中,所述原始三维模型为基于房屋的三维点云建立的三维模型,并且其中,所述平面区域和所述非平面区域由多个第一多边形网格构成;The first detection module is configured to perform a first plane detection on the original three-dimensional model to determine at least one planar area and at least one non-planar area in the original three-dimensional model; wherein the original three-dimensional model is a house-based three-dimensional point cloud The established three-dimensional model, and wherein the planar area and the non-planar area are composed of a plurality of first polygonal meshes;
    第二检测模块,配置为对所述非平面区域进行第二平面检测,确定所述非平面区域中的至少一个近似平面子区域;以及The second detection module is configured to perform a second plane detection on the non-planar area, and determine at least one approximate planar sub-region in the non-planar area; and
    模型生成模块,配置为对所述平面区域和所述近似平面子区域进行多边形划分,生成构成所述平面区域和所述近似平面子区域的第二多边形网格,以构建简化的三维模型;其中,所述第二多边形网格的数量小于所述第一多边形网格的数量。The model generation module is configured to divide the planar area and the approximate planar sub-region into polygons, and generate a second polygonal mesh constituting the planar area and the approximate planar sub-region to construct a simplified three-dimensional model ; Wherein, the number of the second polygon mesh is less than the number of the first polygon mesh.
  12. 如权利要求11所述的装置,其中,所述第一检测模块还被配置为:基于预设的区域生长算法以及第一平面区域判断规则,在所述原始三维模型中确定所述平面区域;以及11. The device of claim 11, wherein the first detection module is further configured to determine the planar area in the original three-dimensional model based on a preset area growth algorithm and a first planar area judgment rule; as well as
    将所述原始三维模型中除去所述平面区域的剩余区域确定为所述非平面区域。The remaining area in the original three-dimensional model excluding the planar area is determined as the non-planar area.
  13. 如权利要求12所述的装置,其中,所述第一检测模块还被配置为:The apparatus of claim 12, wherein the first detection module is further configured to:
    获得所述原始三维模型中不属于任一平面区域的一个多边形网格,作为第一区域;Obtain a polygon mesh that does not belong to any plane area in the original three-dimensional model as the first area;
    将此多边形网格作为第一中心多边形网格;Use this polygon grid as the first central polygon grid;
    获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将所述第一区域多边形网格合并在所述第一区域内;其中,所述第一相邻多边形网格不属于任一平面区域;Obtain a first adjacent polygon mesh around the first central polygon mesh, in response to determining the direction between the normal vector of the first central polygon mesh and the normal vector of the first adjacent polygon mesh The deviation is less than a preset first normal vector direction deviation threshold, using the first adjacent polygon mesh as a first region polygon mesh, and combining the first region polygon mesh in the first region; Wherein, the first adjacent polygon mesh does not belong to any plane area;
    将所述第一区域多边形网格作为第一中心多边形网格;Use the first area polygon grid as a first central polygon grid;
    重复执行所述获得所述第一中心多边形网格周边的第一相邻多边形网格,响应于确定所述第一中心多边形网格的法向量与所述第一相邻多边形网格的法向量之间的方向偏差小于预设的第一法向量方向偏差阈值,将所述第一相邻多边形网格作为第一区域多边形网格,并将所述第一区域多边形网格合并在所述第一区域内,以及将所述第一区域多边形网格作为第一中心多边形网格的操作,直至确定没有新的第一区域多边形网格能够合并在所述第一区域内;以及Repeatedly performing the obtaining of the first adjacent polygonal mesh around the first central polygonal mesh, in response to determining the normal vector of the first central polygonal mesh and the normal vector of the first adjacent polygonal mesh The direction deviation between the two is smaller than the preset first normal vector direction deviation threshold, the first adjacent polygon mesh is used as the first region polygon mesh, and the first region polygon mesh is merged in the first region polygon mesh. Within a region, and the operation of using the polygon mesh of the first region as the first central polygon mesh until it is determined that no new polygon mesh of the first region can be merged in the first region; and
    响应于确定所述第一区域内的多边形网格数量大于预设的第一多边形网格数量阈值,将所述第一区域确定为所述平面区域。In response to determining that the number of polygonal meshes in the first region is greater than a preset first polygonal mesh number threshold, the first region is determined as the plane region.
  14. 如权利要求13中任一项所述的装置,其中,所述第二检测模块还被配置为:The apparatus according to any one of claims 13, wherein the second detection module is further configured to:
    基于预设的区域生长算法以及第二平面区域判断规则,在所述非平面区域中确定所述近似平面子区域。Based on a preset region growth algorithm and a second planar region judgment rule, the approximate planar sub-region is determined in the non-planar region.
  15. 如权利要求14所述的装置,其中,所述第二检测模块还被配置为:The apparatus of claim 14, wherein the second detection module is further configured to:
    获得所述非平面区域中不属于任一近似平面子区域的一个多边形网格,作为第二区域;Obtaining a polygonal mesh that does not belong to any approximate planar sub-region in the non-planar area as the second area;
    将此多边形网格作为第二中心多边形网格;Use this polygon grid as the second central polygon grid;
    获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,将所述第二相邻多边形网格作为第二区域多边形网格,并将所述第二区域多边形网格合并在所述第二区域内;其中,所述第二相邻多边形网格不属于任一平面区域和近似平面子区域;Obtain a second adjacent polygonal mesh around the second central polygonal mesh, in response to determining the direction between the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh The deviation is less than a preset second normal vector direction deviation threshold, using the second adjacent polygon mesh as a second region polygon mesh, and combining the second region polygon mesh in the second region; Wherein, the second adjacent polygonal grid does not belong to any planar area and approximate planar sub-areas;
    将所述第二区域多边形网格作为所述第二中心多边形网格;Use the second area polygon grid as the second central polygon grid;
    重复执行所述获得所述第二中心多边形网格周边的第二相邻多边形网格,响应于确定所述第二中心多边形网格的法向量与所述第二相邻多边形网格的法向量之间的方向偏差小于预设的第二法向量方向偏差阈值,则将所述第二相邻多边形网格作为第二区域多边形网格,并将所述第二区域多边形网格合并在所述第二区域内,以及将所述第二区域多边形网格作为所述第二中心多边形网格的操作,直至确定没有新的第二区域多边形网格能够合并在所述第二区域内;以及Repeatedly performing the obtaining of the second adjacent polygonal mesh around the second central polygonal mesh, in response to determining the normal vector of the second central polygonal mesh and the normal vector of the second adjacent polygonal mesh If the direction deviation between the two is less than the preset second normal vector direction deviation threshold, the second adjacent polygon mesh is used as the second region polygon mesh, and the second region polygon mesh is merged into the In the second area, and the operation of using the second area polygonal mesh as the second central polygonal mesh, until it is determined that no new second area polygonal mesh can be merged in the second area; and
    响应于确定所述第二区域内的多边形网格数量大于预设的第二多边形网格数量阈值,将所述第二区域确定为所述近似平面子区域。In response to determining that the number of polygonal meshes in the second region is greater than a preset threshold for the number of second polygonal meshes, the second region is determined as the approximately planar subregion.
  16. 如权利要求15所述的装置,其中,所述第二法向量方向偏差阈值大于所述第一法向量方向偏差阈值,所述第二多边形网格数量阈值小于所述第一多边形网格数量阈值。The apparatus of claim 15, wherein the second normal vector direction deviation threshold is greater than the first normal vector direction deviation threshold, and the second polygon mesh number threshold is smaller than the first polygon Threshold for the number of grids.
  17. 如权利要求11-16中任一项所述的装置,其中,所述至少一个平面区域包括多个平面区域,并且其中,所述模型生成模块包括:The device according to any one of claims 11-16, wherein the at least one plane area includes a plurality of plane areas, and wherein the model generation module includes:
    区域调整单元,配置为对位于所述多个平面区域中的每两个相邻平面区域连接处的第一边界多边形网格进行区域调整处理,以使所述第一边界多边形网格与第三相邻多边形网格之间的法向量方向偏差小于所述第一边界多边形网格与第四相邻多边形网格之间的法向量方向偏差,其中,所述第三相邻多边形网格与所述第一边界多边形网格属于同一平面区域,所述第四相邻多边形网格与所述第一边界多边形网格不属于同一平面区域。The area adjustment unit is configured to perform area adjustment processing on the first boundary polygon mesh at the junction of every two adjacent planar areas in the plurality of plane areas, so that the first boundary polygon mesh and the third The normal vector direction deviation between adjacent polygonal meshes is smaller than the normal vector direction deviation between the first boundary polygonal mesh and the fourth adjacent polygonal mesh. The first boundary polygon grid belongs to the same plane area, and the fourth adjacent polygon grid and the first boundary polygon grid do not belong to the same plane area.
  18. 如权利要求11-16中任一项所述的装置,其中,所述至少一个近似平面子区域包括多个近似平面子区域,并且,所述模型生成模块包括:The apparatus according to any one of claims 11-16, wherein the at least one approximately planar sub-region includes a plurality of approximately planar sub-regions, and the model generation module includes:
    区域调整单元,配置为对位于所述多个近似平面子区域中的每两个相邻近似平面子区域连接处的第二边界多边形网格进行区域调整处理,以使所述第二边界多边形网格与第五相邻多边形网格之间的法向量方向偏差小于所述第二边界多边形网格与第六相邻多边形网格之间的法向量方向偏差,The area adjustment unit is configured to perform area adjustment processing on the second boundary polygon grid located at the junction of every two adjacent approximate plane sub-regions in the plurality of approximate plane sub-regions, so that the second boundary polygon mesh is The normal vector direction deviation between the grid and the fifth adjacent polygonal mesh is smaller than the normal vector direction deviation between the second boundary polygonal mesh and the sixth adjacent polygonal mesh,
    其中,所述第五相邻多边形网格与所述第二边界多边形网格属于同一近似平面子区域,所述第六相邻多边形网格与所述第二边界多边形网格不属于同一近似平面子区域。Wherein, the fifth adjacent polygonal mesh and the second boundary polygonal mesh belong to the same approximate plane sub-region, and the sixth adjacent polygonal mesh and the second boundary polygonal mesh do not belong to the same approximate plane Sub-area.
  19. 如权利要求11-16中任一项所述的装置,其中,所述模型生成模块包括:The device according to any one of claims 11-16, wherein the model generation module comprises:
    边界处理单元,配置为对位于所述平面区域或所述近似平面子区域边缘的第一多边形网格的边线进行直线拟合处理,以生成所述平面区域或所述近似平面子区域的边界线。The boundary processing unit is configured to perform a straight line fitting process on the edge of the first polygonal grid located at the edge of the planar area or the approximate planar sub-region, to generate the image of the planar area or the approximate planar sub-region borderline.
  20. 如权利要求11-16中任一项所述的装置,所述第二多边形网格为三角形网格;The device according to any one of claims 11-16, wherein the second polygonal mesh is a triangular mesh;
    并且其中,所述模型生成模块包括:And wherein, the model generation module includes:
    多边形划分单元,配置为利用预设的剖分算法对所述平面区域和所述近似平面子区域进行三角形划分。The polygon dividing unit is configured to triangulate the planar area and the approximate planar sub-areas by using a preset segmentation algorithm.
  21. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序由处理器执行时,使所述处理器执行根据权利要求1-10中任一项所述的方法。A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor executes the method according to any one of claims 1-10.
  22. 一种电子设备,包括:An electronic device including:
    处理器;以及Processor; and
    存储器,用于存储所述处理器可执行的指令;A memory for storing instructions executable by the processor;
    所述指令由所述处理器执行时,使所述处理器执行根据权利要求1-10中任一项所述的方法。When the instructions are executed by the processor, the processor is caused to execute the method according to any one of claims 1-10.
PCT/CN2020/120868 2019-10-17 2020-10-14 Building model simplification processing method and apparatus, electronic device, and storage medium WO2021073530A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910989335.3 2019-10-17
CN201910989335.3A CN111080792B (en) 2019-10-17 2019-10-17 Model simplification processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021073530A1 true WO2021073530A1 (en) 2021-04-22

Family

ID=70310436

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/120868 WO2021073530A1 (en) 2019-10-17 2020-10-14 Building model simplification processing method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN111080792B (en)
WO (1) WO2021073530A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111080792B (en) * 2019-10-17 2021-03-23 北京房江湖科技有限公司 Model simplification processing method and device, electronic equipment and storage medium
CN113628343B (en) * 2021-10-09 2021-12-07 贝壳技术有限公司 Three-dimensional grid combination processing method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304265B1 (en) * 1998-01-30 2001-10-16 Hewlett-Packard Company System for distinguishing front facing and back facing primitives in a computer graphics system using area calculations in homogeneous coordinates
CN101114383A (en) * 2006-07-28 2008-01-30 中国科学院自动化研究所 Leaves advance gradually simplifying method
CN107945189A (en) * 2017-11-28 2018-04-20 武汉大学 A kind of point cloud plane dividing method based on normal distribution transform unit
CN111080792A (en) * 2019-10-17 2020-04-28 贝壳技术有限公司 Model simplification processing method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877147B (en) * 2010-06-29 2012-10-03 浙江大学 Simplified algorithm of three-dimensional triangular mesh model
CN108010119A (en) * 2017-11-23 2018-05-08 网易(杭州)网络有限公司 Method of adjustment, device, storage medium, processor and the terminal of shadow region
CN109493344A (en) * 2018-09-18 2019-03-19 北京大学 A kind of semantic segmentation method of large-scale city three-dimensional scenic
CN109658474A (en) * 2018-11-15 2019-04-19 深圳大学 Creation method, device and the computer equipment of three-dimensional sketch
CN110084894B (en) * 2019-04-30 2023-08-22 贝壳技术有限公司 Local amplification display method and device of three-dimensional model and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304265B1 (en) * 1998-01-30 2001-10-16 Hewlett-Packard Company System for distinguishing front facing and back facing primitives in a computer graphics system using area calculations in homogeneous coordinates
CN101114383A (en) * 2006-07-28 2008-01-30 中国科学院自动化研究所 Leaves advance gradually simplifying method
CN107945189A (en) * 2017-11-28 2018-04-20 武汉大学 A kind of point cloud plane dividing method based on normal distribution transform unit
CN111080792A (en) * 2019-10-17 2020-04-28 贝壳技术有限公司 Model simplification processing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1 January 2006, article HE, MEIFANG: "Research on Key Technologies of Surfaces Reconstruction Based on Scattered Point Cloud Data", XP055802443 *

Also Published As

Publication number Publication date
CN111080792B (en) 2021-03-23
CN111080792A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN112767551B (en) Three-dimensional model construction method and device, electronic equipment and storage medium
Wang et al. Trivariate solid T-spline construction from boundary triangulations with arbitrary genus topology
TWI652589B (en) System and method for simplifying grids of point cloud
WO2021073530A1 (en) Building model simplification processing method and apparatus, electronic device, and storage medium
CN110167756B (en) Build direction based partitioning for building solid objects by additive manufacturing
CN106960470B (en) Three-dimensional point cloud curved surface reconstruction method and device
Wan et al. A topology-preserving optimization algorithm for polycube mapping
US20210299962A1 (en) Systems, methods, and media for controlling support structures and build orientation in manufacturing
Yang et al. A Point Cloud Simplification Method Based on Modified Fuzzy C‐Means Clustering Algorithm with Feature Information Reserved
CN113470095B (en) Processing method and device for indoor scene reconstruction model
US11816397B2 (en) Generating designs for multi-family housing projects using rigid body simulations
US8878848B2 (en) Method and device for snapping normals to create fair 3D surfaces from edge curves
CN113205090B (en) Picture correction method, device, electronic equipment and computer readable storage medium
JP2023529790A (en) Method, apparatus and program for generating floorplans
WO2024031973A1 (en) Floor plan generation method and apparatus, and electronic device and storage medium
CN117152341A (en) Three-dimensional surface extraction method, apparatus and storage medium
CN112287427B (en) Building wall position determining method and device, computer equipment and storage medium
CN114969893A (en) Ceiling keel design method based on internal and external corner identification and storage medium
Bianco et al. Sensor placement optimization in buildings
CN113538562A (en) Indoor area determination method and device, electronic equipment and storage medium
CN111986300A (en) Rendering point determination method and device for house decoration, storage medium and electronic equipment
Zhao et al. Automatically modeling piecewise planar furniture shapes from unorganized point cloud
CN115690120B (en) Method, apparatus, device, medium and program product for generating three-dimensional grid
CN115761122B (en) Method, device, equipment and medium for realizing three-dimensional auxiliary ruler
CN116245931B (en) Method, device, equipment, medium and product for determining object attribute parameters

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20878012

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20878012

Country of ref document: EP

Kind code of ref document: A1