Model surface data sampling method, device, electronic device and storage medium

By sampling and interpolation of OSGB data after tilt photography, the problem of insufficient data sampling in the top-level reconstruction of the model is solved, and efficient sampling and smoothness improvement of the model surface is achieved.

CN119169239BActive Publication Date: 2025-03-21北京观微科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411662079.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-21
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

In the prior art, data on the model surface cannot be effectively sampled when reconstructing the top layer of the model, resulting in a hollow phenomenon after model reconstruction.

Method used

By obtaining the OSGB data after tilt photography, the total number of vertices and sampling rate of the model surface are determined, the candidate simulated vertices are calculated and the Poisson disk sampling is performed, and the target vertices are determined through interpolation processing.

Benefits of technology

Accurate sampling of model surface data is achieved, the amount of data reconstructed by model is reduced, the smoothness and smoothness of model surface is improved, and the phenomenon of holes is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169239B_ABST
    Figure CN119169239B_ABST
Patent Text Reader

Abstract

The present invention provides a model surface data sampling method, device, electronic device and storage medium, which are applied to the field of data processing technology. The method includes: obtaining OSGB data after oblique photography of a natural real scene area; determining the total number of vertices on the model surface according to the contour data of multiple triangular faces included in the OSGB data, and determining the number of vertex sampling according to the total number of vertices and a preset sampling rate; determining multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex sampling; determining the vertex sampling results of the model surface according to the position information of each candidate simulation vertex, and interpolating the vertex sampling results to determine multiple target vertices corresponding to the model surface and the position information of each target vertex. The technical solution of the present invention can achieve accurate sampling of model surface data and reduce the hole phenomenon in subsequent model reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a model surface data sampling method, device, electronic equipment and storage medium. Background Art

[0002] Oblique photography technology refers to the construction of a 3D model by carrying multiple sensors on the same flight platform and collecting images from five different angles, including one vertical angle, four oblique angles, etc. This method can greatly enrich the dimension and accuracy of data collection, but as the amount of data collected increases, the amount of data in the 3D model also expands dramatically, which will affect the storage, transmission and processing of the 3D model. Based on this, in order to better store, transmit and process the data of the 3D model, the data of the 3D model needs to be lightweight.

[0003] At present, as a technology for lightweight processing of 3D model data, model top layer reconstruction technology can reduce the amount of data processing, storage and transmission of 3D models by sampling the data on the model surface and then reconstructing the model top layer based on the sampled model surface data. Based on this, how to sample the data on the model surface has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a model surface data sampling method, device, electronic device and storage medium, which are used to solve the defect in the prior art that the model surface data cannot be sampled when the top layer of the model is reconstructed, and achieve the purpose of accurately sampling the model surface data and reducing the void phenomenon after the model is reconstructed.

[0005] The present invention provides a model surface data sampling method, comprising:

[0006] Obtain OSGB data obtained by oblique photography of a natural real scene area; the OSGB data is data of a model surface corresponding to the natural real scene area, including contour data of a plurality of triangular faces constituting the model surface;

[0007] Determine the total number of vertices on the model surface according to the contour data of each triangular face, and determine the number of vertex samples according to the total number of vertices and a preset sampling rate; the above sampling rate is less than 1;

[0008] Determine multiple candidate simulation vertices located in each triangular face and position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samplings; the number of each candidate simulation vertex is greater than the number of vertex samplings;

[0009] The vertex sampling result of the model surface is determined according to the position information of each candidate simulation vertex, and the vertex sampling result is interpolated to determine a plurality of target vertices corresponding to the model surface and the position information of each target vertex.

[0010] According to a model surface data sampling method provided by the present invention, the contour data of the triangular face includes the coordinates of three vertices corresponding to the triangular face, and the method of determining multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samplings includes:

[0011] Executing a barycenter calculation operation, the barycenter calculation operation comprising: calculating the barycenter coordinates of each triangular face according to the coordinates of the three vertices corresponding to each triangular face, and obtaining the barycenter of each triangular face; counting a first number corresponding to the barycenter of each triangular face, and determining whether the first number is greater than a preset simulation number; the simulation number is a value determined according to the vertex sampling number and a preset simulation rate;

[0012] If the first number is not greater than the simulation number, the centroid of each triangular face is used as a new vertex, the corresponding triangular face is divided into three sub-triangular faces, and each sub-triangular face is used as a new triangular face, and the centroid calculation operation is performed again until the preset iteration cutoff condition is met;

[0013] The centroids of each triangular face in the iteration round when the iteration cutoff condition is satisfied are used as a plurality of candidate simulation vertices, and the centroid coordinates corresponding to each centroid are used as position information of the corresponding candidate simulation vertex.

[0014] According to a model surface data sampling method provided by the present invention, the above iteration cutoff condition includes any one of the following:

[0015] The first quantity is greater than the simulation quantity;

[0016] The number of iterations reaches the preset iteration threshold.

[0017] According to a model surface data sampling method provided by the present invention, the vertex sampling result of the model surface is determined according to the position information of each candidate simulation vertex, including:

[0018] Calculate the area of ​​each triangular face according to the contour data of each triangular face, and calculate the total model area corresponding to the model surface according to the area of ​​each triangular face;

[0019] Calculate the sampling radius based on the total area of ​​the model and the number of vertex samples;

[0020] According to the position information and sampling radius of each candidate simulation vertex, a preset Poisson disk sampling algorithm is used to sample each candidate simulation vertex to determine the vertex sampling result of the model surface; the above vertex sampling result includes multiple evenly distributed pending vertices.

[0021] According to a model surface data sampling method provided by the present invention, the vertex sampling result includes a plurality of evenly distributed pending vertices and position information of each pending vertex, and the vertex sampling result is interpolated to determine a plurality of target vertices corresponding to the model surface and position information of each target vertex, including:

[0022] According to the position information of each pending vertex in the vertex sampling result, a preset nearest neighbor algorithm is used to search each pending vertex to determine the nearest neighbor point set corresponding to each pending vertex; the nearest neighbor point set includes the adjacent pending vertex that is closest to the pending vertex;

[0023] According to the nearest neighbor point set of each pending vertex, the neighbor point distance between each pending vertex and its corresponding adjacent pending vertex is determined;

[0024] If the distance between any neighboring points is greater than the preset distance threshold, the position information of the two pending vertices corresponding to the distance between any neighboring points is obtained, and the position information of the interpolation point is determined by performing mean processing based on the position information of the two pending vertices;

[0025] The interpolation points and each pending vertex in the vertex sampling result are determined as a plurality of target vertices corresponding to the model surface, and the position information of the interpolation points and the position information of each pending vertex are determined as the position information of the target vertex.

[0026] According to a model surface data sampling method provided by the present invention, the above distance threshold is determined in the following manner:

[0027] Sum the distances of each neighboring point to determine the distance sum value;

[0028] Counting the second number of adjacent pending vertices in each nearest neighbor point set;

[0029] The distance value is compared with the second quantity to determine the distance threshold.

[0030] According to a model surface data sampling method provided by the present invention, the contour data of the triangular face includes the identifiers of the three edges corresponding to the triangular face, and the method further includes: determining, based on the contour data of each triangular face and the number of vertex samplings, before determining a plurality of candidate simulation vertices located in each triangular face.

[0031] For each triangular face, according to the identifiers of the three sides of the triangular face, the number of triangular faces having the same identifier as the triangular face is calculated to obtain a third number; wherein the identifier of an edge shared by two adjacent triangular faces is the same;

[0032] According to the third number of each triangular face and a preset number threshold, the triangular faces whose third number is less than the number threshold are eliminated to obtain a plurality of valid triangular faces;

[0033] Accordingly, the above method of determining a plurality of candidate simulation vertices located in each triangular face according to the contour data of each triangular face and the number of vertex samplings includes:

[0034] According to the contour data of each valid triangular face and the number of vertex sampling, a plurality of candidate simulation vertices located in each valid triangular face are determined.

[0035] The present invention also provides a model surface data sampling device, comprising the following modules:

[0036] An acquisition module is used to acquire OSGB data obtained by oblique photography of a natural real scene area; the OSGB data is data of a model surface corresponding to the natural real scene area, including contour data of a plurality of triangular faces constituting the model surface;

[0037] A quantity determination module, used to determine the total number of vertices on the model surface according to the contour data of each triangular face, and to determine the number of vertex sampling according to the total number of vertices and a preset sampling rate; the above sampling rate is less than 1;

[0038] A candidate vertex determination module is used to determine multiple candidate simulation vertices located in each triangular face and position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex sampling; the number of each candidate simulation vertex is greater than the number of vertex sampling;

[0039] The target vertex determination module is used to determine the vertex sampling results of the model surface according to the position information of each candidate simulation vertex, and interpolate the vertex sampling results to determine multiple target vertices corresponding to the model surface and the position information of each target vertex.

[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the model surface data sampling method described in any one of the above methods is implemented.

[0041] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the model surface data sampling method as described in any one of the above is implemented.

[0042] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the model surface data sampling method as described in any one of the above is implemented.

[0043] The model surface data sampling method, device, electronic device and storage medium provided by the present invention obtain OSGB data obtained by oblique photography of a natural real scene area, determine the total number of vertices on the model surface according to the contour data of multiple triangular faces of the model surface constituting the natural real scene area included in the OSGB data, and determine the number of vertex samplings according to the total number of vertices and a preset sampling rate less than 1, then determine multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samplings, then determine the vertex sampling results of the model surface according to the position information of each candidate simulation vertex, and interpolate the vertex sampling results to determine multiple target vertices corresponding to the model surface and the position information of each target vertex, wherein the number of each candidate simulation vertex is greater than the number of vertex samplings. In this method, a large number of simulated vertices can be determined through the contour data of each triangular facet of the model surface combined with the number of vertex sampling, and the target vertices corresponding to the model surface can be determined through simulated vertex sampling and interpolation processing. In this way, the amount of data sampled on the model surface can be reduced while ensuring the quality of subsequent model reconstruction, and the data on the model surface can be sampled accurately. At the same time, the smoothness and smoothness of the model surface can be improved through interpolation, and the void phenomenon in subsequent model reconstruction can be significantly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 This is one of the flow charts of the model surface data sampling method provided by the present invention.

[0046] Figure 2 It is a schematic diagram of OSGB data of the model surface provided by the present invention.

[0047] Figure 3 This is the second flow chart of the model surface data sampling method provided by the present invention.

[0048] Figure 4 It is a schematic diagram of simulating vertices on a model surface provided by the present invention.

[0049] Figure 5This is the third flow chart of the model surface data sampling method provided by the present invention.

[0050] Figure 6 This is the fourth flow chart of the model surface data sampling method provided by the present invention.

[0051] Figure 7 It is a schematic diagram of interpolation when two adjacent pending vertices exceed a spacing threshold provided by the present invention.

[0052] Figure 8 It is a structural schematic diagram of the model surface data sampling device provided by the present invention.

[0053] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] As a high-tech technology developed in the international surveying and mapping field in recent years, oblique photography technology can collect images from five different angles, including one vertical angle, four oblique angles, etc., by carrying multiple sensors on the same flight platform, which greatly enriches the dimension and accuracy of data collection. However, with the increase in the amount of data collected, the amount of data in the three-dimensional model has also expanded dramatically, bringing huge challenges to the storage, transmission and processing of the model. Therefore, model lightweight technology came into being, which aims to reduce the storage space and computing resource occupation of the three-dimensional model through optimization processing, and improve the processing speed and system performance. With the continuous advancement of digitalization, informatization and intelligence, the application of three-dimensional models in various fields is becoming more and more extensive. In the future, the lightweight technology of oblique photography models will continue to develop and improve, providing more efficient and convenient three-dimensional visualization solutions for more industries. At the same time, with the integrated application of technologies such as cloud computing, big data and artificial intelligence, the lightweight processing of three-dimensional models will become more intelligent and automated.

[0056] At present, in order to achieve the lightweight of oblique photography models, oblique photography models can be combined with a series of technical means, such as vertex and texture compression, instantiated models, LOD (Levels of Detai, detail level) subdivision and model top-level reconstruction. By combining these technologies, the storage space and computing resources of the three-dimensional model can be reduced. Among them, in the case of large data volume, the model top-level reconstruction technology makes the compression of the model volume very obvious. It can be seen that the model top-level reconstruction technology is of great significance in the lightweight application background of oblique photography. Through its corresponding lightweight technology, it can effectively solve the problems of large data volume and low processing efficiency of three-dimensional models, and improve the practicality and application value of the model; and model surface sampling is an important link in the model top-level reconstruction technology. Therefore, how to sample the data on the model surface has become a technical problem that needs to be solved urgently.

[0057] Based on this, an embodiment of the present invention provides a model surface data sampling method, device, electronic device and storage medium, which can solve the above technical problems.

[0058] Combine the following Figure 1-Figure 7 A model surface data sampling method according to an embodiment of the present invention is described.

