CN116977592A - Three-dimensional structured reconstruction method, device and computer medium based on winding number - Google Patents

Three-dimensional structured reconstruction method, device and computer medium based on winding number Download PDF

Info

Publication number
CN116977592A
CN116977592A CN202311239691.6A CN202311239691A CN116977592A CN 116977592 A CN116977592 A CN 116977592A CN 202311239691 A CN202311239691 A CN 202311239691A CN 116977592 A CN116977592 A CN 116977592A
Authority
CN
China
Prior art keywords
polyhedron
fitting
patch
patches
convex
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311239691.6A
Other languages
Chinese (zh)
Other versions
CN116977592B (en
Inventor
黄惠
何鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
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 Shenzhen University filed Critical Shenzhen University
Priority to CN202311239691.6A priority Critical patent/CN116977592B/en
Publication of CN116977592A publication Critical patent/CN116977592A/en
Application granted granted Critical
Publication of CN116977592B publication Critical patent/CN116977592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes

Landscapes

  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a three-dimensional structured reconstruction method, a device, a computer medium, a computer device and a computer program product based on winding numbers. The method comprises the following steps: performing plane detection based on an original point cloud of the object to obtain a plurality of fitting patches; dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches respectively; constructing a wraparound polyhedron based on the plurality of outer panels; carrying out multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; iteratively marking the inside and outside of the plurality of convex polyhedrons, removing the convex polyhedrons marked as the outside, and updating the convex polyhedrons until the iteration is stopped; a three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration. By adopting the method, the three-dimensional reconstruction efficiency can be improved.

Description

Three-dimensional structured reconstruction method, device and computer medium based on winding number
Technical Field
The present application relates to the field of three-dimensional reconstruction technology, and in particular, to a three-dimensional structured reconstruction method, apparatus, computer readable storage medium, computer device and computer program product based on winding numbers.
Background
With the development of computer vision, three-dimensional reconstruction is increasingly widely applied to scenes such as building modeling, city planning, building measurement, 3D printing and the like. Three-dimensional reconstruction is the creation of a mathematical model for an object that is suitable for computer representation and processing. Generally, a dense point cloud is constructed by using a sparse point cloud corresponding to an object, and then the object is subjected to three-dimensional reconstruction by using the dense point cloud, so as to obtain a three-dimensional reconstruction model of the object.
However, the method of three-dimensional reconstruction of an object by dense point clouds is complex and time consuming, resulting in a low efficiency of three-dimensional reconstruction.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a three-dimensional structured reconstruction method, apparatus, computer medium, computer device, and computer program product based on the number of windings that can improve the efficiency of three-dimensional reconstruction.
In a first aspect, the present application provides a three-dimensional structured reconstruction method based on a number of windings. The method comprises the following steps:
performing plane detection based on an original point cloud of the object to obtain a plurality of fitting patches;
dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches respectively;
Constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron;
performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
iteratively labeling the plurality of convex polyhedrons, in each iteration, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
a three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
In a second aspect, the application further provides a three-dimensional structured reconstruction device based on the winding number. The device comprises:
the plane detection module is used for carrying out plane detection based on the original point cloud of the object to obtain a plurality of fitting patches;
The panel dividing module is used for dividing the fitting panels into a plurality of outer panels and a plurality of inner panels according to the boundary points corresponding to the fitting panels;
a polyhedron construction module for constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron; performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
a polyhedron marking module for iteratively marking the plurality of convex polyhedrons, in each iteration, marking each of the plurality of convex polyhedrons as one of an inner polyhedron and an outer polyhedron, and rejecting the outer polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
and the three-dimensional reconstruction module is used for determining the three-dimensional reconstruction surface of the object according to the outer surfaces of the convex polyhedrons when iteration is stopped.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
performing plane detection based on an original point cloud of the object to obtain a plurality of fitting patches;
dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches respectively;
constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron;
performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
iteratively labeling the plurality of convex polyhedrons, in each iteration, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
A three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
performing plane detection based on an original point cloud of the object to obtain a plurality of fitting patches;
dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches respectively;
constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron;
performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
iteratively labeling the plurality of convex polyhedrons, in each iteration, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
A three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
performing plane detection based on an original point cloud of the object to obtain a plurality of fitting patches;
dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches respectively;
constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron;
performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
iteratively labeling the plurality of convex polyhedrons, in each iteration, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
A three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
According to the three-dimensional structured reconstruction method, the device, the computer medium, the computer equipment and the computer program product based on the winding number, the plane detection is carried out based on the original point cloud of the object to obtain a plurality of fitting patches, the initial structure information of the object is obtained, and the normal vector analysis based on the points is avoided; constructing a wrapping polyhedron according to an external surface sheet in the fitting surface sheet, and dividing the space of the wrapping polyhedron and the internal surface sheet into a plurality of convex polyhedrons based on multiple levels, so that a point cloud structure can be accurately perceived; furthermore, the convex polyhedrons are marked iteratively, the convex polyhedrons marked as external polyhedrons in the convex polyhedrons are removed, the three-dimensional reconstruction surface of the object is determined according to the outer surfaces of the convex polyhedrons when iteration is stopped, the point cloud structure of the object can be expressed by fewer vertexes and patches, the calculated amount is reduced, meanwhile, the structure of the object can be expressed more accurately, and the three-dimensional reconstruction efficiency is improved.
Drawings
FIG. 1 is a flow diagram of a three-dimensional structured reconstruction method based on wrap numbers in one embodiment;
FIG. 2 is a flow chart of a three-dimensional structured reconstruction step based on the number of windings in one embodiment;
FIG. 3 is a schematic flow diagram of a wraparound polyhedron configuration in one embodiment;
FIG. 4 is a schematic diagram of multi-level spatial partitioning in one embodiment;
FIG. 5 is a schematic diagram of matching degree colors corresponding to different three-dimensional reconstruction methods in one embodiment;
FIG. 6 is a schematic diagram of a visualization of reconstruction results obtained by different three-dimensional reconstruction methods in one embodiment;
FIG. 7 is a schematic diagram of a reconstruction result obtained by reconstructing point clouds of different objects by different three-dimensional reconstruction methods in one embodiment;
FIG. 8 is a block diagram of a three-dimensional structured reconstruction device based on wrap numbers in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a three-dimensional structured reconstruction method based on winding number is provided, and this embodiment is exemplified by applying the method to a computer device, which may be a terminal or a server, it is understood that the method may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. The terminal may be a desktop computer, a notebook computer, a smart phone or a tablet computer. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. In this embodiment, the method includes the steps of:
And 102, performing plane detection based on the original point cloud of the object to obtain a plurality of fitting patches.
Wherein the object is a three-dimensional object present in the real world. The object may be a living body, such as a human or an animal; the object may also be a non-living body, which may be a natural object, such as a plant, or an artificial object, such as a building, a machine part, or other object manufactured by a human being.
The original point cloud is a point cloud acquired for an object by a point cloud sensor. Plane detection is a process of detecting a plane in an object. The fitting surface patch is a closed surface composed of a plurality of edges fitted by a point cloud.
In one embodiment, the computer device may obtain an original point cloud of the object, simplify the original point cloud by poisson sampling, obtain a simplified point cloud, and perform planar detection on the simplified point cloud to obtain a plurality of fitting patches. The poisson sampling is a sampling mode for reducing the scale of point cloud, optimizing the density of the point cloud and enabling the simplified point cloud to be more uniform than the original point cloud in distribution.
In one embodiment, the computer device may obtain an original point cloud of the object, perform plane detection based on the obtained original point cloud, obtain a plurality of fitting planes, project, for each fitting plane of the plurality of fitting planes, a point cloud corresponding to the fitting plane to which the point cloud is directed into the corresponding fitting plane to which the point cloud is directed, obtain projection points of the corresponding point cloud in the fitting plane, and form a fitting patch of the corresponding point cloud according to the projection points in the fitting plane to which the point cloud is directed. When the fitting surface patch is formed according to the projection points in the fitting plane, the convex hulls formed by the projection points in the fitting plane can be used as the fitting surface patch, and the polygons of the preset type surrounding the projection points in the fitting plane can also be used as the fitting surface patch. The convex hull is a convex polygon formed by connecting projection points of the outermost layers in the fitting plane. A preset type of polygon such as triangle, square, rectangle or others.
In one embodiment, the computer device may employ least squares for plane detection. In this embodiment, the computer device may establish an objective function, and constrain the average distance between each point of the target point cloud and the fitting plane to be the smallest, so as to solve based on the objective function, and obtain the fitting plane.
In one embodiment, the computer device may employ a RANSAC algorithm (Random Sample Consensus, random sample consensus algorithm) for plane detection. In this example, the computer device may iteratively randomly select a plane from the point cloud to be fitted, consider points in the point cloud to be fitted, whose distance from the plane is less than or equal to a preset distance, as belonging to the plane, reserve the plane when the number of points belonging to the plane exceeds a number threshold, and finally determine the plane with the largest number of points belonging to the plane as a final fitting plane, and continuously perform random selection on other points in the point cloud to be fitted until the iteration is completed, so as to obtain a plurality of fitting planes. The point cloud to be fitted may be an original point cloud or a simplified point cloud. And a plurality of points belonging to the fitting plane, namely point clouds corresponding to the fitting plane. The preset distance is a preset threshold, for example 0.05cm, 0.1cm.
Step 104, dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches.
The boundary points corresponding to the fitting surface patch are projection points which are located at the boundary among a plurality of projection points obtained after the point cloud corresponding to the fitting surface patch is projected to the fitting surface patch. The projection points at the boundary may specifically be boundary points extracted from a plurality of projection points corresponding to the point cloud by an Alpha Shape algorithm (contour extraction method). The Alpha Shape algorithm is an algorithm for extracting boundary points based on a circle with a radius α. Alpha may be a preset value, for example 10mm; it may also be calculated that, for example, α may be inversely related to the degree of density of the point cloud, i.e., the more the point cloud is sparse, the greater the α, the denser the point cloud, and the smaller the α.
For a fitting patch of the plurality of fitting patches, when other patches are on the same side of the fitting patch, the fitting patch is an external patch; when other patches are on either side of the fitting patch being targeted, then the fitting patch being targeted is an internal patch.
In one embodiment, the computer device divides the plurality of fitted tiles into a plurality of outer tiles and a plurality of inner tiles according to the relative positional relationship of the respective boundary points of the plurality of fitted tiles.
Step 106, constructing a wraparound polyhedron based on the plurality of outer panels; a plurality of inner panels are within the space surrounding the polyhedron.
Wherein the polyhedron is a solid surrounded by four or more polygons. A wraparound polyhedron is a polyhedron that encloses a plurality of inner panels. The polyhedral type of the wraparound polyhedron is a convex polyhedron. For each face of the polyhedron, the polyhedron is a convex polyhedron when the other faces of the polyhedron are on the same side of the face.
In one embodiment, the computer device may extend the plurality of outer panels separately until a closed polyhedron is formed, with the closed polyhedron being a wraparound polyhedron based on the plurality of outer panel configurations.
Step 108, carrying out multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and one internal panel is an internal panel having the smallest intersection with other internal panels not yet participating in space division among the plurality of internal panels.
Where space division is the process of dividing a larger space into multiple smaller subspaces. The multi-level spatial division is a multi-level spatial division. An intersection is a set of intersecting ones of the other internal patches that have not yet participated in the spatial division.
In one embodiment, the computer device may perform a multi-stage spatial division based on the wraparound polyhedron to obtain a plurality of convex polyhedrons, and in each stage of spatial division, extend an inner panel of the plurality of inner panels that has not participated in the spatial division to divide subspaces within the space of the wraparound polyhedron, and after the last stage of spatial division, obtain a plurality of convex polyhedrons.
Step 110, iteratively labeling the plurality of convex polyhedrons, in each iteration, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped.
Wherein the internal polyhedron characterizes the polyhedron as being internal to the object. The internal polyhedron may be specifically at the boundary of the object, and its external surface may be used to express the external surface structure of the object. The external polyhedron characterizes the polyhedron as being external to the object.
In one embodiment, the computer device may iteratively label the plurality of convex polyhedrons, in each iteration, each of the plurality of convex polyhedrons being labeled as one of an inner polyhedron and an outer polyhedron such that the function value of the predefined energy function is minimized, the outer polyhedron of the plurality of convex polyhedrons being culled to update the plurality of convex polyhedrons until the iteration is stopped.
In one embodiment, the computer device may iteratively label the bounding ones of the plurality of convex polyhedrons, label each of the bounding convex polyhedrons as one of an inner polyhedron and an outer polyhedron in each iteration, cull the outer polyhedron of the bounding convex polyhedron to update the plurality of convex polyhedrons, and update the bounding ones of the plurality of convex polyhedrons until the iteration is stopped. The convex polyhedron at the boundary is a polyhedron with an outer surface sheet, when the outer polyhedron in the convex polyhedron at the boundary is partially removed in the iterative process, the convex polyhedron which is not at the boundary originally is exposed to form a new convex polyhedron at the boundary, and the exposed surface of the convex polyhedron is updated from the inner surface sheet to the outer surface sheet, so that the normal vector of the updated outer surface sheet, namely the normal vector direction, can be determined to be directed to the outside.
At step 112, a three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
The three-dimensional reconstruction surface is a surface which is obtained after three-dimensional reconstruction of the object and is used for representing the external structure of the object.
In one embodiment, the computer device may determine a bounding convex polyhedron of the plurality of convex polyhedrons at the time of stopping the iteration, and determine an outer surface of the bounding convex polyhedron at the time of stopping the iteration as a three-dimensional reconstruction surface of the object.
In the three-dimensional structured reconstruction method based on the winding number, the plane detection is carried out based on the original point cloud of the object to obtain a plurality of fitting patches, so that the initial structure information of the object is obtained, and the normal vector analysis based on the points is avoided; constructing a wrapping polyhedron according to an external surface sheet in the fitting surface sheet, and dividing the space of the wrapping polyhedron and the internal surface sheet into a plurality of convex polyhedrons based on multiple levels, so that a point cloud structure can be accurately perceived; furthermore, the convex polyhedrons are marked iteratively, the convex polyhedrons marked as external polyhedrons in the convex polyhedrons are removed, the three-dimensional reconstruction surface of the object is determined according to the outer surfaces of the convex polyhedrons when iteration is stopped, the point cloud structure of the object can be expressed by fewer vertexes and patches, the calculated amount is reduced, meanwhile, the structure of the object can be expressed more accurately, and the three-dimensional reconstruction efficiency is improved.
In one embodiment, step 104 may include: determining boundary points corresponding to the fitting patches respectively; traversing each fitting patch of the plurality of fitting patches; determining the rest fitting patches except the fitting patches currently traversed in the plurality of fitting patches; and classifying the fitting surface patch which is currently traversed into one of an external surface patch and an internal surface patch according to the relative position relation between the boundary points corresponding to the rest fitting surface patches and the fitting surface patch which is currently traversed.
The relative positional relationship is formed by determining the position of one of the boundary points corresponding to the remaining fitting patches and the fitting patches which are traversed currently as a reference object.
In this embodiment, by using the relative positional relationship between the boundary points corresponding to the remaining fitting patches and the fitting patch currently traversed, the fitting patch currently traversed can be classified into one of the external patch and the internal patch by using a smaller amount of computation without comparing the relative positional relationship between all points in the point cloud corresponding to the remaining fitting patches and the fitting patch currently traversed.
In one embodiment, the computer device may project the point clouds corresponding to each of the plurality of fitting patches into the corresponding fitting patches, obtain the projection points corresponding to each of the plurality of fitting patches, extract the projection points located at the boundary for each of the projection points of the plurality of fitting patches by using an Alpha Shape algorithm, and use the extracted projection points located at the boundary as the boundary points corresponding to the fitting patches.
In one embodiment, the step of classifying the currently traversed fitted patch into one of the outer patch and the inner patch according to the relative positional relationship of the boundary points corresponding to the remaining fitted patches and the currently traversed fitted patch may include: when the boundary points corresponding to the remaining fitting patches are distributed on the same side of the fitting patch which is currently traversed, the computer equipment can classify the fitting patch which is currently traversed into an external patch; when the boundary points corresponding to the remaining fitting patches are distributed on both sides of the fitting patch currently traversed, the computer device may classify the fitting patch currently traversed as an internal patch.
In one embodiment, the step of classifying the currently traversed fitted patch into one of the outer patch and the plurality of inner patches according to a relative positional relationship of boundary points corresponding to the remaining fitted patches and the currently traversed fitted patch may include: determining a boundary point set from boundary points corresponding to the residual fitting patches respectively; the distance between the boundary point in the boundary point set and the fitting surface patch traversed at present is not smaller than a preset threshold value; when the boundary point sets are all distributed on the same side of the currently traversed fitting surface patch, classifying the currently traversed fitting surface patch into an external surface patch; and classifying the currently traversed fitting surface patch into an internal surface patch when the boundary point sets are distributed on two sides of the currently traversed fitting surface patch.
Wherein the preset threshold is a preset threshold. The preset threshold is, for example, 1mm, 2mm.
In this embodiment, the boundary point set is determined from the boundary points corresponding to the remaining fitting patches, and the distance between the boundary point in the boundary point set and the fitting patch currently traversed is not smaller than the preset threshold, and the boundary point with the smaller distance from the fitting patch currently traversed is regarded as an abnormal point, so that the robustness can be improved, and the fitting patches can be classified more accurately.
In one embodiment, the computer device may determine, from the boundary points corresponding to the remaining fit patches, an abnormal boundary point having a distance from the currently traversed fit patch that is smaller than a preset threshold, reject the abnormal boundary point from the boundary points corresponding to the remaining fit patches, and form a boundary point set from the boundary points remaining after the rejection.
In one embodiment, the step of obtaining a plurality of convex polyhedrons based on the multi-stage spatial division of the wraparound polyhedron in step 108 may include: when the space division of the first level is carried out on the wrapping polyhedron, taking the inner face piece with the least intersection with other inner face pieces in the plurality of inner face pieces as the space division face piece of the first level and extending the space division face piece so as to carry out the space division on the wrapping polyhedron and obtain subspaces obtained by the space division of the first level; when the space of each stage is divided after the space of the first stage, taking the inner panel which does not participate in the space division and has the least intersection with other inner panels which do not participate in the space division in the plurality of inner panels as the space division panel of the current stage, and extending the inner panel to space divide the subspace obtained by the space division of the previous stage and obtain the subspace obtained by the space division of the current stage; after the space division of the last stage, a plurality of convex polyhedrons are obtained.
Wherein stretching is to expand the dough sheet so that the stretched dough sheet can intersect with other dough sheets to divide the space of the current stage into closed subspaces. The space division patch is a patch for space division. When the inner panel is not present in the subspace, the corresponding solid of the subspace may be a convex polyhedron.
In this embodiment, during each stage of space division, an inner panel which does not participate in space division and has the smallest intersection with other inner panels which do not participate in space division is extended to perform space division, and subspaces are divided step by step in the wrapping polyhedron, so that the finally obtained convex polyhedrons can more accurately express the point cloud structure of the object, and the accuracy of three-dimensional reconstruction can be improved.
In one embodiment, after the spatial division of the current stage, if there is no internal patch that has not participated in the spatial division, the spatial division of the current stage is determined as the spatial division of the last stage, and a plurality of convex polyhedrons are obtained.
In one embodiment, each of the plurality of convex polyhedrons is labeled as one of an inner polyhedron and an outer polyhedron, such that the function value of the energy function is minimized; the energy function comprises a data energy term, a smooth energy term and a balance coefficient; the function value of the energy function is positively correlated with the value of the data energy term and positively correlated with the product of the smoothed energy term and the balance coefficient; the value of the data energy term is determined according to the number of windings of the convex polyhedron; the value of the smoothed energy term is inversely related to the ratio of the area of the concave packet to the area of the common fitting patch, the common fitting patch being a common fitting patch between the internal polyhedron and the external polyhedron, the concave packet corresponding to the point cloud to which the common fitting patch corresponds.
Wherein the number of windings characterizes the probability of a convex polyhedron being inside the object. The common fit patch may be a fit patch that coincides between adjacent polyhedrons. The concave bag can be called Alpha Shape, namely, a closed area formed by connecting projection points at the boundary, which are extracted by adopting an Alpha Shape algorithm, of projection points in the public fitting surface patch after the projection points are obtained by projecting the point cloud corresponding to the public fitting surface patch. The energy function is used to measure the quality of the results obtained for the plurality of convex polyhedron markers. The energy function may be as shown in equation (1).
Formula (1)
Wherein, the liquid crystal display device comprises a liquid crystal display device,the energy term of the data is characterized,the smooth energy term is characterized by the fact that,the balance coefficient is characterized by the fact that,for balancing the data energy term and smoothing the energy term. The balance coefficient may be in the range of 0 to 1, specifically 1 or 0.5.
In this embodiment, the function value of the energy function is positively correlated with the product of the data energy term value, the smooth energy term and the balance coefficient, and the data energy term value is determined according to the number of windings of the convex polyhedrons, so that the marks of the convex polyhedrons are more accurate finally, and the value of the smooth energy term is negatively correlated with the ratio of the area of the concave bag and the area of the common fitting surface patch, so that the finally obtained internal polyhedron can better express the point cloud structure of the object, and the accuracy of three-dimensional reconstruction is improved.
In one embodiment, the three-dimensional structured reconstruction method based on the winding number further includes the following steps: determining at least one external patch constituting a convex polyhedron; for each of the at least one outer panel, determining a predefined vector for the outer panel; the modulus of the predefined vector is the length of a line segment between the centroid of the convex polyhedron and the center of the external patch to which the model is directed, and the direction of the predefined vector is the direction from the centroid to the center; determining a wrap reference value for the outer patch based on the predefined vector for the outer patch, the normal vector for the outer patch, and the area of the outer patch; the number of windings of the convex polyhedron is determined based on the respective winding reference value of the at least one external face sheet.
Wherein the centroid of the convex polyhedron is the center of mass of the convex polyhedron. The center of mass is an imaginary point on the mass system where the mass is considered to be concentrated. The center of the outer panel refers to the point in the outer panel that is at the center position. The predefined vector is a predefined vector. The winding reference value is a reference value for determining the number of windings of the convex polyhedron.
In this embodiment, according to the predefined vector of the external patch, the normal vector of the external patch and the area of the external patch, the winding reference value of the external patch can be determined, so as to determine the winding number of the convex polyhedron, further determine the energy function, and more accurately mark the plurality of convex polyhedrons, thereby improving the accuracy of three-dimensional reconstruction.
In one embodiment, step 110 may include the steps of: the computer device may iteratively label the plurality of convex polyhedrons, in each iteration, determining a minimum segmentation method for the plurality of convex polyhedrons in the iteration by a maximum flow-minimum segmentation algorithm, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron based on the minimum segmentation method, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped. When the minimum segmentation mode of the convex polyhedrons in the iteration is determined through the maximum flow-minimum segmentation algorithm, the function value of the energy function is minimum.
In one embodiment, the computer device may construct, in each iteration, a directed graph corresponding to a maximum flow-minimum cut algorithm based on the boundary node, the integral node, the source point S (which may represent the class of the internal polyhedron), and the sink point T (which may represent the class of the external polyhedron) corresponding to the boundary of each of the plurality of convex polyhedrons, with each of the plurality of convex polyhedrons that are at the boundary as a boundary node, and the entirety of the convex polyhedrons that are not at the boundary of the plurality of convex polyhedrons as an integral node; wherein the convex polyhedron at the boundary is the convex polyhedron to be marked.
Setting the number of windings of the integral nodeFor the preset number of windings, the preset number of windings may be specifically 1, determined according to formula (2)Determining the number of windings per boundary nodeWill beAs the weight of the edge of the source point S pointing to the corresponding node,as the weight of the edge of the corresponding node pointing to the sink T, willWeights for edges between two adjacent nodes with a common fit patch are determined.
And determining a minimum segmentation mode of edges in the constructed directed graph through a maximum flow-minimum segmentation algorithm, cutting the directed graph according to the minimum segmentation mode, marking a convex polyhedron which is positioned at a boundary and corresponds to a boundary node connected with a source point S in the cut directed graph as an inner polyhedron, and marking a convex polyhedron which is positioned at a boundary and corresponds to a boundary node connected with a sink point T in the cut directed graph as an outer polyhedron.
And removing the external polyhedron, updating a plurality of convex polyhedrons, determining the convex polyhedron which is exposed to be at the boundary from the whole convex polyhedrons corresponding to the whole nodes, updating the convex polyhedron at the boundary in the plurality of convex polyhedrons, taking the updated plurality of convex polyhedrons as a plurality of convex polyhedrons in the next iteration, taking the convex polyhedron at the boundary in the updated plurality of convex polyhedrons as the convex polyhedron to be marked, and stopping iteration until the convex polyhedron at the boundary does not exist and the normal vectors of fitting patches in the updated plurality of convex polyhedrons are consistent.
Wherein, the liquid crystal display device comprises a liquid crystal display device,characterization 1 minusThe area of the concave packet of the point cloud corresponding to the public fit patch may be characterized,the area of the common fit patch can be characterized,the ratio of the area of the concavity to the area of the common fit patch can be characterized. When two convex polyhedrons are adjacent, edges are constructed for the nodes corresponding to the adjacent two convex polyhedrons when the directed graph is constructed. Two adjacent convex polyhedrons can be called a pair of adjacent convex polyhedrons, and the common fitting surface pieces of different pairs of adjacent convex polyhedrons are different, so that the weights of the corresponding edges of different pairs of adjacent convex polyhedrons are different when constructing a directed graph. A node may be a collective term for an overall node and a border node. In each iteration, after the convex polyhedron to be marked is marked by the maximum flow-minimum cut algorithm, the method is shown in the formula (1)The value of (2) can be determined by the formula (3), in the formula (1)The value of (2) can be determined by equation (4). Equation (2), equation (3) and equation (4) are described below.
Formula (2)
Wherein, the liquid crystal display device comprises a liquid crystal display device,the number of windings of the polyhedron at the boundary can be characterized;the number of outer patches in the bounding polyhedron, i.e., the number of patches for which the normal vector has been determined, can be characterized;can be characterized by The first of the outer facetsAn outer dough sheet;the centroid of the polyhedron at the boundary can be characterized,can characterize the firstThe center of the outer one of the panels,can characterize the firstThe predefined vectors corresponding to the individual external patches,can characterize the firstUnit vectors of predefined vectors corresponding to the external patches;can characterize the firstNormal vectors of the external patches;characterizable vectorUnit vector and normal vector of (a)Is multiplied by the dot product of (a);can be characterized by a vectorIs the surface area of a sphere of radius;can characterize the firstThe area of the outer patches;can characterize pairsThe external patches respectively correspond toAnd (5) summing.
The values of (2) satisfy the following: />
Wherein, when calculatingGreater than or equal to 0 and less than or equal to 1,the value of (2) is the calculated value; when calculatingGreater than 1, willThe value is 1; when calculatingLess than 0, willThe value is 0.
Formula (3)
Wherein, defineA set formed for the convex polyhedron corresponding to the node; definition of the definitionCharacterization of the firstBinary labels of convex polyhedrons corresponding to the individual nodes; in each iteration, before cutting the structured directed graph, the firstThe nodes are respectively connected with the source point S and the sink point T to form different edges, the first node isEdge configuration labels of each node connected with source point S are as followsAnd will be at Edge configuration labels of each node connected with sink T are as followsAfter cutting the structured directed graph, the firstOne of the edges of each node connected with the source point S and the sink point T is reserved, and the other edge is cut; wherein, when the label of the reserved edge isThen (1)Pairs of individual nodesThe corresponding convex polyhedron is marked as an internal polyhedron in the iteration, and when the labels of the reserved edges areThen (1)The convex polyhedron corresponding to each node is marked as an external polyhedron in this iteration.
Can be characterized in each iteration, the thA weight corresponding to one edge of each node which is connected with the end point (one of the source point S or the sink point T) and is cut; in particular, when the label of the cut edge isNamely the firstThe edge of each node cut is connected with the source point STaking outWhen the label of the cut edge isNamely the firstThe edge of each node cut is connected with the sink TTaking out
For a pair ofThe values of (2) are described as follows: when the first isThe individual nodes are the overall nodes and,the number of windings may be preset; when the first isThe individual nodes are the boundary nodes and,can characterize the firstThe number of windings of the convex polyhedron corresponding to each node can be calculated by the formula (2).
The value of the data energy term corresponding to the marking result obtained in each iteration, i.e. the sum of the weights corresponding to the edges connected to the end points and cut in each iteration, may be characterized.
Formula (4)
Wherein, the liquid crystal display device comprises a liquid crystal display device,the value of the balance energy term corresponding to the marking result obtained in each iteration can be characterized;can characterize convex polyhedronAnd convex polyhedronWhen adjacent, the convex polyhedronAnd convex polyhedronThe concave area of the point cloud corresponding to the inter-common fitting patch;the area of the public fitting patch can be characterized;the marking result obtained by each iteration can be characterized in that when at least one internal polyhedron is adjacent to an external polyhedron, the adjacent at least one internal polyhedron corresponds to at least one external polyhedronAnd, in addition,may also include corresponding ones of the external polyhedrons adjacent to each otherA kind of electronic device. Equation (4) allows the final three-dimensional reconstruction surface to be generated as much as possibleLarger dough sheet constructions.
In one embodiment, in a specific application scenario, the above three-dimensional structured reconstruction method based on the winding number may be implemented according to a three-dimensional structured reconstruction step flow diagram based on the winding number as shown in fig. 2, and in fig. 2, each diagram represents an original point cloud diagram, a plane detection diagram, a multi-level space division diagram, a diagram for marking a plurality of convex polyhedrons, and a three-dimensional reconstructed surface diagram of an object, respectively, according to a left-to-right order; based on fig. 2, the three-dimensional structured reconstruction method based on the winding number specifically includes the following steps.
The computer equipment can acquire the original point cloud of the object, simplify the original point cloud through poisson sampling, and acquire the simplified point cloud.
The computer equipment can adopt a least square method or RANSAC to realize plane detection on the simplified point cloud, and a fitting plane set comprising a plurality of initial fitting planes is obtained; iteratively processing the fitting plane set to obtain a plurality of fitting planes, determining energy change caused by processing the fitting plane set processed before by a preset merging algorithm, a preset dividing algorithm, a preset inserting point algorithm, a preset deleting point algorithm or a preset transforming point algorithm respectively in each iteration, processing each fitting plane in the fitting plane set processed before by adopting an algorithm causing the maximum energy change to obtain a fitting plane set processed currently until energy is not reduced any more, ending the iteration, taking each fitting plane in the fitting plane set processed when the iteration is ended as a final plurality of fitting planes, and obtaining a plurality of fitting patches obtained by carrying out plane detection based on an original point cloud of an object according to the final plurality of fitting planes.
Wherein the energy variation is determined based on a predefined multi-objective energy function as shown in equation (5). For example, when it is determined that the fitting plane set is to be processed by adopting a preset merging algorithm, the function value corresponding to the current fitting plane set is determined by using a multi-objective energy function, the fitting plane set is processed by adopting the preset merging algorithm, the function value corresponding to the fitting plane set after the processing is determined by using the multi-objective energy function again, and the energy change is determined by comparing the function values before and after the processing.
Formula (5)
Wherein, the liquid crystal display device comprises a liquid crystal display device,each weight in the function can be characterized, and the sum is 1;one fit configuration in each iteration may be represented,the set of fitting planes can be characterized,the label of points in the input point cloud may be characterized as being an interior point belonging to one of the set of fitting planes or an outlier not belonging to any of the fitting planes.
Can be characterized byThe number of middle and inner points;one plane in the set of fitting planes may be characterized;can be characterized byIs the inner point of (a);can be characterized byTo a corresponding fitting planeIs fit to the Euclidean distance of the modelNormalized results.Can be characterized byThe number of the middle fitting planes is equal to the number of the middle fitting planes,the maximum number of fittable planes can be characterized.The total number of points in the input point cloud may be characterized.
The processing of the preset merging algorithm is to merge two adjacent fitting planes into a new plane, and keep the new plane and delete the two adjacent fitting planes under the condition that the distance from the points on the two adjacent fitting planes to the new plane is smaller than the preset fitting tolerance. The processing of the preset segmentation algorithm is to determine two points which are farthest from a fitting plane, and cluster other points on the fitting plane according to the two points which are farthest from the fitting plane so as to divide the fitting plane into two fitting planes. The processing of the preset inserting point algorithm is to sort the distances from the outliers which do not belong to any fitting plane in the point cloud to be fitted to the nearest fitting plane according to ascending order, and insert the preset number of outliers which are arranged at the forefront into the fitting planes which are respectively nearest to the fitting planes. The processing of the preset deleting point algorithm is to sort the distances from the points in the point clouds corresponding to the fitting planes to the corresponding fitting planes according to descending order, and delete the forefront preset number of points from the corresponding fitting planes. The processing of the preset transformation point algorithm is to use a K-means clustering algorithm to cluster points in point clouds corresponding to each of two adjacent fitting planes to obtain two new fitting planes, and redistribute the corresponding points according to the two new fitting planes. The preset fit tolerance may be 0.05.
The computer device may determine boundary points corresponding to each of the plurality of fitted patches, traverse each of the plurality of fitted patches, determine remaining fitted patches of the plurality of fitted patches other than the currently traversed fitted patch, and fit the remaining fitted patches to the corresponding boundary pointsRemoving boundary points corresponding to the remaining fitting patches from boundary points corresponding to the remaining fitting patches to obtain a boundary point set; when the boundary point sets are all distributed on the same side of the currently traversed fitting surface patch, classifying the currently traversed fitting surface patch into an external surface patch; and classifying the currently traversed fitting surface patch into an internal surface patch when the boundary point sets are distributed on two sides of the currently traversed fitting surface patch. Wherein, the boundary point determined by Alpha Shape algorithm corresponding to each fitting patch in the remaining fitting patches can be defined as +.>Here->The number of boundary points of the corresponding fit patch in the remaining fit patches may be characterized; />Can characterize the +.f. of the corresponding fit patch in the remaining fit patches>Boundary points->Fitting patch to current traversal +.>Distance of->The preset threshold may be characterized.
As shown in the flow diagram of the wraparound polyhedron construction of fig. 3, the computer device may extend the plurality of outer panels, respectively, until a closed polyhedron is formed, and use the closed polyhedron as a wraparound polyhedron based on the plurality of outer panel constructions.
As shown in the multi-level space division schematic diagram of fig. 4, the computer device may perform multi-level space division based on the wraparound polyhedron to obtain a plurality of convex polyhedrons; when the space division of the wrapping polyhedron is carried out at the first stage, taking the inner face piece with the least intersection with other inner face pieces in the plurality of inner face pieces as the space division face piece of the first stage, and extending the space division face piece to carry out the space division on the wrapping polyhedron so as to obtain subspaces obtained by the space division of the first stage; when the space of each stage is divided after the space of the first stage, taking the inner panel which does not participate in the space division and has the least intersection with other inner panels which do not participate in the space division in the plurality of inner panels as the space division panel of the current stage, and extending the inner panel to space divide the subspace obtained by the space division of the previous stage and obtain the subspace obtained by the space division of the current stage; after the space division of the last stage, a plurality of convex polyhedrons are obtained. Wherein a plurality of inner panels may be defined asCan define +.>Characterization of the inner Panel->The number of intersections with other internal patches not yet involved in the spatial division, here +.>The number of inner panels can be characterized, +. >Can characterize->The inner dough sheet. When each level of space is divided, the +.>When there are a plurality of the smallest internal patches, the method comprises +.>And taking the one with the largest convex hull area of the corresponding point cloud in the smallest internal patch as the space division patch of the current stage.
The computer device may iteratively label the plurality of convex polyhedrons, in each iteration, determining a minimum segmentation method for the convex polyhedron at the boundary in the plurality of convex polyhedrons in the iteration through a maximum flow-minimum cutting algorithm, marking each of the convex polyhedrons at the boundary in the plurality of convex polyhedrons as one of an inner polyhedron and an outer polyhedron based on the minimum segmentation method, and rejecting the outer polyhedron in the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped. A three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration. When the minimum segmentation mode of the convex polyhedron at the boundary in the plurality of convex polyhedrons in the iteration is determined through the maximum flow-minimum segmentation algorithm, the function value of the energy function is minimum. By iteratively deleting the external polyhedron, the global normal vector of each patch of the finally obtained three-dimensional reconstruction surface is consistent, i.e. the normal vector direction of each patch of the three-dimensional reconstruction surface can point to the outside.
When the iteration cannot be stopped, defining energyDefining the convex polyhedron at the boundary in the iteration as a set B, traversing the convex polyhedrons in the set B, and calculating the energy change caused by deleting the traversed convex polyhedrons from the set BWill cause energy changeAnd the largest convex polyhedron is removed from the plurality of convex polyhedrons updated in the iteration, and the normal vector of the rest convex polyhedrons is updated after the removal, so that the iteration is continued. Wherein the energy variesIs to delete the energy difference before and after the traversing convex polyhedron, and the energyCan be calculated by the formula (6).
Formula (6)
Wherein, the liquid crystal display device comprises a liquid crystal display device,the coefficients of the energy terms in the formula (6) are respectively, and the value ranges are 0 to 1;andthe point coverage item and the model complex item in Polyfit (reconstruction method described in document Polygonal surface reconstruction from point clouds, in Proceedings of the IEEE International Conference on Computer vision.2353-2361), respectively.
The reconstruction effect of the three-dimensional structured reconstruction method based on the winding number is compared with the reconstruction effect of other three-dimensional reconstruction methods, and the reconstruction effect is presented in a mode of experimental results.
Fig. 5 is a schematic diagram of matching degree colors corresponding to different three-dimensional reconstruction methods, each of the schematic diagrams of matching degree colors is used for measuring matching degree between a three-dimensional reconstruction surface and a point cloud of the corresponding three-dimensional reconstruction method, fig. 5 (a) is a schematic diagram of matching degree colors corresponding to polymit (reconstruction method described in documents Polygonal surface reconstruction from point clouds, in Proceedings of the IEEE International Conference on Computer vision, 2353-2361), fig. 5 (b) is a schematic diagram of matching degree colors corresponding to KSR (documents Kinetic shape reconstruction, ACM Transactions On Graphics (TOG) 39,5 (2020), reconstruction method described in 1-14), and fig. 5 (c) is a schematic diagram of matching degree colors corresponding to a three-dimensional structured reconstruction method based on a winding number in the present application; the deeper the color is, the smaller the error is, and the better the characterization matching degree is, so that the three-dimensional structured reconstruction method based on the winding number is better than Polyfit and KSR.
FIG. 6 is a schematic view of a three-dimensional reconstruction result obtained by different three-dimensional reconstruction methods, namely, a three-dimensional reconstruction surface, wherein the three-dimensional reconstruction surface in FIG. 6 is specifically a building model, and the upper row in FIG. 6 is a grid-type building model, and the lower row in FIG. 6 is a rendered building model; FIG. 6 (a) is a schematic representation of the visualization of a three-dimensional reconstruction surface obtained by characterizing IPSR (reconstruction method described in document Iterative poisson surface reconstruction (iPSR) for unoriented points arXiv preprint arXiv:2209.09510 (2022)), wherein the number of vertices of the three-dimensional reconstruction surface is 199.1k and the number of faces is 398.1k; FIG. 6 (b) is a schematic diagram showing a simplified visualization of the three-dimensional reconstruction surface obtained by IPSR, wherein the number of vertices of the three-dimensional reconstruction surface is 13.9k and the number of faces is 28.3k; fig. 6 (c) is a schematic diagram showing a visualization result of a three-dimensional reconstruction surface obtained by the three-dimensional structured reconstruction method based on the number of windings in the present application, wherein the number of vertices 83 and the number of faces of the three-dimensional reconstruction surface are 162. The three-dimensional reconstruction surface obtained by IPSR contains more points and surfaces, some incomplete areas are not repaired, and sharp features are smoothed, which means that vertex normal vectors have larger influence on the obtained reconstruction result; in contrast, the three-dimensional structured reconstruction method based on the winding number reduces the number of vertexes and faces, namely improves the data compressibility and simultaneously maintains sharp characteristics.
FIG. 7 is a schematic diagram of reconstruction results obtained by reconstructing point clouds of different objects by different three-dimensional reconstruction methods, wherein the reconstruction results corresponding to Low-poly (the method described In the literature Low-poly mesh generation for building models, in ACM SIGGRAPH 2022 Conference Proceedings, 1-9) are obtained by obtaining an initial grid (the method described In the literature Structure-based mesh reconstruction from a 3D point group IEEE Transactions on Multimedia (2021), 1815-1829), and then performing grid simplification by using Low-poly; windPoly represents a three-dimensional structured reconstruction method based on winding number in the application; as can be seen from fig. 7, the three-dimensional structured reconstruction method based on the winding number in the application obtains a more concise reconstruction result, and the grid structure in the reconstruction result is clearer.
Table 1 below shows the quantitative test results of three-dimensional surfaces obtained by reconstructing CAD models by different three-dimensional reconstruction methods; table 2 below shows the quantitative test results of the three-dimensional surface obtained by reconstructing the building model by different three-dimensional reconstruction methods; wherein, the liquid crystal display device comprises a liquid crystal display device,the method can be used for evaluating the grid quality of the three-dimensional reconstruction surface by representing the average error of the winding number of outliers around the three-dimensional reconstruction surface; The hausdorff distance from the point to the patch can be characterized,the average distance from the point to the surface patch can be represented and can be used for evaluating geometric consistency, namely the matching degree of the point and the surface patch;the average number of vertices may be characterized as,the average number of patches can be characterized, and the average number of vertices and the average number of patches can be characterized for data compression rate;characterizable from original point cloud to three-dimensional reconstruction tableA reduction rate of the facets;
table 1 quantitative test results of CAD model reconstruction results obtained by different three-dimensional reconstruction methods
Table 2 quantitative test results of construction model reconstruction results obtained by different three-dimensional reconstruction methods
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a three-dimensional structured reconstruction device based on the winding number, which is used for realizing the three-dimensional structured reconstruction method based on the winding number. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiment of the three-dimensional structured reconstruction device based on the winding number provided below may be referred to the limitation of the three-dimensional structured reconstruction method based on the winding number hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 8, there is provided a three-dimensional structured reconstruction apparatus 800 based on a winding number, comprising: a plane detection module 810, a patch division module 820, a polyhedron construction module 830, a polyhedron marking module 840, and a three-dimensional reconstruction module 850, wherein:
the plane detection module 810 is configured to perform plane detection based on an original point cloud of the object, so as to obtain a plurality of fitting patches;
a patch dividing module 820, configured to divide the plurality of fitting patches into a plurality of external patches and a plurality of internal patches according to boundary points corresponding to the plurality of fitting patches respectively;
a polyhedron construction module 830 for constructing a wraparound polyhedron based on the plurality of outer panels; a plurality of inner panels within the space surrounding the polyhedron; carrying out multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and one internal panel is the internal panel with the least intersection with other internal panels which do not participate in space division in the plurality of internal panels;
A polyhedron marking module 840 for iteratively marking a plurality of convex polyhedrons, each of the plurality of convex polyhedrons being marked as one of an inner polyhedron and an outer polyhedron in each iteration, the outer polyhedron of the plurality of convex polyhedrons being culled to update the plurality of convex polyhedrons until the iteration is stopped;
a three-dimensional reconstruction module 850 for determining a three-dimensional reconstruction surface of the object from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
In one embodiment, the patch dividing module 820 is further configured to determine boundary points corresponding to each of the plurality of fitting patches; traversing each fitting patch of the plurality of fitting patches; determining the rest fitting patches except the fitting patches currently traversed in the plurality of fitting patches; and classifying the fitting surface patch which is currently traversed into one of an external surface patch and an internal surface patch according to the relative position relation between the boundary points corresponding to the rest fitting surface patches and the fitting surface patch which is currently traversed.
In one embodiment, the patch dividing module 820 is further configured to determine a set of boundary points from the boundary points corresponding to the remaining fitting patches respectively; the distance between the boundary point in the boundary point set and the fitting surface patch traversed at present is not smaller than a preset threshold value; when the boundary point sets are all distributed on the same side of the currently traversed fitting surface patch, classifying the currently traversed fitting surface patch into an external surface patch; and classifying the currently traversed fitting surface patch into an internal surface patch when the boundary point sets are distributed on two sides of the currently traversed fitting surface patch.
In one embodiment, the polyhedral construction module 830 is further configured to, when performing the first-stage spatial division on the wrapping polyhedron, use an inner panel with the smallest intersection with other inner panels of the plurality of inner panels as a first-stage spatial division panel and extend the first-stage spatial division panel, so as to perform the first-stage spatial division on the wrapping polyhedron, and obtain a subspace obtained by the first-stage spatial division; when the space of each stage is divided after the space of the first stage, taking the inner panel which does not participate in the space division and has the least intersection with other inner panels which do not participate in the space division in the plurality of inner panels as the space division panel of the current stage, and extending the inner panel to space divide the subspace obtained by the space division of the previous stage and obtain the subspace obtained by the space division of the current stage; after the space division of the last stage, a plurality of convex polyhedrons are obtained.
In one embodiment, each of the plurality of convex polyhedrons is labeled as one of an inner polyhedron and an outer polyhedron, such that the function value of the energy function is minimized; the energy function comprises a data energy term, a smooth energy term and a balance coefficient; the function value of the energy function is positively correlated with the value of the data energy term and positively correlated with the product of the smoothed energy term and the balance coefficient; the value of the data energy term is determined according to the number of windings of the convex polyhedron; the value of the smoothed energy term is inversely related to the ratio of the area of the concave packet to the area of the common fitting patch, the common fitting patch being a common fitting patch between the internal polyhedron and the external polyhedron, the concave packet corresponding to the point cloud to which the common fitting patch corresponds.
In one embodiment, the polyhedral marking module 840 is further configured to determine at least one external patch that forms a convex polyhedron; for each of the at least one outer panel, determining a predefined vector for the outer panel; the modulus of the predefined vector is the length of a line segment between the centroid of the convex polyhedron and the center of the external patch to which the model is directed, and the direction of the predefined vector is the direction from the centroid to the center; determining a wrap reference value for the outer patch based on the predefined vector for the outer patch, the normal vector for the outer patch, and the area of the outer patch; the number of windings of the convex polyhedron is determined based on the respective winding reference value of the at least one external face sheet.
The above-described modules in the three-dimensional structured reconstruction apparatus based on the winding number may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 9. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a three-dimensional structured reconstruction method based on a number of windings. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 9 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A three-dimensional structured reconstruction method based on a winding number, the method comprising:
performing plane detection based on an original point cloud of the object to obtain a plurality of fitting patches;
dividing the fitting patches into a plurality of outer patches and a plurality of inner patches according to the boundary points corresponding to the fitting patches respectively;
constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron;
Performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
iteratively labeling the plurality of convex polyhedrons, in each iteration, labeling each of the plurality of convex polyhedrons as one of an internal polyhedron and an external polyhedron, and rejecting the external polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
a three-dimensional reconstruction surface of the object is determined from the outer surfaces of the plurality of convex polyhedrons at the time of stopping the iteration.
2. The method of claim 1, wherein the dividing the plurality of fitted tiles into a plurality of outer tiles and a plurality of inner tiles according to the respective boundary points of the plurality of fitted tiles comprises:
determining boundary points corresponding to the fitting patches respectively;
traversing each fitting patch of the plurality of fitting patches;
Determining the rest fitting patches of the fitting patches except the fitting patches currently traversed;
and classifying the currently traversed fitting surface patch into one of an external surface patch and an internal surface patch according to the relative position relation between the boundary points corresponding to the residual fitting surface patches and the currently traversed fitting surface patch.
3. The method according to claim 2, wherein classifying the currently traversed fitted patch into one of an outer patch and an inner patch according to the relative positional relationship of the boundary points corresponding to the remaining fitted patches and the currently traversed fitted patch, comprises:
determining a boundary point set from boundary points corresponding to the residual fitting patches respectively; the distance between the boundary point in the boundary point set and the fitting surface patch traversed at present is not smaller than a preset threshold value;
classifying the currently traversed fitting surface patch into an external surface patch when the boundary point sets are distributed on the same side of the currently traversed fitting surface patch;
and classifying the currently traversed fitting surface patch into an internal surface patch when the boundary point sets are distributed on two sides of the currently traversed fitting surface patch.
4. The method of claim 1, wherein the multi-stage spatial division based on the wraparound polyhedrons results in a plurality of convex polyhedrons, comprising:
When the wrapping polyhedron is subjected to first-stage space division, taking an inner panel with the least intersection with other inner panels of the plurality of inner panels as a first-stage space division panel and extending the inner panel so as to carry out space division on the wrapping polyhedron and obtain subspaces obtained by the first-stage space division;
when the space of each stage is divided after the space of the first stage, the inner surface piece which does not participate in the space division and has the minimum intersection with other inner surface pieces which do not participate in the space division in the plurality of inner surface pieces is used as the space division surface piece of the current stage and is extended so as to space-divide the subspace obtained by the space division of the previous stage and obtain the subspace obtained by the space division of the current stage;
after the space division of the last stage, a plurality of convex polyhedrons are obtained.
5. The method of claim 1, wherein each of the plurality of convex polyhedrons is labeled as one of an inner polyhedron and an outer polyhedron, such that a function value of an energy function is minimized;
wherein the energy function comprises a data energy term, a smooth energy term and a balance coefficient; the function value of the energy function is positively correlated with the value of the data energy term and positively correlated with the product of the smoothed energy term and the balance coefficient; the value of the data energy term is determined according to the number of windings of the convex polyhedron; the value of the smoothed energy term is inversely related to the ratio of the area of the concave packet to the area of the common fitting surface patch, wherein the common fitting surface patch is a common fitting surface patch between the internal polyhedron and the external polyhedron, and the concave packet corresponds to the point cloud corresponding to the common fitting surface patch.
6. The method of claim 5, wherein the method further comprises:
determining at least one external patch constituting the convex polyhedron;
for each of the at least one outer panel, determining a predefined vector for the outer panel; the modulus of the predefined vector is the length of a line segment between the centroid of the convex polyhedron and the center of the directed outer patch, the direction of the predefined vector being the direction from the centroid toward the center;
determining a wrap reference value for the outer patch based on the predefined vector for the outer patch, the normal vector for the outer patch, and the area of the outer patch;
determining the number of windings of the convex polyhedron based on the respective winding reference value of the at least one external face sheet.
7. A three-dimensional structured reconstruction device based on a number of windings, the device comprising:
the plane detection module is used for carrying out plane detection based on the original point cloud of the object to obtain a plurality of fitting patches;
the panel dividing module is used for dividing the fitting panels into a plurality of outer panels and a plurality of inner panels according to the boundary points corresponding to the fitting panels;
A polyhedron construction module for constructing a wraparound polyhedron based on the plurality of outer panels; the plurality of inner panels being within the volume of the wraparound polyhedron; performing multistage space division based on the wrapping polyhedron to obtain a plurality of convex polyhedrons; the space division of each level is divided by taking one of the plurality of inner panels which does not participate in the space division as a boundary; and the one internal panel is an internal panel having the least intersection with other internal panels not participating in space division among the plurality of internal panels;
a polyhedron marking module for iteratively marking the plurality of convex polyhedrons, in each iteration, marking each of the plurality of convex polyhedrons as one of an inner polyhedron and an outer polyhedron, and rejecting the outer polyhedron of the plurality of convex polyhedrons to update the plurality of convex polyhedrons until the iteration is stopped;
and the three-dimensional reconstruction module is used for determining the three-dimensional reconstruction surface of the object according to the outer surfaces of the convex polyhedrons when iteration is stopped.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311239691.6A 2023-09-25 2023-09-25 Three-dimensional structured reconstruction method, device and computer medium based on winding number Active CN116977592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311239691.6A CN116977592B (en) 2023-09-25 2023-09-25 Three-dimensional structured reconstruction method, device and computer medium based on winding number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311239691.6A CN116977592B (en) 2023-09-25 2023-09-25 Three-dimensional structured reconstruction method, device and computer medium based on winding number

Publications (2)

Publication Number Publication Date
CN116977592A true CN116977592A (en) 2023-10-31
CN116977592B CN116977592B (en) 2024-02-09

Family

ID=88481844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311239691.6A Active CN116977592B (en) 2023-09-25 2023-09-25 Three-dimensional structured reconstruction method, device and computer medium based on winding number

Country Status (1)

Country Link
CN (1) CN116977592B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706830A (en) * 2009-11-12 2010-05-12 中国人民解放军国防科学技术大学 Method for reconstructing model after drilling surface grid model of rigid object
JP2019174287A (en) * 2018-03-28 2019-10-10 太平洋セメント株式会社 Object recognition device, method, program, and object removal system
CN113781667A (en) * 2021-11-10 2021-12-10 深圳大学 Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium
CN115861571A (en) * 2023-01-18 2023-03-28 武汉大学 Semantic-aware triangulation network model building entity reconstruction method
CN116258840A (en) * 2023-05-16 2023-06-13 深圳大学 Hierarchical detail representation tree generation method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706830A (en) * 2009-11-12 2010-05-12 中国人民解放军国防科学技术大学 Method for reconstructing model after drilling surface grid model of rigid object
JP2019174287A (en) * 2018-03-28 2019-10-10 太平洋セメント株式会社 Object recognition device, method, program, and object removal system
CN113781667A (en) * 2021-11-10 2021-12-10 深圳大学 Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium
CN115861571A (en) * 2023-01-18 2023-03-28 武汉大学 Semantic-aware triangulation network model building entity reconstruction method
CN116258840A (en) * 2023-05-16 2023-06-13 深圳大学 Hierarchical detail representation tree generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘珊珊 等: "高效鲁棒三维结构化重建", 中国图象图形学报, vol. 27, no. 2, pages 421 - 434 *

Also Published As

Publication number Publication date
CN116977592B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
Smith et al. Geometrics: Exploiting geometric structure for graph-encoded objects
Yu et al. Pu-net: Point cloud upsampling network
Yan et al. Variational mesh segmentation via quadric surface fitting
US8665267B2 (en) System and method for generating 3D surface patches from unconstrained 3D curves
Di Angelo et al. A new mesh-growing algorithm for fast surface reconstruction
CN111382470A (en) Machine learning for 3D modeled object inference
CN113781667B (en) Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium
Liu et al. Meshing point clouds with predicted intrinsic-extrinsic ratio guidance
CN111382541A (en) Set of neural networks
Rasheed et al. A survey of computer methods in reconstruction of 3D archaeological pottery objects
US20220156430A1 (en) Topological message passing for three dimensional models in boundary representation format
Zhang et al. Resolving topology ambiguity for multiple-material domains
CN111783798B (en) Mask generation method for simulated residual point cloud based on significance characteristics
Remil et al. Surface reconstruction with data-driven exemplar priors
Wang et al. A new point cloud simplification method with feature and integrity preservation by partition strategy
Thayyil et al. Local Delaunay-based high fidelity surface reconstruction from 3D point sets
Kim et al. Exmeshcnn: An explainable convolutional neural network architecture for 3d shape analysis
Bergamasco et al. A graph-based technique for semi-supervised segmentation of 3D surfaces
CN116258840B (en) Hierarchical detail representation tree generation method, device, equipment and storage medium
CN116977592B (en) Three-dimensional structured reconstruction method, device and computer medium based on winding number
Dillard et al. Construction of simplified boundary surfaces from serial-sectioned metal micrographs
KR102129060B1 (en) Content-based 3d model retrieval method using a single depth image, 3d model retrieval server for performing the methods and computer readable recording medium thereof
CN114882496A (en) Three-dimensional component similarity calculation method based on depth image
Elshakhs et al. A Comprehensive Survey on Delaunay Triangulation: Applications, Algorithms, and Implementations Over CPUs, GPUs, and FPGAs
Wang et al. Cellular matrix model for parallel combinatorial optimization algorithms in Euclidean plane

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant