Three-dimensional scene model simplification method and device, electronic equipment and storage medium
By constructing an initial 3D single model and performing point simplification based on accuracy parameters, the problem of low simplification efficiency of the 3D model is solved, efficient simplification of the 3D scene model is achieved, and the computational complexity and simulation time are reduced.
Patent Information
- Application Number
- CN202410803098.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-18
AI Technical Summary
Existing 3D model simplification methods are inefficient and cannot effectively process data in a large number of 3D scene models, resulting in increased calculations and out-of-control simulation time.
By constructing an initial three-dimensional single model and performing point simplification based on preset accuracy parameters, the simplification process is automated and the efficiency of model simplification is improved.
It achieves efficient simplification of three-dimensional scene models, reduces computational complexity, and improves model simplification efficiency. The entire process does not require manual participation and has a high degree of automation.
Smart Images

Figure CN118799536A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of three-dimensional model simplification, and in particular to a three-dimensional scene model simplification method, device, electronic device and storage medium. Background Art
[0002] At present, 3D models are widely used in fields such as computer graphics and virtual reality. 3D models are usually composed of a series of point data, line data and surface data to accurately or approximately represent the shape and appearance of objects. In some special applications, too much data in the 3D model will increase the amount of calculation and fail to provide more value. Take the wireless network simulation application as an example. When simulating the 3D scene of a university, the 3D scene model contains tens of millions of point data, which are combined into tens of millions of surface data. In the process of 3D simulation, due to the excessive amount of data to be processed, the amount of calculation increases, which will cause the simulation time to be out of control. Therefore, the 3D scene model needs to be simplified.
[0003] Existing 3D model simplification methods include the following three methods: one is to manually establish a model body bounding box, and manually crop the model body bounding box by manual estimation to determine the simplification range of the 3D model, thereby achieving simplification of the 3D model. This method requires a long time for manual cropping, resulting in low model simplification efficiency; the second is a 3D model simplification method based on Hausdorff distance perception, which merges the edges with the smallest folding cost in the triangular face to achieve simplification of the 3D model. The processing process of this method is relatively complicated, resulting in low model simplification efficiency; the third is to determine whether the bounding volume drawn on the rendering surface with the current vertex as the viewpoint is folded to decide whether to delete the current vertex to simplify the data, thereby achieving simplification of the 3D model. This method is based on data point deletion from a certain perspective and is not suitable for the actual needs of simplification of 3D scene models. Summary of the invention
[0004] The embodiments of the present application provide a 3D scene model simplification method, device, electronic device and storage medium to address the defect of low model simplification efficiency in existing 3D model simplification methods. The method targets multiple 3D monomers in an initial 3D scene model, first constructs initial monomerized models corresponding to each of the multiple 3D monomers, then simplifies each initial monomerized model based on preset accuracy parameters to obtain a corresponding simplified monomerized model, and then determines the target 3D scene model based on all simplified monomerized models. The entire simplification process does not require human intervention and has a high degree of automation, thereby effectively improving the model simplification efficiency.
[0005] In a first aspect, an embodiment of the present application provides a three-dimensional scene model simplification method, comprising the following steps.
[0006] An initial data set is determined according to model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes a plurality of three-dimensional monomers.
[0007] The geographic information corresponding to each of the plurality of three-dimensional monomers is determined according to the map vector coordinate data corresponding to the initial three-dimensional scene model.
[0008] For each three-dimensional monomer, an initial monomer model corresponding to the three-dimensional monomer is constructed according to the geographic information corresponding to the three-dimensional monomer and the initial data set; based on the preset accuracy parameters, the initial monomer model is point simplified to obtain a simplified monomer model.
[0009] The target three-dimensional scene model is determined based on all simplified monomer models.
[0010] In one embodiment, the initial data set includes: an initial point data set, an initial face data set and an initial texture data set. The initial monomerized model corresponding to the three-dimensional monomer is constructed based on the geographic information corresponding to the three-dimensional monomer and the initial data set, including: determining the monomer polygon corresponding to the three-dimensional monomer based on the geographic information; constructing a new point data set based on multiple point data located within the monomer polygon in the initial point data set; filtering the initial face data set based on the new point data set to obtain a new face data set; filtering the initial texture data set based on the new face data set to obtain a new texture data set; and constructing the initial monomerized model based on the new point data set, the new face data set and the new texture data set.
[0011] In one embodiment, the initial monomerized model is point-simplified based on preset precision parameters to obtain a simplified monomerized model, including: for multiple point data in the initial monomerized model, determining the target coordinates from the point coordinates corresponding to each of the multiple point data; for each point coordinate, determining the sub-coordinate corresponding to the point coordinate; according to the preset precision parameters and the target coordinate, determining the integer division result corresponding to the sub-coordinate; based on the integer division result, simplifying the sub-coordinate to obtain simplified target sub-coordinates; and determining the simplified monomerized model based on all target sub-coordinates.
[0012] In one embodiment, the target coordinates include: a minimum Z coordinate, a minimum X coordinate, and a minimum Y coordinate, the sub-coordinates include: a Z coordinate, an X coordinate, and a Y coordinate, and determining the integer division results corresponding to the sub-coordinates according to the preset precision parameter and the target coordinates includes: determining a first sub-integer division result corresponding to the Z coordinate according to the preset precision parameter and the minimum Z coordinate; determining a second sub-integer division result corresponding to the X coordinate according to the preset precision parameter and the minimum X coordinate; determining a third sub-integer division result corresponding to the Y coordinate according to the preset precision parameter and the minimum Y coordinate; and determining the first sub-integer division result, the second sub-integer division result, and the third sub-integer division result as the integer division result.
[0013] In one embodiment, the target sub-coordinates include: a target Z coordinate, a target X coordinate, and a target Y coordinate, and simplifying the sub-coordinates based on the integer division result to obtain simplified target sub-coordinates includes: using a preset optimization method to simplify the Z coordinate based on the first sub-division result to obtain the simplified target Z coordinate; using the preset optimization method to simplify the X coordinate based on the second sub-division result to obtain the simplified target X coordinate; using the preset optimization method to simplify the Y coordinate based on the third sub-division result to obtain the simplified target Y coordinate; wherein the preset optimization method includes one of the following: an upward optimization method, a downward optimization method, and a similar optimization method.
[0014] In one embodiment, determining the simplified monomerized model based on all target sub-coordinates includes: determining the initial point data corresponding to each of the all target sub-coordinates; filtering the repeated initial point data in all the initial point data to obtain multiple target point data; based on the multiple target point data, screening the multiple surface data in the initial monomerized model to obtain multiple target surface data; determining the simplified monomerized model based on the multiple target point data and the multiple target surface data.
[0015] In a second aspect, an embodiment of the present application provides a three-dimensional scene model simplification device, comprising the following modules.
[0016] A data determination module is used to determine an initial data set based on model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes multiple three-dimensional monomers; and to determine geographic information corresponding to each of the multiple three-dimensional monomers based on map vector coordinate data corresponding to the initial three-dimensional scene model.
[0017] The model simplification module is used to construct an initial monomerized model corresponding to each three-dimensional monomer according to the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point-simplified to obtain a simplified monomerized model; and the target three-dimensional scene model is determined based on all simplified monomerized models.
[0018] In a third aspect, an embodiment of the present application provides a terminal, including a memory, a transceiver, and a processor.
[0019] A memory is used to store a computer program; a transceiver is used to send and receive data under the control of the processor; and a processor is used to read the computer program in the memory and perform the following operations.
[0020] An initial data set is determined according to model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes a plurality of three-dimensional monomers; geographic information corresponding to each of the plurality of three-dimensional monomers is determined according to map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer is constructed according to the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and a target three-dimensional scene model is determined according to all simplified monomerized models.
[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the three-dimensional scene model simplification method described in the first aspect are implemented.
[0022] In a fifth aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the three-dimensional scene model simplification method described in the first aspect.
[0023] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the three-dimensional scene model simplification method described in the first aspect.
[0024] The three-dimensional scene model simplification method, device, electronic device and storage medium provided in the embodiment of the present application determine the initial data set according to the model data corresponding to the initial three-dimensional scene model, and the initial three-dimensional scene model includes multiple three-dimensional monomers; determine the geographic information corresponding to each of the multiple three-dimensional monomers according to the map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, construct an initial monomerized model corresponding to the three-dimensional monomer according to the geographic information corresponding to the three-dimensional monomer and the initial data set; based on the preset accuracy parameters, simplify the initial monomerized model to obtain a simplified monomerized model; and determine the target three-dimensional scene model based on all simplified monomerized models. The method first constructs the initial monomerized models corresponding to each of the multiple three-dimensional monomers in the initial three-dimensional scene model, and then simplifies the points of each initial monomerized model based on the preset accuracy parameters to obtain the corresponding simplified monomerized model, and then determines the target three-dimensional scene model based on all simplified monomerized models. The entire simplification process does not require manual participation, has a high degree of automation, and effectively improves the efficiency of model simplification. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 It is a flowchart of the three-dimensional scene model simplification method provided in an embodiment of the present application.
[0027] Figure 2 It is a schematic diagram of the simplified effect provided by the embodiment of the present application.
[0028] Figure 3 It is a structural schematic diagram of a three-dimensional scene model simplification device provided in an embodiment of the present application.
[0029] Figure 4 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application.
[0030] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] 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.
[0032] Figure 1 A schematic diagram of a flow chart of a 3D scene model simplification method provided in an embodiment of the present application. Figure 1 , an embodiment of the present application provides a three-dimensional scene model simplification method, including the following steps 101-104.
[0033] Step 101: determine an initial data set according to model data corresponding to an initial three-dimensional scene model, where the initial three-dimensional scene model includes a plurality of three-dimensional monomers.
[0034] The initial 3D scene model refers to a 3D scene model that has not been simplified.
[0035] Optionally, the initial data set may include: an initial point data set, an initial surface data set, and an initial texture data set.
[0036] Exemplarily, the three-dimensional entity may be a building.
[0037] Optionally, the electronic device may first obtain an initial three-dimensional scene model file, and then read the initial three-dimensional scene model file to obtain model data corresponding to the initial three-dimensional scene model.
[0038] In this way, the electronic device can extract the initial data set from the model data corresponding to the initial three-dimensional scene model, and provide data support for the subsequent construction of initial monomerized models corresponding to multiple three-dimensional monomers.
[0039] Step 102: Determine geographic information corresponding to each of the plurality of three-dimensional monomers according to the map vector coordinate data corresponding to the initial three-dimensional scene model.
[0040] Optionally, the geographic information may include: spatial location information and geometric morphology information, etc.
[0041] Optionally, the electronic device may first obtain a map vector coordinate data file, and then read the map vector coordinate data file to obtain map vector coordinate data corresponding to the initial three-dimensional scene model.
[0042] In this way, the electronic device can extract the geographic information corresponding to each of the multiple three-dimensional monomers from the map vector coordinate data corresponding to the initial three-dimensional scene model, and provide data support for the subsequent construction of initial monomerized models corresponding to each of the multiple three-dimensional monomers.
[0043] It should be noted that the electronic device may execute step 101 and step 102 in any order. Step 101 may be executed first and then step 102; step 102 may be executed first and then step 101; or step 101 and step 102 may be executed simultaneously.
[0044] Step 103: for each three-dimensional monomer, construct an initial monomer model corresponding to the three-dimensional monomer according to the geographic information corresponding to the three-dimensional monomer and the initial data set; simplify the initial monomer model based on the preset accuracy parameters to obtain a simplified monomer model.
[0045] The initial monomeric model refers to the monomeric model that has not been simplified.
[0046] The preset accuracy parameter refers to the expected simplification accuracy during the simplification process of the three-dimensional scene model, which can be represented by α. Optionally, the preset accuracy parameter can be set before the electronic device leaves the factory, or can be user-defined, which is not specifically limited here.
[0047] The following operations are performed for each of the multiple three-dimensional monomers: the electronic device can construct an initial monomerized model corresponding to the three-dimensional monomer based on the geographic information corresponding to the three-dimensional monomer and the initial data set; then, the electronic device can simplify the initial monomerized model based on preset accuracy parameters to obtain a simplified monomerized model. The simplified monomerized model can meet the simplification requirements of the three-dimensional scene model. During the whole process, the amount of data to be processed is significantly reduced, effectively reducing the computational complexity.
[0048] It can be understood that the multiple three-dimensional monomers correspond one-to-one to the multiple simplified monomer models, and there are as many simplified monomer models as there are three-dimensional monomers.
[0049] In one embodiment, the initial data set may include: an initial point data set, an initial face data set and an initial texture data set. The electronic device constructs an initial monomerized model corresponding to the three-dimensional monomer based on the geographic information corresponding to the three-dimensional monomer and the initial data set, which may include: the electronic device determines the monomer polygon corresponding to the three-dimensional monomer based on the geographic information; the electronic device constructs a new point data set based on multiple point data located within the monomer polygon in the initial point data set; the electronic device filters the initial face data set based on the new point data set to obtain a new face data set; the electronic device filters the initial texture data set based on the new face data set to obtain a new texture data set; the electronic device constructs the initial monomerized model based on the new point data set, the new face data set and the new texture data set.
[0050] Specifically, the following operations are performed for each of the multiple three-dimensional monomers: the electronic device can determine the target ground area corresponding to the three-dimensional monomer based on the geographic information corresponding to the three-dimensional monomer, and then draw a monomer polygon corresponding to the three-dimensional monomer within the target ground area; then, the electronic device can filter the initial point data set based on the monomer polygon, that is, the electronic device filters out multiple point data located within the monomer polygon from the initial point data set, and then constructs a new point data set based on the multiple point data.
[0051] Optionally, the electronic device may mark multiple point data in the new point data set to obtain point identifiers (identifiers, IDs) corresponding to each of the multiple point data.
[0052] Next, the electronic device may filter the initial surface data set based on the new point data set. That is, the electronic device may filter out multiple surface data associated with multiple point data in the new point data set from the initial surface data set, and then construct a new surface data set based on the multiple surface data.
[0053] Then, the electronic device can filter the initial texture data set based on the new face data set, that is, the electronic device filters out the texture data corresponding to each of the multiple face data in the new face data set from the initial texture data set, and then constructs a new texture data set based on the multiple texture data.
[0054] In this way, the electronic device can construct an initial monomerized model corresponding to the three-dimensional monomer according to the new point data set, the new surface data set and the new texture data set.
[0055] In one embodiment, the electronic device performs point simplification on the initial monomerized model based on preset precision parameters to obtain a simplified monomerized model, which may include: for multiple point data in the initial monomerized model, the electronic device determines the target coordinates from the point coordinates corresponding to the multiple point data; for each point coordinate, the electronic device determines the sub-coordinate corresponding to the point coordinate; the electronic device determines the integer division result corresponding to the sub-coordinate based on the preset precision parameters and the target coordinate; the electronic device simplifies the sub-coordinate based on the integer division result to obtain simplified target sub-coordinates; the electronic device determines the simplified monomerized model based on all target sub-coordinates.
[0056] The target coordinates refer to the minimum coordinates of the point. Assuming that a spatial rectangular coordinate system is established for the initial monomer model, the target coordinates may include: the minimum Z coordinate, the minimum X coordinate, and the minimum Y coordinate. The sub-coordinates may include: the Z coordinate, the X coordinate, and the Y coordinate.
[0057] For example, assuming that the point coordinates are (x, y, h), the sub-coordinates corresponding to the point coordinates are: the Z coordinate is h, the X coordinate is x, and the Y coordinate is y. In other words, the point coordinates are not regarded as a whole, but are split into sub-coordinates, namely, the Z coordinate, the X coordinate, and the Y coordinate.
[0058] For multiple point data in the initial monomerized model, the electronic device determines the target coordinates (minimum Z coordinate, minimum X coordinate and minimum Y coordinate) from the point coordinates corresponding to each of the multiple point data; the following operations are performed for each point coordinate: the electronic device determines the sub-coordinates (Z coordinate, X coordinate and Y coordinate) corresponding to the point coordinate, and then determines the integer division result corresponding to the sub-coordinate according to the preset precision parameter and the target coordinate; then, the electronic device can use the integer division result to simplify the sub-coordinate to obtain the simplified target sub-coordinate. It can be understood that the number of simplified target sub-coordinates will be the same as the number of point coordinates.
[0059] In this way, the electronic device can determine a simplified monomer model according to all target sub-coordinates, and the simplified monomer model can meet the simplification requirements of the three-dimensional scene model.
[0060] In an embodiment, the target coordinates may include: a minimum Z coordinate, a minimum X coordinate, and a minimum Y coordinate, the sub-coordinates may include: a Z coordinate, an X coordinate, and a Y coordinate, and the electronic device determines the integer division results corresponding to the sub-coordinates according to the preset precision parameter and the target coordinates, which may include: the electronic device determines a first sub-integer division result corresponding to the Z coordinate according to the preset precision parameter and the minimum Z coordinate; the electronic device determines a second sub-integer division result corresponding to the X coordinate according to the preset precision parameter and the minimum X coordinate; the electronic device determines a third sub-integer division result corresponding to the Y coordinate according to the preset precision parameter and the minimum Y coordinate; and the electronic device determines the first sub-integer division result, the second sub-integer division result, and the third sub-integer division result as the integer division result.
[0061] The minimum Z coordinate refers to the smallest Z coordinate among the point coordinates corresponding to the multiple point data, which is used to represent the lowest point height and can be represented by h0.
[0062] The minimum X coordinate refers to the smallest X coordinate among the point coordinates corresponding to the plurality of point data, which can be represented by x0.
[0063] The minimum Y coordinate refers to the smallest Y coordinate among the point coordinates corresponding to the plurality of point data, which can be represented by y0.
[0064] It should be noted that the electronic device has no limitation on the timing for determining the first sub-division result, the second sub-division result and the third sub-division result.
[0065] Example 1: For any point coordinate among multiple point coordinates, assuming that the point coordinate is (x, y, h), the sub-coordinates corresponding to the point coordinate include: Z coordinate h, X coordinate x and Y coordinate y; the calculation formula for the first sub-division result corresponding to the Z coordinate h is: The calculation formula for the second subdivision result corresponding to the X coordinate x is: The calculation formula for the third subdivision result corresponding to the Y coordinate y is: In this way, the electronic device can determine the first sub-division result, the second sub-division result and the third sub-division result as the divisibility results corresponding to the sub-coordinates.
[0066] It is understandable that there are as many integer divisible results as there are point coordinates, which provides data support for the subsequent simplification of the sub-coordinates corresponding to the multiple point coordinates.
[0067] In one embodiment, the target sub-coordinates may include: a target Z coordinate, a target X coordinate, and a target Y coordinate. The electronic device simplifies the sub-coordinates based on the integer division result to obtain the simplified target sub-coordinates, which may include: the electronic device adopts a preset optimization method to simplify the Z coordinate based on the first sub-division result to obtain the simplified target Z coordinate; the electronic device adopts a preset optimization method to simplify the X coordinate based on the second sub-division result to obtain the simplified target X coordinate; the electronic device adopts a preset optimization method to simplify the Y coordinate based on the third sub-division result to obtain the simplified target Y coordinate; wherein the preset optimization method includes one of the following: an upward optimization method, a downward optimization method, and a close optimization method.
[0068] It should be noted that the electronic device has no limitation on the timing of determining the simplified target Z coordinate, the simplified target X coordinate, and the simplified target Y coordinate.
[0069] In combination with Example 1 and Example 2, assuming that the first sub-division result is A1, and the first remainder corresponding to the first sub-division result A1 is B1, if the preset optimization method is a downward optimization method, the electronic device simplifies the Z coordinate h to h0+A1α to obtain a simplified target Z coordinate; if the preset optimization method is an upward optimization method, the electronic device simplifies the Z coordinate h to h0+(A1+1)α to obtain a simplified target Z coordinate, and the above h0+A1α and h0+(A1+1)α can both be understood as normalized Z coordinates; if the preset optimization method is a similar optimization method, the electronic device can be based on the first remainder B1 corresponding to the first sub-division result A1. And α / 2, from h0+A1α and h0+(A1+1)α, determine the normalized Z coordinate closest to the Z coordinate h, and simplify the Z coordinate h to the closest normalized Z coordinate to obtain the simplified target Z coordinate. Specifically, if B1≥α / 2, then determine the normalized Z coordinate closest to the Z coordinate h as h0+(A1+1)α, and simplify the Z coordinate h to h0+(A1+1)α to obtain the simplified target Z coordinate; if B1<α / 2, then determine the normalized Z coordinate closest to the Z coordinate h as h0+A1α, and simplify the Z coordinate h to h0+A1α to obtain the simplified target Z coordinate.
[0070] In combination with Example 1 and Example 3, assuming that the second sub-division result is A2, and the second remainder corresponding to the second sub-division result A2 is B2, if the preset optimization method is a downward optimization method, the electronic device simplifies the X coordinate x to x0+A2α to obtain a simplified target X coordinate; if the preset optimization method is an upward optimization method, the electronic device simplifies the X coordinate x to x0+(A2+1)α to obtain a simplified target X coordinate, and the above x0+A2α and x0+(A2+1)α can both be understood as normalized X coordinates; if the preset optimization method is a similar optimization method, the electronic device can be based on the second remainder B2 corresponding to the second sub-division result A2. and α / 2, from x0+A2α and x0+(A2+1)α, determine the normalized X coordinate closest to the X coordinate x, and simplify the X coordinate x to the normalized X coordinate closest to the X coordinate x to obtain the simplified target X coordinate. Specifically, if B2≥α / 2, determine the normalized X coordinate closest to the X coordinate x as x0+(A2+1)α, and simplify the X coordinate x to x0+(A2+1)α to obtain the simplified target X coordinate; if B2<α / 2, determine the normalized X coordinate closest to the X coordinate x as x0+A2α, and simplify the X coordinate x to x0+A2α to obtain the simplified target X coordinate.
[0071] In combination with Example 1 and Example 4, assuming that the third sub-division result is A3, and the third remainder corresponding to the third sub-division result A3 is B3, if the preset optimization method is a downward optimization method, the electronic device simplifies the Y coordinate y to y0+A3α to obtain the simplified target Y coordinate; if the preset optimization method is an upward optimization method, the electronic device simplifies the Y coordinate y to y0+(A3+1)α to obtain the simplified target Y coordinate, and the above y0+A3α and y0+(A3+1)α can both be understood as normalized Y coordinates; if the preset optimization method is a similar optimization method, the electronic device can be based on the third remainder B3 corresponding to the third sub-division result A3. And α / 2, from y0+A3α and y0+(A3+1)α, determine the normalized Y coordinate closest to the Y coordinate y, and simplify the Y coordinate y to the closest normalized Y coordinate to obtain the simplified target Y coordinate. Specifically, if B3≥α / 2, then determine the normalized Y coordinate closest to the Y coordinate y as y0+(A3+1)α, and simplify the Y coordinate y to y0+(A3+1)α to obtain the simplified target Y coordinate; if B3<α / 2, then determine the normalized Y coordinate closest to the Y coordinate y as y0+A3α, and simplify the Y coordinate y to y0+A3α to obtain the simplified target Y coordinate.
[0072] In this way, the electronic device can obtain the simplified target Z coordinate, target X coordinate and target Y coordinate. During the whole simplification process, for the point coordinates corresponding to the multiple point data, the electronic device does not simplify the point coordinates as a whole, but splits the point coordinates into Z coordinates, X coordinates and Y coordinates, and simplifies them separately, which significantly reduces the calculation complexity and makes the simplification process easier to implement.
[0073] In one embodiment, the electronic device determines a simplified monomerized model based on all target sub-coordinates, which may include: the electronic device determines the initial point data corresponding to all target sub-coordinates; the electronic device filters the repeated initial point data in all the initial point data to obtain multiple target point data; the electronic device screens the multiple surface data in the initial monomerized model based on the multiple target point data to obtain multiple target surface data; the electronic device determines the simplified monomerized model based on the multiple target point data and the multiple target surface data.
[0074] After determining all simplified target sub-coordinates, the electronic device first determines initial point data corresponding to all target sub-coordinates; then, the electronic device filters repeated initial point data in all initial point data to obtain multiple target point data.
[0075] Optionally, the electronic device may re-mark the multiple target point data to obtain the latest point ID corresponding to each of the multiple target point data.
[0076] Next, the electronic device may filter the multiple surface data in the initial monomerized model based on the multiple target point data. That is, the electronic device may filter out the multiple target surface data associated with the multiple target point data from the multiple surface data.
[0077] Optionally, for the multiple surface data in the initial monomerized model, the electronic device may also directly filter the repeated surface data in the multiple surface data to obtain multiple target surface data.
[0078] Then, the electronic device can construct a simplified monomer model based on multiple target point data and multiple target surface data. The simplified monomer model can meet the simplification requirements of the three-dimensional scene model. During the whole process, the amount of data required to be processed is significantly reduced, effectively reducing the computational complexity.
[0079] Step 104: Determine the target three-dimensional scene model based on all simplified monomer models.
[0080] The target three-dimensional scene model refers to a simplified three-dimensional scene model.
[0081] After determining the simplified monomer models corresponding to the multiple three-dimensional monomers, the electronic device can determine the target three-dimensional scene model according to all the simplified monomer models. The entire simplification process does not require manual participation, has a high degree of automation, and effectively improves the efficiency of model simplification.
[0082] In an embodiment of the present application, an initial data set is determined according to model data corresponding to an initial three-dimensional scene model, and the initial three-dimensional scene model includes multiple three-dimensional monomers; geographic information corresponding to each of the multiple three-dimensional monomers is determined according to map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer is constructed according to the geographic information corresponding to the three-dimensional monomer and the initial data set; based on a preset accuracy parameter, the initial monomerized model is point-simplified to obtain a simplified monomerized model; based on all simplified monomerized models, a target three-dimensional scene model is determined. This method first constructs initial monomerized models corresponding to each of the multiple three-dimensional monomers in the initial three-dimensional scene model, and then based on a preset accuracy parameter, each initial monomerized model is point-simplified to obtain a corresponding simplified monomerized model, and then based on all simplified monomerized models, a target three-dimensional scene model is determined. The entire simplification process does not require human participation, has a high degree of automation, and effectively improves the efficiency of model simplification.
[0083] The embodiments of the present application are further described in conjunction with the following examples.
[0084] Take a single side of a 3D scene model as an example. Figure 2 Shown is a schematic diagram of the simplified effect provided by an embodiment of the present application. Figure 2 (a) is the top surface of the initial 3D scene model, which is a high-precision circular surface composed of about 300 million points. The preset precision parameter is 0.0001. Figure 2 (b)-(d) are simplified effect diagrams of the three-dimensional scene model simplification method proposed in the embodiment of the present application, that is, the top surface of the target three-dimensional scene model under different preset accuracy parameters; Figure 2 (b) is the top surface of the target 3D scene model corresponding to the preset accuracy parameter of 0.01. That is to say, the top surface accuracy shown in (b) is simplified to 100 times that of the top surface accuracy shown in (a). After simplification, the top surface shown in (b) consists of about 30,000 points, and the simplified effect is still relatively smooth. Figure 2 (c) is the top surface of the target 3D scene model corresponding to the preset precision parameter of 0.02. That is to say, the top surface precision shown in (c) is simplified to 200 times of that shown in (a). After simplification, the top surface shown in (c) consists of about 7000 points and begins to show some jagged effects. Figure 2 (d) is the top surface of the target three-dimensional scene model corresponding to the preset accuracy parameter of 0.05. That is to say, the top surface accuracy shown in (d) is simplified to 500 times the top surface accuracy shown in (a). After simplification, the top surface shown in (d) consists of about 1000 points, and the jagged effect is obvious, but it can still be seen that the figure is close to a circle.
[0085] from Figure 2 It can be seen from (b)-(d) that the three-dimensional scene model simplification method proposed in the embodiment of the present application can meet the simplification requirements of the three-dimensional scene model, and can significantly reduce the amount of data required to be processed, effectively reducing the computational complexity.
[0086] The following is a description of a three-dimensional scene model simplification device provided in an embodiment of the present application. The three-dimensional scene model simplification device described below and the three-dimensional scene model simplification method described above can be referenced to each other.
[0087] Figure 3 This is a schematic diagram of the structure of the 3D scene model simplification device provided in the embodiment of the present application. Figure 3 , an embodiment of the present application provides a three-dimensional scene model simplification device, including the following data determination module 301 and model simplification module 302.
[0088] The data determination module 301 is used to determine the initial data set based on the model data corresponding to the initial three-dimensional scene model, where the initial three-dimensional scene model includes multiple three-dimensional monomers; and to determine the geographic information corresponding to each of the multiple three-dimensional monomers based on the map vector coordinate data corresponding to the initial three-dimensional scene model.
[0089] The model simplification module 302 is used to construct an initial monomerized model corresponding to each three-dimensional monomer according to the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and the target three-dimensional scene model is determined based on all simplified monomerized models.
[0090] Optionally, the initial data set includes: an initial point data set, an initial face data set and an initial texture data set. The model simplification module 302 is specifically used to determine the monomer polygon corresponding to the three-dimensional monomer based on the geographic information; construct a new point data set based on multiple point data located within the monomer polygon in the initial point data set; based on the new point data set, filter the initial face data set to obtain a new face data set; based on the new face data set, filter the initial texture data set to obtain a new texture data set; and construct the initial monomerized model based on the new point data set, the new face data set and the new texture data set.
[0091] Optionally, the model simplification module 302 is specifically used to determine the target coordinates from the point coordinates corresponding to each of the multiple point data in the initial monomerized model; determine the sub-coordinates corresponding to each point coordinate; determine the integer division result corresponding to the sub-coordinate based on the preset precision parameter and the target coordinate; simplify the sub-coordinate based on the integer division result to obtain simplified target sub-coordinates; and determine the simplified monomerized model based on all target sub-coordinates.
[0092] Optionally, the target coordinates include: a minimum Z coordinate, a minimum X coordinate and a minimum Y coordinate, and the sub-coordinates include: a Z coordinate, an X coordinate and a Y coordinate. The model simplification module 302 is specifically used to determine a first sub-divisibility result corresponding to the Z coordinate according to the preset precision parameter and the minimum Z coordinate; determine a second sub-divisibility result corresponding to the X coordinate according to the preset precision parameter and the minimum X coordinate; determine a third sub-divisibility result corresponding to the Y coordinate according to the preset precision parameter and the minimum Y coordinate; and determine the first sub-divisibility result, the second sub-divisibility result and the third sub-divisibility result as the divisibility result.
[0093] Optionally, the target sub-coordinates include: a target Z coordinate, a target X coordinate and a target Y coordinate. The model simplification module 302 is specifically configured to adopt a preset optimization method to simplify the Z coordinate based on the first sub-division result to obtain the simplified target Z coordinate; adopt the preset optimization method to simplify the X coordinate based on the second sub-division result to obtain the simplified target X coordinate; adopt the preset optimization method to simplify the Y coordinate based on the third sub-division result to obtain the simplified target Y coordinate; wherein the preset optimization method includes one of the following: an upward optimization method, a downward optimization method and a similar optimization method.
[0094] Optionally, the model simplification module 302 is specifically used to determine the initial point data corresponding to each of the target sub-coordinates; filter the repeated initial point data in all the initial point data to obtain multiple target point data; based on the multiple target point data, screen the multiple surface data in the initial monomerized model to obtain multiple target surface data; determine the simplified monomerized model based on the multiple target point data and the multiple target surface data.
[0095] The terminal involved in the embodiments of the present application may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem, etc. In different systems, the name of the terminal device may also be different. For example, in a 5G system, the terminal device may be called a user equipment (UE).
[0096] Figure 4 The schematic diagram of the structure of the terminal provided in the embodiment of the present application is shown in FIG. Figure 4 , an embodiment of the present application further provides a terminal, which may include: a memory 410, a transceiver 420 and a processor 430.
[0097] The memory 410 is used to store computer programs; the transceiver 420 is used to send and receive data under the control of the processor 430; the processor 430 is used to read the computer program in the memory 410 and perform the following operations.
[0098] An initial data set is determined based on model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes multiple three-dimensional monomers; geographic information corresponding to each of the multiple three-dimensional monomers is determined based on map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer is constructed based on the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and a target three-dimensional scene model is determined based on all simplified monomerized models.
[0099] Among them, Figure 4 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 430 and various circuits of memory represented by memory 410 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 420 may be a plurality of components, including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 440 may also be an interface capable of externally connecting to the required internal devices.
[0100] The processor 430 is responsible for managing the bus architecture and general processing, and the memory 410 can store data used by the processor 430 when performing operations.
[0101] The processor 430 is used to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions by calling the computer program stored in the memory 410. The processor and the memory may also be arranged physically separately.
[0102] It should be noted here that the terminal provided in the embodiment of the present application can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0103] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the three-dimensional scene model simplification method, including the following steps.
[0104] An initial data set is determined based on model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes multiple three-dimensional monomers; geographic information corresponding to each of the multiple three-dimensional monomers is determined based on map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer is constructed based on the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and a target three-dimensional scene model is determined based on all simplified monomerized models.
[0105] In addition, the logic instructions in the above-mentioned memory 530 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 this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable 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 application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0106] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program. The computer program 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 steps of the three-dimensional scene model simplification method provided in the above embodiments, including the following steps.
[0107] An initial data set is determined based on model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes multiple three-dimensional monomers; geographic information corresponding to each of the multiple three-dimensional monomers is determined based on map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer is constructed based on the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and a target three-dimensional scene model is determined based on all simplified monomerized models.
[0108] On the other hand, an embodiment of the present application also provides a processor-readable storage medium, which stores a computer program. The computer program is used to enable the processor to execute the steps of the three-dimensional scene model simplification method provided in the above embodiments, including the following steps.
[0109] An initial data set is determined based on model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes multiple three-dimensional monomers; geographic information corresponding to each of the multiple three-dimensional monomers is determined based on map vector coordinate data corresponding to the initial three-dimensional scene model; for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer is constructed based on the geographic information corresponding to the three-dimensional monomer and the initial data set; based on preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and a target three-dimensional scene model is determined based on all simplified monomerized models.
[0110] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0111] 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. Those of ordinary skill in the art may understand and implement it without creative effort.
[0112] 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, it 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.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application 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 application.
Claims
1. A method for simplifying a three-dimensional scene model, characterized in that: include: Determining an initial data set according to model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes a plurality of three-dimensional monomers; Determining geographic information corresponding to each of the plurality of three-dimensional monomers according to the map vector coordinate data corresponding to the initial three-dimensional scene model; For each three-dimensional monomer, construct an initial monomer model corresponding to the three-dimensional monomer according to the geographic information corresponding to the three-dimensional monomer and the initial data set; Based on the preset accuracy parameters, the initial monomerized model is point-simplified to obtain a simplified monomerized model; The target three-dimensional scene model is determined based on all simplified monomer models.
2. The three-dimensional scene model simplification method according to claim 1, characterized in that: The initial data set includes: an initial point data set, an initial surface data set and an initial texture data set. The initial monomer model corresponding to the three-dimensional monomer is constructed according to the geographic information corresponding to the three-dimensional monomer and the initial data set, including: Determine, according to the geographic information, a monomer polygon corresponding to the three-dimensional monomer; Constructing a new point data set according to a plurality of point data located within the monomer polygon in the initial point data set; Based on the new point data set, the initial surface data set is screened to obtain a new surface data set; Based on the new face data set, the initial texture data set is screened to obtain a new texture data set; The initial monomerized model is constructed according to the new point data set, the new surface data set and the new texture data set.
3. The three-dimensional scene model simplification method according to claim 2, characterized in that: The step of performing point simplification on the initial monomerized model based on the preset accuracy parameter to obtain a simplified monomerized model includes: For a plurality of point data in the initial monomerized model, determining target coordinates from point coordinates corresponding to each of the plurality of point data; For each point coordinate, determine the sub-coordinate corresponding to the point coordinate; determine the integer division result corresponding to the sub-coordinate according to the preset precision parameter and the target coordinate; simplify the sub-coordinate based on the integer division result to obtain the simplified target sub-coordinate; The simplified monomerized model is determined according to all target sub-coordinates.
4. The three-dimensional scene model simplification method according to claim 3, characterized in that: The target coordinates include: a minimum Z coordinate, a minimum X coordinate and a minimum Y coordinate, the sub-coordinates include: a Z coordinate, an X coordinate and a Y coordinate, and determining the integer division result corresponding to the sub-coordinates according to the preset precision parameter and the target coordinates includes: determining a first sub-integer division result corresponding to the Z coordinate according to the preset precision parameter and the minimum Z coordinate; Determine a second sub-division result corresponding to the X coordinate according to the preset precision parameter and the minimum X coordinate; Determine a third sub-division result corresponding to the Y coordinate according to the preset precision parameter and the minimum Y coordinate; The first sub-division result, the second sub-division result and the third sub-division result are determined as the divisibility result.
5. The three-dimensional scene model simplification method according to claim 4, characterized in that: The target sub-coordinates include: a target Z coordinate, a target X coordinate, and a target Y coordinate. Based on the integer division result, the sub-coordinates are simplified to obtain simplified target sub-coordinates, including: Using a preset optimization method, simplifying the Z coordinate based on the first subdivision result to obtain a simplified target Z coordinate; Using the preset optimization method, simplifying the X coordinate based on the second sub-division result to obtain the simplified target X coordinate; Using the preset optimization method, simplifying the Y coordinate based on the third subdivision result to obtain the simplified target Y coordinate; The preset optimization method includes one of the following: an upward optimization method, a downward optimization method, and a similar optimization method.
6. The three-dimensional scene model simplification method according to claim 3, characterized in that: The step of determining the simplified monomerized model according to all target sub-coordinates includes: Determine the initial point data corresponding to each of the target sub-coordinates; Filtering repeated initial point data in all initial point data to obtain multiple target point data; Based on the multiple target point data, multiple surface data in the initial monomerized model are screened to obtain multiple target surface data; The simplified monomerized model is determined according to the multiple target point data and the multiple target surface data.
7. A three-dimensional scene model simplification device, characterized in that: include: A data determination module, used to determine an initial data set according to model data corresponding to an initial three-dimensional scene model, wherein the initial three-dimensional scene model includes a plurality of three-dimensional monomers; Determining geographic information corresponding to each of the plurality of three-dimensional monomers according to the map vector coordinate data corresponding to the initial three-dimensional scene model; A model simplification module, for constructing, for each three-dimensional monomer, an initial monomerized model corresponding to the three-dimensional monomer according to the geographic information corresponding to the three-dimensional monomer and the initial data set; Based on the preset accuracy parameters, the initial monomerized model is point simplified to obtain a simplified monomerized model; and the target three-dimensional scene model is determined according to all the simplified monomerized models.
8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the three-dimensional scene model simplification method according to any one of claims 1 to 6 are 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 steps of the three-dimensional scene model simplification method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the three-dimensional scene model simplification method according to any one of claims 1 to 6 are implemented.