[0059] It should be noted that the execution subject of the embodiments of the present invention may be a model surface data sampling device, or an electronic device including a model surface data sampling device, or other devices or apparatuses including a model surface data sampling device or an electronic device. No specific limitation is made here. The following embodiments will be described by taking the electronic device as the execution subject as an example.

[0060] In addition, it should be noted that although the following embodiments of the present invention are described using oblique photography, the technical solutions of the embodiments of the present invention are also applicable to the model surface data sampling process during point cloud model reconstruction.

[0061] Figure 1 is one of the flow charts of the model surface data sampling method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0062] S102, obtaining OSGB data obtained by oblique photography of the natural real scene area; the above OSGB data is the data of the model surface corresponding to the natural real scene area, including the contour data of multiple triangular faces constituting the model surface.

[0063] Among them, OSGB stands for Open Scene Graph Binary, which is a file format used to store and load three-dimensional models. The three-dimensional model can be the corresponding model of any object / area in the three-dimensional scene.

[0064] In this step, before the 3D model is reconstructed, the surface of the natural real scene area in the specific scene can be obliquely photographed to obtain OSGB data corresponding to the surface of the natural real scene area. The OSGB data is actually the data of the 3D model surface corresponding to the natural real scene area. The 3D model here is referred to as the model in the following embodiments. For example, see Figure 2 The schematic diagram of the OSGB data of the model surface shown is that due to oblique photography, the OSGB data of the model surface may include multiple triangular facets constituting the model surface, the identification / index of each triangular facet and the number of contours of each triangular facet. The triangular facets here may also be called triangles; the contour data of each triangular facet may include the identification of the three edges included in the triangular facet, the lengths of the three edges, the position information of the three vertices of the triangular facet (such as coordinates), vertex identification, etc.

[0065] S104, determining the total number of vertices on the model surface according to the contour data of each triangular face, and determining the number of vertex sampling according to the total number of vertices and a preset sampling rate; the above sampling rate is less than 1.

[0066] In this step, after obtaining the OSGB data of the model surface, the number of triangular faces included therein can be counted. Each triangular face has three vertices, and the total number of vertices included in the OSGB data of the model surface can be calculated based on this, which is recorded as the total number of vertices.

[0067] After that, the total number of vertices and the preset sampling rate can be multiplied, and the product can be recorded as the number of vertex samples. Different sampling rates correspond to different subsequent model reconstruction qualities. Generally, the higher the sampling rate, the more vertices are selected from the original OSGB data, and the higher the quality of subsequent model reconstruction. The specific sampling rate can be set according to the required model reconstruction quality. The preset sampling rate here is generally less than 1, that is, the vertices selected from the original OSGB data will be less than the original number of vertices, so that lightweight processing of model reconstruction can be achieved. The sampling rate here can generally take a value between 0.3 and 0.7, such as 0.35.

[0068] S106, determining a plurality of candidate simulated vertices located in each triangular face and position information of each candidate simulated vertex according to the contour data of each triangular face and the number of vertex samplings; the number of each candidate simulated vertex is greater than the number of vertex samplings.

[0069] In this step, in order to ensure the quality of subsequent model reconstruction and take into account the lightweight processing of model reconstruction, after obtaining the number of vertex sampling and the contour data of the triangular faces on the model surface, the number of vertex sampling and the contour data of each triangular face can be used to calculate each vertex and the position information of each vertex that matches the number of vertex sampling in each triangular face, and all of them are recorded as candidate simulation vertices and the position information of candidate simulation vertices.

[0070] For example, one or more vertices in each triangular facet can be selected as candidate simulation vertices through the contour data of each triangular facet and the number of vertex samples; or the center point of each triangular facet can be calculated and each center point can be used as a candidate simulation vertex; or the centroid of each triangular facet can be calculated and each centroid can be used as a candidate simulation vertex; or at least one of the vertices, center points and centroid of each triangular facet can be used as a candidate simulation vertex; or other methods can be used. In short, each candidate simulation vertex can be determined.

[0071] It should be noted that the number of candidate simulation vertices finally determined here is generally greater than the number of vertex sampling, which can facilitate subsequent fine sampling of candidate simulation vertices to ensure the quality of subsequent model reconstruction while taking into account lightweight processing of model reconstruction.

[0072] S108, determining the vertex sampling result of the model surface according to the position information of each candidate simulation vertex, and performing interpolation processing on the vertex sampling result to determine a plurality of target vertices corresponding to the model surface and the position information of each target vertex.

[0073] In this step, after obtaining the positions of each candidate simulation vertex and each candidate model vertex, a relevant data sampling algorithm can be used to sample each candidate simulation vertex, sample the vertex data of the model surface to be uniformly distributed, and have a relatively large interval between each two adjacent vertices, and obtain the vertex sampling result of the model surface; the vertex sampling result may include multiple uniformly distributed sampling points (which can be recorded as pending sampling points). The number of vertices included in the vertex sampling result here can be less than the number of candidate simulation vertices, so that the lightweight processing of subsequent model reconstruction can be further realized, and the model surface reconstructed subsequently can be more consistent with the actual model surface. In addition, the relevant data sampling algorithms here may include, for example, Poisson sampling, simple random sampling, stratified sampling, etc.

[0074] After obtaining the vertex sampling results of the model surface, in order to avoid the situation where the spacing between some vertices in the sampled vertices is too large, resulting in the subsequent reconstructed model being not smooth and glossy enough, the vertices in the above vertex sampling results can be further interpolated. For example, adjacent vertices with too large spacing can be interpolated. After the interpolation process, the final multiple vertices can be obtained, all of which are recorded as target vertices, and the position information of the target vertices can be obtained.

[0075] In this embodiment, OSGB data obtained by oblique photography of a natural real scene area is obtained, and the total number of vertices on the model surface is determined according to the contour data of multiple triangular faces constituting the model surface of the natural real scene area included in the OSGB data, and the number of vertex sampling is determined according to the total number of vertices and a preset sampling rate less than 1, and then multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex are determined according to the contour data of each triangular face and the number of vertex sampling, and then the vertex sampling results of the model surface are determined according to the position information of each candidate simulation vertex, and the vertex sampling results are interpolated to determine multiple target vertices corresponding to the model surface and the position information of each target vertex, wherein the number of each candidate simulation vertex is greater than the number of vertex sampling. In this method, since a large number of simulation vertices can be determined by combining the contour data of each triangular face on the model surface with the number of vertex sampling, and the target vertex corresponding to the model surface is determined by simulated vertex sampling and interpolation processing, the amount of data sampled on the model surface can be reduced on the basis of ensuring the quality of subsequent model reconstruction, and the data on the model surface can be accurately sampled. At the same time, the smoothness and smoothness of the model surface can be improved by interpolation, and the hole phenomenon in subsequent model reconstruction can be significantly reduced.

[0076] The following embodiment illustrates the process of determining candidate simulation vertices located in each triangular face.

[0077] Figure 3 This is the second flow chart of the model surface data sampling method provided by the present invention, such as Figure 3 As shown, the above S106 may include the following steps:

[0078] S202, execute the centroid calculation operation, the above-mentioned centroid calculation operation includes: calculating the centroid coordinates of each triangular face according to the coordinates of the three vertices corresponding to each triangular face, and obtaining the centroid of each triangular face; counting the first number corresponding to the centroid of each triangular face, and determining whether the first number is greater than the preset simulation number; the above-mentioned simulation number is a value determined according to the vertex sampling number and the preset simulation rate.

[0079] S204, if the first number is not greater than the simulation number, the centroid of each triangular face is used as a new vertex, the corresponding triangular face is divided into three sub-triangular faces, and each sub-triangular face is used as a new triangular face, and the above centroid calculation operation is returned to execute until the preset iteration cutoff condition is met.

[0080] S206, taking the centroids of each triangular face in the iteration round when the iteration cutoff condition is satisfied as a plurality of candidate simulation vertices, and taking the centroid coordinates corresponding to each centroid as the position information of the corresponding candidate simulation vertex.

[0081] Among them, the contour data of the above-mentioned triangular face includes the coordinates of the three vertices corresponding to the triangular face. The coordinates of the center of gravity of each triangular face can be combined with the center of gravity calculation formula to calculate the coordinates of the center of gravity of each triangular face, and obtain the center of gravity of each triangular face. Afterwards, the sum of the number of centers of gravity obtained by calculation can be recorded as the first number, and it is determined whether the first number is greater than the preset simulation number to obtain a judgment result. The above-mentioned simulation number can be obtained by multiplying the above-mentioned vertex sampling number by the preset simulation rate. The simulation rate here can be determined according to the quality requirements of model reconstruction. Generally, the higher the quality requirements of model reconstruction, the higher the simulation rate can be set. Usually, the simulation rate here can take a value between 10 and 20. For example, it can take 20.

[0082] If the above judgment result shows that the first number is not greater than (i.e., less than or equal to) the simulation number, it means that the current number of simulated vertices is not enough, and it is necessary to continue simulating vertices. At this time, based on the Monte Carlo idea, the corresponding triangular face can be divided into three sub-triangular faces by using the centroid of each triangular face calculated above as the vertex, so that each triangular face can obtain three sub-triangular faces. After that, each sub-triangular face can be used as a new triangular face, and then the iteration (or loop) is returned to execute the above process of calculating the centroid and judging the number of centroids to obtain the judgment result of the total number of centroids in the second round of iteration. If the total number of centroids counted in the current iteration round (i.e., the new first number) is still not greater than the simulation number, it is necessary to calculate the centroid of each triangular face according to the three vertices of each triangular face in the previous round (one of which is the centroid calculated in the first round of iteration), and divide the corresponding triangular face into three sub-triangular faces with the centroid as the vertex, so that each sub-triangular face can obtain three sub-triangular faces again. Afterwards, each new sub-triangle face can be used as a new triangle face, and then the above process of calculating the center of gravity and judging the number of centers of gravity can be returned to obtain the judgment result of the total number of centers of gravity of the third round of iteration.

[0083] If the result of the third round of iteration of the total number of centers of gravity is still not greater than the number of simulations, the process of iterative center of gravity calculation and center of gravity number judgment continues until a certain round of iteration meets the iteration cutoff condition.

[0084] Optionally, the above-mentioned iteration cutoff condition includes any one of the following: the first number is greater than the simulation number; the number of iterations reaches a preset iteration number threshold. That is, the iteration process can be stopped when the total number of centers of gravity in a certain round of iterations is greater than the simulation number, or the iteration process can be stopped when the number of iterations in a certain round of iterations reaches a preset iteration number threshold. The size of the preset iteration number threshold here can be specifically set according to actual conditions.

[0085] When one of the above-mentioned iteration processes meets the iteration cutoff condition, the newly calculated center of gravity in the current iteration round and the center of gravity calculated in the previous round can be used as candidate simulation vertices. In other words, the candidate simulation vertices here are the center of gravity of the triangles calculated in all iteration rounds. At the same time, the coordinates of each center of gravity can also be obtained, and the coordinates of the center of gravity can be used as the coordinates of the candidate simulation vertex, that is, the position information of each candidate simulation vertex is obtained.

[0086] For example, see Figure 4 The schematic diagram of simulating vertices on the model surface is shown, where the dark green dots are the centroids calculated during the first round of iterations, the light green dots are the centroids of each triangular facet calculated during the second round of iterations, and the orange dots are the centroids of each triangular facet calculated during the third round of iterations. It can be seen that the vertex data of the model surface is simulated by iteratively calculating the centroid of each triangular facet and splitting each triangular facet by the centroid to continuously calculate the centroid. The simulated vertex data is more in line with the actual situation of the model surface, and the situation where the spacing between some vertices is too large in the left and right directions of the horizontal plane can be reduced. This can reduce the probability of holes in the sampled vertex data during subsequent model reconstruction, that is, it can reduce the hole phenomenon that occurs during subsequent model reconstruction to a certain extent.

[0087] In this embodiment, the vertex data of the model surface is simulated by iteratively calculating the centroid of each triangular face and splitting each triangular face by the centroid to continuously calculate the centroid. The simulated vertex data is more in line with the actual situation of the model surface and can reduce the void phenomenon that occurs during subsequent model reconstruction to a certain extent. Furthermore, by clarifying the iterative cutoff condition during the vertex simulation process, the entire vertex simulation process can be made more stable, thereby ensuring the stability of the model surface data sampling and subsequent model reconstruction.

[0088] The following embodiment illustrates the process of obtaining vertex sampling results of the model surface by performing data sampling based on each candidate simulation vertex.

[0089] Figure 5 FIG. 3 is a flow chart of the model surface data sampling method provided by the present invention. Figure 5As shown, the "determining the vertex sampling result of the model surface according to the position information of each candidate simulation vertex" in the above S108 may include the following steps:

[0090] S302, calculating the area of ​​each triangular facet according to the contour data of each triangular facet, and calculating the total model area corresponding to the model surface according to the area of ​​each triangular facet.

[0091] Among them, the contour data of each triangle face includes the lengths of the three sides of each triangle face. The area of ​​each triangle face can be directly calculated using the triangle area calculation formula, and then the areas of each triangle face are summed up. The obtained area sum is the area of ​​the model surface, which is recorded as the total model area.

[0092] S304, calculating the sampling radius according to the total area of ​​the model and the number of vertex samplings.

[0093] In this step, after obtaining the total model area of ​​the model surface and the number of vertex samples on the model surface, the sampling radius can be calculated by the following formula:

[0094] .

[0095] Among them, r represents the sampling radius; M represents the total area of ​​the model; ρ represents the density factor, whose size can be set according to actual conditions, for example, it can be set to 0.7; π represents pi; and N represents the number of vertex samples.

[0096] S306, sampling each candidate simulation vertex using a preset Poisson disk sampling algorithm according to the position information and sampling radius of each candidate simulation vertex, and determining a vertex sampling result of the model surface; the vertex sampling result includes a plurality of evenly distributed pending vertices.

[0097] In this step, the Poisson disk sampling algorithm is used to sample the vertices. After calculating the sampling radius, the dimension of the sampling point, that is, the sampling dimension, can also be set. In this embodiment, the Poisson disk sampling algorithm can be set to two dimensions, that is, sampling is performed in two-dimensional space, and the number of sampling times can also be set.

[0098] Afterwards, based on each candidate simulation vertex and its position information, a Poisson disk sampling algorithm can be used in two-dimensional space for sampling, that is, a two-dimensional circle / disk is used for sampling, and finally a plurality of uniformly distributed vertices are obtained by sampling, which are all recorded as pending vertices, and these plurality of uniformly distributed pending vertices and their position information are used as vertex sampling results. The specific sampling process of the Poisson disk is not described here.

[0099] The above vertex sampling results include multiple evenly distributed pending vertices. The even distribution here means that the distance between any two adjacent pending vertices in any area on the model surface is the same, and generally the distance between two adjacent pending vertices is large. This can reduce the number of pending vertices while reflecting the actual situation of the model surface, thereby achieving lightweight processing of subsequent model reconstruction.

[0100] In this embodiment, the sampling radius is calculated by the total area of ​​the model and the vertex sampling data, and sampling is performed through the Poisson disk sampling algorithm combined with the position information of the candidate simulation vertices to determine the vertex sampling results corresponding to the model surface. In this way, multiple relatively uniform pending vertices can be sampled to reduce the number of pending vertices while meeting the actual situation of the model surface, thereby achieving lightweight processing of subsequent model reconstruction.

[0101] The following embodiment illustrates the process of interpolating pending vertices in the vertex sampling result.

[0102] Figure 6 FIG. 4 is a flow chart of the model surface data sampling method provided by the present invention. Figure 6 As shown, the above-mentioned S108 of "performing interpolation processing on the vertex sampling results to determine multiple target vertices corresponding to the model surface and position information of each target vertex" may include the following steps:

[0103] S402, searching each pending vertex using a preset nearest neighbor algorithm according to the position information of each pending vertex in the vertex sampling result, and determining a nearest neighbor point set corresponding to each pending vertex; the nearest neighbor point set includes adjacent pending vertices that are closest to the pending vertex.

[0104] The preset nearest neighbor algorithm may be, for example, a K nearest neighbor algorithm, or other algorithms.

[0105] After obtaining the vertex sampling results of the model surface through sampling, the multiple uniformly distributed pending vertices included in the vertex sampling results and the position information of each pending vertex can be obtained; then the kd tree data structure in the K nearest neighbor algorithm can be used to calculate the distance between each pending vertex and its adjacent pending vertices based on the position information of each pending vertex, so as to search / find the pending vertices that are closest to each pending vertex and adjacent to it in the vertex sampling results, record them as adjacent pending vertices, and then combine the adjacent pending vertices of each pending vertex to form the nearest neighbor point set of the pending vertex.

[0106] S404: Determine the neighbor point distance between each pending vertex and its corresponding adjacent pending vertex according to the nearest neighbor point set of each pending vertex.

[0107] In this step, as mentioned above, in the process of determining the nearest neighbor point set of each pending vertex, the distance between each pending vertex and its nearest adjacent pending vertex will be calculated. Therefore, after determining the nearest neighbor point set, the distance between the pending vertex and its adjacent pending vertices in the nearest neighbor point set can be directly obtained, which are all recorded as neighbor point distances.

[0108] S406, if any neighbor point distance is greater than a preset distance threshold, obtain the position information of two pending vertices corresponding to any neighbor point distance, and perform mean processing according to the position information of the two pending vertices to determine the position information of the interpolation point.

[0109] In this step, after calculating the neighboring point distances between each pending vertex and each adjacent pending vertex in its nearest neighboring point set, as an optional embodiment, the neighboring point distances can be summed to determine the distance sum value; then the second number corresponding to the adjacent pending vertices in each nearest neighboring point set is counted, that is, the total number of adjacent pending vertices included in all nearest neighboring point sets is counted, which is recorded as the second number; then the distance sum value can be ratioed to the second number to determine the distance threshold (which can also be recorded as the threshold distance).

[0110] After that, the calculated distances of each neighbor point can be compared with the distance threshold, that is, to determine whether the distances of each neighbor point are greater than the distance threshold; if the distance of a certain neighbor point is greater than the distance threshold, the two pending vertices corresponding to the calculation of the neighbor point distance can be obtained, and then the position information of the two pending vertices can be obtained in the vertex sampling result, and then the position information of the two pending vertices can be summed and averaged, and the average of the obtained position information is the position information of the vertex to be inserted, and the vertex to be inserted here can be recorded as the interpolation point. For example, the X, Y, and Z coordinates of the two pending vertices are summed and multiplied by 0.5, and the average values ​​x', y', and z' obtained are the position information of the interpolation point.

[0111] For example, see Figure 7 The interpolation diagram shown is when two adjacent pending vertices exceed the spacing threshold, where the distance between the pending vertices in the left and right directions of the horizontal plane generally meets the requirements, while the distance between the pending vertices in the up and down directions may be too large. Here, through interpolation processing, the number of pending vertices in the up and down directions can be increased, and of course the number of pending vertices in the left and right directions can also be increased, thereby reducing the probability of holes in the up and down directions and the left and right directions during model reconstruction, and improving the quality of model reconstruction on the basis of lightweight processing of model reconstruction.

[0112] S408, determining the interpolation points and each pending vertex in the vertex sampling result as a plurality of target vertices corresponding to the model surface, and determining the position information of the interpolation points and the position information of each pending vertex as the position information of the target vertex.

[0113] In this step, after obtaining the interpolation points after interpolating each pending vertex in the vertex sampling result, all interpolation points and their position information can be added to the vertex sampling result to obtain the final vertex sampling result. Specifically, all interpolation points and all pending vertices can be used as target vertices obtained by the final sampling, and the position information of the interpolation points and the position information of the pending vertices can be correspondingly determined as the position information of the target vertices.

[0114] In this embodiment, the nearest neighbor algorithm is used to interpolate each pending vertex in the vertex sampling result to determine the final vertex sampling result of the model surface, which can improve the smoothness and smoothness of the model surface data, thereby improving the smoothness and smoothness of the subsequently reconstructed model surface, and can significantly reduce the void phenomenon after model reconstruction. Further, when the interpolation algorithm searches for the nearest adjacent pending vertex of each pending vertex, the distance threshold can be determined by the calculated neighboring point distance and the number of neighboring points, so that the interpolation result can be consistent with the actual situation of the model surface and is more realistic.

[0115] Before simulating the vertices of the model surface, in order to improve the accuracy of the simulated vertices, an island algorithm may be used to remove the triangular surface data that does not meet the requirements from the triangular surface data obtained by oblique photography. The following embodiment illustrates this process.

[0116] In some embodiments, before the above S106, the above method may further include the following steps:

[0117] For each triangular face, the number of triangular faces having the same identifier as the triangular face is calculated according to the identifiers of the three sides of the triangular face to obtain a third number; wherein the identifier of an edge shared by two adjacent triangular faces is the same.

[0118] According to the third number of each triangular face and a preset number threshold, the triangular faces whose third number is less than the number threshold are eliminated to obtain a plurality of valid triangular faces;

[0119] Among them, the contour data of each triangular facet includes the identifiers of the three sides corresponding to the triangular facet. The identifiers of the three sides of each triangular facet can be obtained by marking after collecting OSGB data, wherein two adjacent triangular faces will have a common side, and the identifiers of the common sides can generally be set to the same identifier. In this way, after obtaining each triangular facet on the model surface, the number of triangular faces that share edges with each triangular facet can be counted through the identifiers of the three sides of each triangular facet (that is, the number of triangular faces that have the same identifier as each triangular facet is determined), so that each triangular facet will have a number value, which is recorded as the third quantity. For example, if a triangular facet has two sides with the same identifier, then the triangular facet has two triangular faces with common edges, that is, the corresponding third quantity is 2.

[0120] After obtaining the third quantity corresponding to each triangular face, the third quantity of each triangular face can be compared with the preset quantity threshold, specifically, it can be determined whether the third quantity of each triangular face is greater than or equal to the quantity threshold; if the second quantity of a triangular face is greater than or equal to the quantity threshold, it means that the triangular face is a valid triangular face and can be retained for subsequent calculations; if the second quantity of a triangular face is less than the quantity threshold, it means that the triangular face is an isolated triangular face, that is, a fragment of the model surface, which needs to be cleaned up from each triangular face. In this way, the fragments in each triangular face can be cleaned up, and valid triangular faces and their contour data remain.

[0121] Accordingly, the process of simulating vertices in S106 may specifically include: determining multiple candidate simulated vertices located in each valid triangular face according to the contour data of each valid triangular face and the number of vertex samples. That is to say, when simulating vertex data, the triangular face data used is the data of the valid triangular face, rather than the original triangular face data, which can reduce interference factors in the vertex simulation and sampling process and ensure the accuracy of the model surface data simulation and sampling.

[0122] In this embodiment, the number of triangular faces that share common edges with adjacent triangular faces is counted through the identification of each triangular face, and the fragmented triangular faces on the model surface are removed accordingly, thereby reducing interference factors in the vertex simulation and sampling process and ensuring the accuracy of model surface data simulation and sampling.

[0123] The model surface data sampling device provided by the present invention is described below. The model surface data sampling device described below and the model surface data sampling method described above can be referred to each other.

[0124] Figure 8 is a schematic diagram of the structure of the model surface data sampling device provided by the present invention, see Figure 8 As shown, the above device may include:

[0125] The acquisition module 510 is used to acquire OSGB data obtained by oblique photography of the natural real scene area; the OSGB data is the data of the model surface corresponding to the natural real scene area, including the contour data of multiple triangular faces constituting the model surface;

[0126] The number determination module 520 is used to determine the total number of vertices on the model surface according to the contour data of each triangular face, and determine the number of vertex sampling according to the total number of vertices and a preset sampling rate; the above sampling rate is less than 1;

[0127] The candidate vertex determination module 530 is used to determine a plurality of candidate simulated vertices located in each triangular face and the position information of each candidate simulated vertex according to the contour data of each triangular face and the number of vertex samples; the number of each candidate simulated vertex is greater than the number of vertex samples;

[0128] The target vertex determination module 540 is used to determine the vertex sampling result of the model surface according to the position information of each candidate simulation vertex, and perform interpolation processing on the vertex sampling result to determine multiple target vertices corresponding to the model surface and the position information of each target vertex.

[0129] In some embodiments, the contour data of the triangular face includes coordinates of three vertices corresponding to the triangular face, and the candidate vertex determination module 530 may include:

[0130] A barycenter calculation unit, configured to perform a barycenter calculation operation, wherein the barycenter calculation operation includes: calculating the barycenter coordinates of each triangular face according to the coordinates of the three vertices corresponding to each triangular face, and obtaining the barycenter of each triangular face; counting a first number corresponding to the barycenter of each triangular face, and determining whether the first number is greater than a preset simulation number; the simulation number is a value determined according to the vertex sampling number and a preset simulation rate;

[0131] a division and return execution unit, configured to, if the first number is not greater than the simulation number, use the centroid of each triangular face as a new vertex, divide the corresponding triangular face into three sub-triangular faces, use each sub-triangular face as a new triangular face, and return to execute the centroid calculation operation until a preset iteration cutoff condition is met;

[0132] The candidate vertex determination unit is used to use the centroids of each triangular face in the iteration round when the iteration cutoff condition is met as multiple candidate simulation vertices, and use the centroid coordinates corresponding to each centroid as the position information of the corresponding candidate simulation vertex.

[0133] Optionally, the above-mentioned iteration cutoff condition includes any one of the following: the first number is greater than the simulation number; the number of iterations reaches a preset iteration number threshold.

[0134] In some embodiments, the target vertex determination module 540 may include:

[0135] A model area calculation unit, used to calculate the area of ​​each triangular face according to the contour data of each triangular face, and calculate the total model area corresponding to the model surface according to the area of ​​each triangular face;

[0136] A sampling radius calculation unit, used to calculate the sampling radius according to the total area of ​​the model and the number of vertex samplings;

[0137] The sampling unit is used to sample each candidate simulation vertex according to the position information and sampling radius of each candidate simulation vertex using a preset Poisson disk sampling algorithm to determine the vertex sampling result of the model surface; the above vertex sampling result includes multiple evenly distributed pending vertices.

[0138] In some embodiments, the vertex sampling result includes a plurality of evenly distributed pending vertices and position information of each pending vertex. The target vertex determination module 540 may further include:

[0139] A search unit is used to search for each pending vertex using a preset nearest neighbor algorithm according to the position information of each pending vertex in the vertex sampling result, and determine a nearest neighbor point set corresponding to each pending vertex; the nearest neighbor point set includes adjacent pending vertices that are closest to the pending vertex;

[0140] A distance determination unit, used to determine the neighboring point distance between each pending vertex and its corresponding adjacent pending vertex according to the nearest neighboring point set of each pending vertex;

[0141] An interpolation unit, for obtaining position information of two pending vertices corresponding to any neighboring point distance if the distance between any neighboring point is greater than a preset distance threshold, and performing mean processing according to the position information of the two pending vertices to determine the position information of the interpolation point;

[0142] The target vertex determination unit is used to determine the interpolation points and the pending vertices in the vertex sampling results as multiple target vertices corresponding to the model surface, and determine the position information of the interpolation points and the position information of the pending vertices as the position information of the target vertices.

[0143] Optionally, the above-mentioned device also includes a distance threshold determination module, which is used to sum the distances of each neighboring point to determine the distance sum value; count the second number corresponding to the adjacent pending vertices in each nearest neighbor point set; and compare the distance sum value with the second number to determine the distance threshold.

[0144] In some embodiments, the contour data of the triangular face includes identifiers of three edges corresponding to the triangular face, and the candidate vertex determination module 530 determines, according to the contour data of each triangular face and the number of vertex samples, a plurality of candidate simulation vertices located in front of each triangular face, and the apparatus further includes:

[0145] A culling module is used to calculate, for each triangular face, the number of triangular faces having the same identifier as the triangular face according to the identifiers of the three sides of the triangular face, to obtain a third number; wherein the identifier of an edge shared by two adjacent triangular faces is the same; according to the third number of each triangular face and a preset number threshold, culling the triangular faces whose third number is less than the number threshold in each triangular face, to obtain a plurality of valid triangular faces;

[0146] Correspondingly, the candidate vertex determination module 530 is specifically used to determine a plurality of candidate simulation vertices located in each valid triangular face according to the contour data of each valid triangular face and the number of vertex samplings.

[0147] It should be noted here that the above-mentioned device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.

[0148] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor (processor) 610 , a communication interface (Communications Interface) 620 , a memory (memory) 630 and a communication bus 640 , wherein the processor 610 , the communication interface 620 , and the memory 630 communicate with each other through the communication bus 640 . The processor 610 can call the logic instructions in the memory 630 to execute the model surface data sampling method, which includes: obtaining OSGB data obtained after oblique photography of the natural real scene area; the above-mentioned OSGB data is the data of the model surface corresponding to the natural real scene area, including the contour data of multiple triangular faces constituting the model surface; determining the total number of vertices of the model surface according to the contour data of each triangular face, and determining the number of vertex samplings according to the total number of vertices and a preset sampling rate; the above-mentioned sampling rate is less than 1; determining multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samplings; the number of each candidate simulation vertex is greater than the number of vertex samplings; determining the vertex sampling results of the model surface according to the position information of each candidate simulation vertex, and interpolating the vertex sampling results to determine multiple target vertices corresponding to the model surface and the position information of each target vertex.

[0149] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0150] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the model surface data sampling method provided by the above-mentioned methods, which includes: obtaining OSGB data obtained after oblique photography of a natural real scene area; the above-mentioned OSGB data is the data of the model surface corresponding to the natural real scene area, including contour data of multiple triangular faces constituting the model surface; determining the total number of vertices of the model surface according to the contour data of each triangular face, and determining the number of vertex samplings according to the total number of vertices and a preset sampling rate; the above-mentioned sampling rate is less than 1; determining multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samplings; the number of each candidate simulation vertex is greater than the number of vertex samplings; determining the vertex sampling results of the model surface according to the position information of each candidate simulation vertex, and interpolating the vertex sampling results to determine multiple target vertices corresponding to the model surface and the position information of each target vertex.

[0151] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the model surface data sampling method provided by the above-mentioned methods, the method comprising: obtaining OSGB data obtained after oblique photography of a natural real scene area; the above-mentioned OSGB data is the data of the model surface corresponding to the natural real scene area, including contour data of multiple triangular faces constituting the model surface; determining the total number of vertices of the model surface according to the contour data of each triangular face, and determining the number of vertex samplings according to the total number of vertices and a preset sampling rate; the above-mentioned sampling rate is less than 1; determining multiple candidate simulation vertices located in each triangular face and the position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samplings; the number of each candidate simulation vertex is greater than the number of vertex samplings; determining the vertex sampling results of the model surface according to the position information of each candidate simulation vertex, and interpolating the vertex sampling results to determine multiple target vertices corresponding to the model surface and the position information of each target vertex.

[0152] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A model surface data sampling method, characterized in that: include: Obtaining OSGB data of an open source three-dimensional rendering engine binary file obtained by oblique photography of a natural real scene area; the OSGB data is data of a model surface corresponding to the natural real scene area, including contour data of a plurality of triangular faces constituting the model surface; Determining the total number of vertices on the model surface according to the contour data of each triangular face, and determining the number of vertex sampling according to the total number of vertices and a preset sampling rate; the sampling rate is less than 1, and the sampling rate is set according to the required model reconstruction quality; Determine, according to the contour data of each triangular face and the number of vertex samplings, a plurality of candidate simulation vertices located in each triangular face and position information of each candidate simulation vertex; the number of each candidate simulation vertex is greater than the number of vertex samplings; Determine the vertex sampling result of the model surface according to the position information of each candidate simulation vertex, and perform interpolation processing on the vertex sampling result to determine a plurality of target vertices corresponding to the model surface and the position information of each target vertex; The contour data of the triangular face includes coordinates of three vertices corresponding to the triangular face, and the determining of a plurality of candidate simulation vertices located in each triangular face and position information of each candidate simulation vertex according to the contour data of each triangular face and the number of vertex samples includes: Executing a barycenter calculation operation, the barycenter calculation operation comprising: calculating the barycenter coordinates of each triangular face according to the coordinates of the three vertices corresponding to each triangular face, and obtaining the barycenter of each triangular face; counting a first quantity corresponding to the barycenter of each triangular face, and determining whether the first quantity is greater than a preset simulation quantity; the simulation quantity is a value determined according to the vertex sampling quantity and a preset simulation rate; If the first number is not greater than the simulation number, the centroid of each triangular face is used as a new vertex, the corresponding triangular face is divided into three sub-triangular faces, and each sub-triangular face is used as a new triangular face, and the centroid calculation operation is returned to be executed until a preset iteration cutoff condition is met; The centroids of the triangular faces in the iteration round when the iteration cutoff condition is satisfied are used as the multiple candidate simulation vertices, and the centroid coordinates corresponding to the centroids are used as the position information of the corresponding candidate simulation vertices.

2. The model surface data sampling method according to claim 1, characterized in that: The iteration cutoff condition includes any one of the following: The first quantity is greater than the simulated quantity; The number of iterations reaches the preset iteration threshold.

3. The model surface data sampling method according to any one of claims 1 to 2, characterized in that: The step of determining the vertex sampling result of the model surface according to the position information of each candidate simulation vertex includes: Calculating the area of ​​each triangular face according to the contour data of each triangular face, and calculating the total model area corresponding to the model surface according to the area of ​​each triangular face; Calculate the sampling radius according to the total area of ​​the model and the number of vertex samples; According to the position information of each candidate simulation vertex and the sampling radius, a preset Poisson disk sampling algorithm is used to sample each candidate simulation vertex to determine the vertex sampling result of the model surface; the vertex sampling result includes a plurality of evenly distributed pending vertices.

4. The model surface data sampling method according to any one of claims 1 to 2, characterized in that: The vertex sampling result includes a plurality of evenly distributed pending vertices and position information of each of the pending vertices, and the interpolation processing of the vertex sampling result to determine a plurality of target vertices corresponding to the model surface and position information of each of the target vertices includes: According to the position information of each pending vertex in the vertex sampling result, a preset nearest neighbor algorithm is used to search each pending vertex to determine a nearest neighbor point set corresponding to each pending vertex; the nearest neighbor point set includes adjacent pending vertices that are closest to the pending vertex; Determine the neighboring point distance between each of the pending vertices and its corresponding adjacent pending vertices according to the nearest neighboring point set of each pending vertex; If any neighboring point distance is greater than a preset distance threshold, the position information of two pending vertices corresponding to the any neighboring point distance is obtained, and average processing is performed according to the position information of the two pending vertices to determine the position information of the interpolation point; The interpolation points and each of the pending vertices in the vertex sampling results are determined as a plurality of target vertices corresponding to the model surface, and the position information of the interpolation points and the position information of each of the pending vertices are determined as the position information of the target vertices.

5. The model surface data sampling method according to claim 4, characterized in that: The distance threshold is determined by: Summing up the distances of the neighboring points to determine the distance sum value; Counting the second number of adjacent pending vertices in each of the nearest neighbor point sets; The distance sum value is compared with the second quantity to determine the distance threshold.

6. The model surface data sampling method according to any one of claims 1 to 2, characterized in that: The contour data of the triangular face includes identifiers of three edges corresponding to the triangular face, and the method further includes: determining, according to the contour data of each triangular face and the number of vertex samples, a plurality of candidate simulation vertices located in each triangular face. For each of the triangular faces, according to the identifiers of the three sides of the triangular face, the number of triangular faces having the same identifier as the triangular face is calculated to obtain a third number; wherein the identifier of an edge shared by two adjacent triangular faces is the same; According to the third number of each of the triangular faces and a preset number threshold, the triangular faces whose third number is less than the number threshold are eliminated to obtain a plurality of valid triangular faces; Accordingly, determining a plurality of candidate simulation vertices located in each of the triangular faces according to the contour data of each of the triangular faces and the number of vertex samplings includes: According to the contour data of each of the valid triangular faces and the number of vertex samplings, a plurality of candidate simulation vertices located in each of the valid triangular faces are determined.

7. A model surface data sampling device, characterized in that: include: An acquisition module, used to acquire OSGB data obtained by oblique photography of a natural real scene area; the OSGB data is data of a model surface corresponding to the natural real scene area, including contour data of a plurality of triangular faces constituting the model surface; A quantity determination module, used to determine the total number of vertices on the model surface according to the contour data of each triangular face, and determine the number of vertex sampling according to the total number of vertices and a preset sampling rate; the sampling rate is less than 1, and the sampling rate is set according to the required model reconstruction quality; A candidate vertex determination module, used to determine a plurality of candidate simulation vertices located in each of the triangular faces and the number of vertex samplings according to the contour data of each of the triangular faces and the position information of each of the candidate simulation vertices; the number of each of the candidate simulation vertices is greater than the number of vertex samplings; A target vertex determination module, used to determine the vertex sampling result of the model surface according to the position information of each candidate simulation vertex, and perform interpolation processing on the vertex sampling result to determine a plurality of target vertices corresponding to the model surface and the position information of each target vertex; The contour data of the triangular face includes the coordinates of three vertices corresponding to the triangular face, and the candidate vertex determination module includes: A barycenter calculation unit, configured to perform a barycenter calculation operation, wherein the barycenter calculation operation includes: calculating the barycenter coordinates of each triangular face according to the coordinates of the three vertices corresponding to each triangular face, and obtaining the barycenter of each triangular face; counting a first number corresponding to the barycenter of each triangular face, and determining whether the first number is greater than a preset simulation number; the simulation number is a value determined according to the vertex sampling number and a preset simulation rate; a division and return execution unit, configured to, if the first number is not greater than the simulation number, use the centroid of each of the triangular faces as a new vertex, divide the corresponding triangular face into three sub-triangular faces, use each of the sub-triangular faces as a new triangular face, and return to execute the centroid calculation operation until a preset iteration cutoff condition is met; The candidate vertex determination unit is used to use the centroids of each triangular face in the iteration round when the iteration cutoff condition is met as the multiple candidate simulation vertices, and use the centroid coordinates corresponding to each centroid as the position information of the corresponding candidate simulation vertex.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the model surface data sampling method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the model surface data sampling method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Multi-view point cloud fusion method based on projection

    CN110136077A

  • Geometric point cloud model construction method, workpiece grabbing method and device and electronic equipment

    CN115063534A