CN116128903A - Smart city three-dimensional scene tiled segmentation method - Google Patents

Smart city three-dimensional scene tiled segmentation method Download PDF

Info

Publication number
CN116128903A
CN116128903A CN202310403511.7A CN202310403511A CN116128903A CN 116128903 A CN116128903 A CN 116128903A CN 202310403511 A CN202310403511 A CN 202310403511A CN 116128903 A CN116128903 A CN 116128903A
Authority
CN
China
Prior art keywords
tile
tiled
coordinate
cube
dimensional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310403511.7A
Other languages
Chinese (zh)
Other versions
CN116128903B (en
Inventor
柳晓华
朱旭平
宋彬
何文武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feidu Technology Co ltd
Original Assignee
Beijing Feidu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Feidu Technology Co ltd filed Critical Beijing Feidu Technology Co ltd
Priority to CN202310403511.7A priority Critical patent/CN116128903B/en
Publication of CN116128903A publication Critical patent/CN116128903A/en
Application granted granted Critical
Publication of CN116128903B publication Critical patent/CN116128903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A30/00Adapting or protecting infrastructure or their operation
    • Y02A30/60Planning or developing urban green infrastructure

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for tiling and segmenting a three-dimensional scene of a smart city, which comprises the steps of regularly meshing a three-dimensional geographic space of three-dimensional scene data of the smart city to obtain position information of a plurality of tiled cubes; and determining each plane of the corresponding tiled cube according to the position information of each tiled cube, and dividing the three-dimensional scene data by using each plane of each tiled cube to obtain the scene data of each tiled cube. According to the method, the data files of all three-dimensional scenes are taken as a whole in a three-dimensional geographic space, regular grid division is performed, then the three-dimensional scenes are cut according to the divided regular grids, the divided tile data can be loaded in a time-sharing and partition mode according to requirements, the loaded data quantity is reduced, and the frame rate of rendering after loading is improved.

Description

Smart city three-dimensional scene tiled segmentation method
Technical Field
The invention relates to the technical field of three-dimensional scene segmentation, in particular to a method for tiling and segmenting a three-dimensional scene of a smart city.
Background
Along with the mass promotion of the business demands of smart cities in recent years, mass BIM models, 3DMax landscape models and real-scene three-dimensional models are produced and arranged in various cities. The BIM model is used for describing newly built communities, businesses, public facility buildings and environments thereof; the 3DMax landscape model is used for expressing the landscape of old buildings, streets and the like which lack the BIM model; the real three-dimensional is used for expressing a three-dimensional earth surface and ground object model of the whole city; the three-dimensional models are data which are commonly used in smart city business and cover all-element data of the whole city, and the data volume is large and the distribution is extremely uneven. These three-dimensional data may be aggregated into tens of millions of triangular meshes within a region of thousands of square meters, and also with mesh properties (e.g., color, texture, markings, etc.). The three-dimensional data of the whole city can reach the TB level, three-dimensional data format files generated by various manufacturing software and platforms are basically at the hundred megabits level, and data files exceeding GB are also frequently generated, so that the three-dimensional data format files are too huge when rendering and loading or network transmission are carried out, and the data transmission and loading are at the minute or even hour level.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method for tiling and dividing a three-dimensional scene of a smart city.
In order to achieve the aim of the invention, the invention adopts the following technical scheme:
a tile segmentation method for a three-dimensional scene of a smart city comprises the following steps:
s1, carrying out regular grid division on a three-dimensional geographic space of three-dimensional scene data of a smart city to obtain position information of a plurality of tiled cubes;
s2, determining each plane of the corresponding tiled cube according to the position information of each tiled cube, and dividing the three-dimensional scene data by using each plane of each tiled cube to obtain the scene data of each tiled cube.
Optionally, step S1 specifically includes the following substeps:
s11, acquiring three-dimensional coordinates of all data files in the three-dimensional scene data of the smart city;
s12, calculating the maximum value and the minimum value of the three-dimensional coordinates of all the data files;
s13, determining a three-dimensional geographic space boundary box of the three-dimensional scene data according to the maximum value and the minimum value of the three-dimensional coordinates;
s14, establishing a three-dimensional coordinate system by using a three-dimensional geographic space boundary frame, and carrying out regular grid division along the coordinate axis direction according to a set step length to obtain the number of divided tiled cubes and the coordinate of a corresponding coordinate axis;
s15, determining the position information of the plurality of tiled cubes according to the number of the partitioned tiled cubes and the coordinates of the corresponding coordinate axes.
Optionally, the determining method of the number of the tiled cubes is as follows:
n=nx×ny×nz;
nx=(posMax.X-posMin.X)/tile_size;
ny=(posMax.Y-posMin.Y)/tile_size;
nz=(posMax.Z-posMin.Z)/tile_size;
wherein n is the number of tiled cubes, nx is the number of regular grid divisions along the X coordinate axis direction, ny is the number of regular grid divisions along the Y coordinate axis direction, nz is the number of regular grid divisions along the Z coordinate axis direction, posMax.X is the coordinate maximum value of the data file on the X coordinate axis, posMin.X is the coordinate minimum value of the data file on the X coordinate axis, posMax.Y is the coordinate maximum value of the data file on the Y coordinate axis, posMin.Y is the coordinate minimum value of the data file on the Y coordinate axis, posMax.Z is the coordinate maximum value of the data file on the Z coordinate axis, posMin.Z is the coordinate minimum value of the data file on the Z coordinate axis, and tile_size is a set step size.
Optionally, the determining method of the position information of the tiled cube includes:
tile_min.X = posMin.X + i × tile_size;
tile_min.Y = posMin.Y + j × tile_size;
tile_min.Z =posMin.Z + k × tile_size;
tile_max.X = posMin.X + (i +1)× tile_size;
tile_max.Y = posMin.Y + (j +1) × tile_size;
tile_max.Z = posMin.Z + (k +1) × tile_size;
wherein tile_min.X is the minimum coordinate value of the tiled cube on the X coordinate axis, tile_min.Y is the minimum coordinate value of the tiled cube on the Y coordinate axis, tile_min.Z is the minimum coordinate value of the tiled cube on the Z coordinate axis, tile_max.X is the maximum coordinate value of the tiled cube on the X coordinate axis, tile_max.Y is the maximum coordinate value of the tiled cube on the Y coordinate axis, tile_max.Z is the maximum coordinate value of the tiled cube on the Z coordinate axis, and i, j, k are three-dimensional labels of the tiled cube.
Optionally, step S2 specifically includes the following substeps:
s21, determining each plane of the corresponding tiled cube according to the position information of each tiled cube;
s22, intersecting each plane of the tiled cube with each triangle grid in the three-dimensional scene data in sequence, and then taking the intersection of all triangles in the normal direction of each plane to obtain the scene data of the tiled cube.
Optionally, the determining method of each plane of the tiled cube is as follows:
P0:{a=1,b=0,c=0,d=tile_min.X};
P1:{a=-1,b=0,c=0,d=-tile_min.X};
P2:{a=0,b=1,c=0,d=tile_min.Y};
P3:{a=0,b=-1,c=0,d=-tile_min.Y};
P4:{a=0,b=0,c=1,d=tile_min.Z};
P5:{a=0,b=0,c=-1,d=-tile_min.Z};
wherein P0, P1, P2, P3, P4, P5 are six planes of the tiled cube, a, b, c, d are four components of homogeneous coordinates of the planes, tile_min.X is a minimum coordinate of the tiled cube on the X coordinate axis, tile_min.Y is a minimum coordinate of the tiled cube on the Y coordinate axis, and tile_min.Z is a minimum coordinate of the tiled cube on the Z coordinate axis.
Optionally, step S22 specifically includes the following substeps:
s221, obtaining vertex coordinates and corresponding vertex attributes of each triangle mesh in the three-dimensional scene data;
s222, sequentially calculating the intersection points of each plane of the tiled cube and three sides of the triangular mesh;
s223, taking all intersection points of the forward space of the cutting plane, reorganizing the cut triangle, and outputting the triangle to the cut triangle net;
s224, judging whether the intersection point is continuous appearance attribute or discrete attribute information;
if the appearance attribute of the continuity is the appearance attribute, interpolating according to the vertex attributes of the two endpoints of the corresponding edge to obtain texture coordinates and normal vectors of the cut triangle;
if the attribute information is discrete, the discrete attribute information is copied to a new triangular surface and a new vertex.
Optionally, step S222 specifically includes the following substeps:
s2221, respectively calculating the distance from two endpoints of each side of the triangle mesh to the plane of the tiled cube;
s2222, judging whether the vector product of the distances from the two endpoints to the plane of the tiled cube is smaller than 0; if yes, the intersection point exists between the edge and the corresponding plane of the tiled cube, and step S2223 is executed; otherwise, the intersection point of the edge and the corresponding plane of the tiled cube does not exist, and the step S2221 is returned;
s2223, calculating the length proportion of the line segments according to the distance from the two endpoints to the plane of the tiled cube;
s2224, calculating the intersection point of the edge and the corresponding plane of the tiled cube according to the calculated line segment length proportion.
Optionally, the calculating method of the length proportion of the line segment is as follows:
s=|d0|/(|d0|+|d1|);
where s is the length ratio of the line segments, d0 is the distance from one end point of the edge to the plane of the tiled cube, and d1 is the distance from the other end point of the edge to the plane of the tiled cube.
Optionally, the method for calculating the intersection point of the edge and the corresponding plane of the tiled cube is as follows:
I=v0×(1-s)+v1×s;
wherein I is the intersection point coordinate, v0 is one endpoint coordinate of the edge, and v1 is the other endpoint coordinate of the edge.
The invention has the following beneficial effects:
according to the method, the data files of all three-dimensional scenes are taken as a whole in a three-dimensional geographic space, regular grid division is performed, then the three-dimensional scenes are cut according to the divided regular grids, the divided tile data can be loaded in a time-sharing and partition mode according to requirements, the loaded data quantity is reduced, and the frame rate of rendering after loading is improved.
Drawings
FIG. 1 is a flow chart of a method for tiling and segmenting a three-dimensional scene of a smart city according to the present invention;
FIG. 2 is a schematic illustration of intersection of a planar surface with a triangular mesh in accordance with the present invention;
FIG. 3 is a schematic diagram of the edge-to-plane distance of a triangle in the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
The method for tiling and dividing the three-dimensional scene of the smart city is provided, and the three-dimensional scene of the whole city is taken as a whole, and is integrated into zero, namely, tiled. The method can be used for carrying out light weight and building a three-dimensional scene pyramid LOD on the basis of tile data, so that the problem that three-dimensional data required by scheduling and rendering of mass three-dimensional scenes of the smart city in a time-sharing and partition mode can be solved, and the mass three-dimensional data of the smart city can be shared and cooperated through the web.
As shown in fig. 1, the method for tiling and segmenting the three-dimensional scene of the smart city provided by the embodiment of the invention comprises the following steps S1 and S2:
s1, carrying out regular grid division on a three-dimensional geographic space of three-dimensional scene data of a smart city to obtain position information of a plurality of tiled cubes;
in an alternative embodiment of the invention, step S1 specifically comprises the following sub-steps:
s11, acquiring three-dimensional coordinates of all data files in the three-dimensional scene data of the smart city;
s12, calculating the maximum value and the minimum value of the three-dimensional coordinates of all the data files;
s13, determining a three-dimensional geographic space boundary box of the three-dimensional scene data according to the maximum value and the minimum value of the three-dimensional coordinates;
specifically, the embodiment first calculates the maximum value and the minimum value of the three-dimensional coordinates of each data file, then merges the maximum value and the minimum value of the three-dimensional coordinates of all the data files, namely takes the maximum value of each component in the maximum values of all the data files as the maximum value of the three-dimensional geographic space boundary frame, and takes the minimum value of each component in the minimum values of all the data files as the minimum value of the three-dimensional geographic space boundary frame, thereby obtaining the three-dimensional geographic space boundary frame of the three-dimensional scene data, wherein the three-dimensional geographic space boundary frame is a three-dimensional cube.
S14, establishing a three-dimensional coordinate system by using a three-dimensional geographic space boundary frame, and carrying out regular grid division along the coordinate axis direction according to a set step length to obtain the number of divided tiled cubes and the coordinate of a corresponding coordinate axis;
specifically, the present embodiment marks the three-dimensional geospatial bounding box as aabb_scene { posMin, posMax }, where posMin is the bottom left point of aabb_scene and posMax is the top right point of aabb_scene. The lower left point posMin of the aabb_scene is taken as the origin O of the three-dimensional scene, and then the three orthogonal axes of the aabb_scene are taken as the three orthogonal coordinate axes aX, aY, aZ of the three-dimensional scene.
Determining the step length of regular division along the coordinate axis direction of the three-dimensional scene, and marking the step length as tile_size with the unit of meter. tile size is also the size of tile, which can be understood as a cube that is not stacked along the coordinate axis, with the sides being tile size, which is typically 250 meters.
Firstly, determining the maximum number of tiles capable of being placed in the directions of three coordinate axes aX, aY and aZ, respectively marking as nx, ny and nz, wherein the determining method comprises the following steps:
nx=(posMax.X-posMin.X)/tile_size;
ny=(posMax.Y-posMin.Y)/tile_size;
nz=(posMax.Z-posMin.Z)/tile_size;
wherein nx is the number of regular grid divisions along the X coordinate axis direction, ny is the number of regular grid divisions along the Y coordinate axis direction, nz is the number of regular grid divisions along the Z coordinate axis direction, posMax.X is the coordinate maximum value of the data file on the X coordinate axis, posMin.X is the coordinate minimum value of the data file on the X coordinate axis, posMax.Y is the coordinate maximum value of the data file on the Y coordinate axis, posMin.Y is the coordinate minimum value of the data file on the Y coordinate axis, posMax.Z is the coordinate maximum value of the data file on the Z coordinate axis, posMin.Z is the coordinate minimum value of the data file on the Z coordinate axis, and tile_size is the set step size.
Then the entire three-dimensional scene will have a total of n tiles, n=nx×ny×nz.
S15, determining the position information of the plurality of tiled cubes according to the number of the partitioned tiled cubes and the coordinates of the corresponding coordinate axes.
Specifically, the position of any tile in this embodiment is determined by tile_min and tile_max, and the determining method is as follows:
tile_min.X = posMin.X + i × tile_size;
tile_min.Y = posMin.Y + j × tile_size;
tile_min.Z =posMin.Z + k × tile_size;
tile_max.X = posMin.X + (i +1)× tile_size;
tile_max.Y = posMin.Y + (j +1) × tile_size;
tile_max.Z = posMin.Z + (k +1) × tile_size;
wherein tile_min.X is the minimum coordinate value of the tiled cube on the X coordinate axis, tile_min.Y is the minimum coordinate value of the tiled cube on the Y coordinate axis, tile_min.Z is the minimum coordinate value of the tiled cube on the Z coordinate axis, tile_max.X is the maximum coordinate value of the tiled cube on the X coordinate axis, tile_max.Y is the maximum coordinate value of the tiled cube on the Y coordinate axis, tile_max.Z is the maximum coordinate value of the tiled cube on the Z coordinate axis, i, j, k are three-dimensional labels of the tiled cube, and integers from 0 to nx-1,0 to ny-1, and 0 to nz-1 are taken respectively.
The position information of all the tiled cubes obtained according to the method completes the regular division of the whole three-dimensional scene.
S2, determining each plane of the corresponding tiled cube according to the position information of each tiled cube, and dividing the three-dimensional scene data by using each plane of each tiled cube to obtain the scene data of each tiled cube.
In an alternative embodiment of the invention, step S2 specifically comprises the following sub-steps:
s21, determining each plane of the corresponding tiled cube according to the position information of each tiled cube;
specifically, each tile may be expressed by a cube, specifically two three-dimensional coordinates, denoted tile_aab { tile_min, tile_max }. The cube tile_aab of each tile has six planes parallel to the coordinate axes, and the determination method is as follows:
tile_plan[6]=
P0:{a=1,b=0,c=0,d=tile_min.X};
P1:{a=-1,b=0,c=0,d=-tile_min.X};
P2:{a=0,b=1,c=0,d=tile_min.Y};
P3:{a=0,b=-1,c=0,d=-tile_min.Y};
P4:{a=0,b=0,c=1,d=tile_min.Z};
P5:{a=0,b=0,c=-1,d=-tile_min.Z};
wherein P0, P1, P2, P3, P4, P5 are six planes of the tiled cube, a, b, c, d are four components of homogeneous coordinates of the planes, tile_min.X is a minimum coordinate of the tiled cube on the X coordinate axis, tile_min.Y is a minimum coordinate of the tiled cube on the Y coordinate axis, and tile_min.Z is a minimum coordinate of the tiled cube on the Z coordinate axis.
S22, intersecting each plane of the tiled cube with each triangle grid in the three-dimensional scene data in sequence, and then taking the intersection of all triangles in the normal direction of each plane to obtain the scene data of the tiled cube.
Specifically, in order to realize tiling of the whole three-dimensional scene, the embodiment divides the whole three-dimensional scene by using six planes of each tiled cube tile_aabb, namely, the six planes of each tiled cube tile_aabb are used for intersecting with the three-dimensional scene, then, intersections of all triangles in the normal direction of each plane are taken, namely, three-dimensional data of the tiled cube are obtained, and files of tiles are written.
A three-dimensional scene may be abstracted as a stack of triangular meshes with vertex and face properties, which may be recorded in a array container. Any triangle with an attribute in the triangle mesh is denoted as tri_att. The tiling of the three-dimensional scene can be simplified into the problem of intersection of any triangle tri_att with attributes and any tiled cube tile_aab, namely six planes of the tiled cube tile_aab are respectively intersected with the triangle tri_att, the part of the triangle tri_att in the normal direction of the plane is taken, and the part of the triangle tri_att in the opposite direction of the plane is directly discarded. The triangle tri_att part left after the completion of the circular intersection of six planes of the tile_aabb is the scene data of the tile cube.
The step S22 specifically includes the following sub-steps:
s221, obtaining vertex coordinates and corresponding vertex attributes of each triangle mesh in the three-dimensional scene data;
s222, sequentially calculating the intersection points of each plane of the tiled cube and three sides of the triangular mesh; the method specifically comprises the following sub-steps:
s2221, respectively calculating the distance from two endpoints of each side of the triangle mesh to the plane of the tiled cube;
s2222, judging whether the vector product of the distances from the two endpoints to the plane of the tiled cube is smaller than 0; if yes, the intersection point exists between the edge and the corresponding plane of the tiled cube, and step S2223 is executed; otherwise, the intersection point of the edge and the corresponding plane of the tiled cube does not exist, and the step S2221 is returned;
s2223, calculating the length proportion of the line segments according to the distance from the two endpoints to the plane of the tiled cube;
s2224, calculating the intersection point of the edge and the corresponding plane of the tiled cube according to the calculated length proportion of the line segment;
s223, taking all intersection points of the forward space of the cutting plane, reorganizing the cut triangle, and outputting the triangle to the cut triangle net;
s224, judging whether the intersection point is continuous attribute information or discrete attribute information;
if the attribute information of the continuity is the attribute information, interpolating according to the vertex attributes of the two endpoints of the corresponding edge to obtain texture coordinates and normal vectors of the cut triangle;
if the attribute information is discrete, the discrete attribute information is copied to a new triangular surface and a new vertex.
In this embodiment, three vertex coordinates { v0, v1, v2} of the triangle tri_att and corresponding vertex attributes, such as texture coordinates, normal, etc., are first taken; then, the intersection { i0, i1, i2} of the plane Pi with the three sides of the triangle is sequentially determined, and the intersection is set as a non flag when there is no intersection, for example { non, i1, i2}, indicating that the intersection of the cut plane Pi with the side v0-v1 is absent, and the intersection i1, i2 with the side v1-v2 and the side v2-v0 is present. Wherein the plane Pi belongs to any element in the array tile_plan [6], as shown in FIG. 2.
As shown in fig. 3, v0, v1 represents a line segment of a certain side of the triangle, the cutting plane Pi is represented by a four-dimensional vector n { a, b, c, -d }, an intersection point of the line segment v0v1 and the cutting plane Pi is I, a distance from the vertex v0 to Pi is d0, and a distance from the vertex v1 to Pi is d1. Where d0=v0×n, d1=v1×n, and symbol×represents vector dot multiplication. If d0×d1>0, there is no intersection; if d0×d1<0, there is an intersection.
The length ratio of the line segments is calculated as follows:
s=|d0|/(|d0|+|d1|);
where s is the length ratio of the line segments, d0 is the distance from one end point of the edge to the plane of the tiled cube, and d1 is the distance from the other end point of the edge to the plane of the tiled cube.
According to the similar triangle property, the intersection point of the edge and the corresponding plane of the tiled cube is calculated as follows:
I=v0×(1-s)+v1×s;
wherein I is the intersection point coordinate, v0 is one endpoint coordinate of the edge, and v1 is the other endpoint coordinate of the edge.
Meanwhile, for the attribute of continuity at the intersection point I, texture coordinates are calculated as:
uv=uv0×(1-s)+uv1×s;
the normal vector is calculated as:
n=n0×(1-s)+n1×s;
for discrete attribute information, the original triangular surface tri_att or its vertex is copied directly to the new triangular surface and the new vertex.
The intersection points are { non, i0, i1}, all vertexes of the forward space of the cutting plane are taken, the cut triangles are reorganized, and the reorganized triangles are output to the cut triangle net. As shown above, the new triangle in the normal direction is { I0, I1, v2}. And the discrete attribute information is interpolated and copied by adopting the steps and is output to the triangular mesh data of the tile together with the vertex of the new triangle.
According to the invention, the data files of all three-dimensional scenes are taken as a whole in a three-dimensional geographic space, regular grid division is carried out, then the three-dimensional scenes are cut according to the divided regular grids, namely, the tiles are integrated into zero, the file size of each tile is controlled to be about 1M, and the light weight and the construction of pyramid LOD of the three-dimensional scenes are conveniently carried out by taking the tiles as units. When the whole three-dimensional scene is tiled, thousands of tile data are generated, the tile data can be loaded in a time-sharing and partition mode according to needs, the data amount of loading is reduced, and the frame rate of rendering after loading is improved.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Those of ordinary skill in the art will recognize that the embodiments described herein are for the purpose of aiding the reader in understanding the principles of the present invention and should be understood that the scope of the invention is not limited to such specific statements and embodiments. Those of ordinary skill in the art can make various other specific modifications and combinations from the teachings of the present disclosure without departing from the spirit thereof, and such modifications and combinations remain within the scope of the present disclosure.

Claims (10)

1. A tile segmentation method for a three-dimensional scene of a smart city is characterized by comprising the following steps:
s1, carrying out regular grid division on a three-dimensional geographic space of three-dimensional scene data of a smart city to obtain position information of a plurality of tiled cubes;
s2, determining each plane of the corresponding tiled cube according to the position information of each tiled cube, and dividing the three-dimensional scene data by using each plane of each tiled cube to obtain the scene data of each tiled cube.
2. The method for tiling and splitting a three-dimensional scene of a smart city according to claim 1, wherein the step S1 specifically comprises the following steps:
s11, acquiring three-dimensional coordinates of all data files in the three-dimensional scene data of the smart city;
s12, calculating the maximum value and the minimum value of the three-dimensional coordinates of all the data files;
s13, determining a three-dimensional geographic space boundary box of the three-dimensional scene data according to the maximum value and the minimum value of the three-dimensional coordinates;
s14, establishing a three-dimensional coordinate system by using a three-dimensional geographic space boundary frame, and carrying out regular grid division along the coordinate axis direction according to a set step length to obtain the number of divided tiled cubes and the coordinate of a corresponding coordinate axis;
s15, determining the position information of the plurality of tiled cubes according to the number of the partitioned tiled cubes and the coordinates of the corresponding coordinate axes.
3. The method for tiling and splitting a three-dimensional scene of a smart city according to claim 2, wherein the method for determining the number of the tiled cubes is as follows:
n=nx×ny×nz;
nx=(posMax.X-posMin.X)/tile_size;
ny=(posMax.Y-posMin.Y)/tile_size;
nz=(posMax.Z-posMin.Z)/tile_size;
wherein n is the number of tiled cubes, nx is the number of regular grid divisions along the X coordinate axis direction, ny is the number of regular grid divisions along the Y coordinate axis direction, nz is the number of regular grid divisions along the Z coordinate axis direction, posMax.X is the coordinate maximum value of the data file on the X coordinate axis, posMin.X is the coordinate minimum value of the data file on the X coordinate axis, posMax.Y is the coordinate maximum value of the data file on the Y coordinate axis, posMin.Y is the coordinate minimum value of the data file on the Y coordinate axis, posMax.Z is the coordinate maximum value of the data file on the Z coordinate axis, posMin.Z is the coordinate minimum value of the data file on the Z coordinate axis, and tile_size is a set step size.
4. A method for tile segmentation of a three-dimensional scene in a smart city according to claim 3, wherein the method for determining the position information of the tile cube comprises the steps of:
tile_min.X = posMin.X + i × tile_size;
tile_min.Y = posMin.Y + j × tile_size;
tile_min.Z =posMin.Z + k × tile_size;
tile_max.X = posMin.X + (i +1)× tile_size;
tile_max.Y = posMin.Y + (j +1) × tile_size;
tile_max.Z = posMin.Z + (k +1) × tile_size;
wherein tile_min.X is the minimum coordinate value of the tiled cube on the X coordinate axis, tile_min.Y is the minimum coordinate value of the tiled cube on the Y coordinate axis, tile_min.Z is the minimum coordinate value of the tiled cube on the Z coordinate axis, tile_max.X is the maximum coordinate value of the tiled cube on the X coordinate axis, tile_max.Y is the maximum coordinate value of the tiled cube on the Y coordinate axis, tile_max.Z is the maximum coordinate value of the tiled cube on the Z coordinate axis, and i, j, k are three-dimensional labels of the tiled cube.
5. The method for tiling and splitting a three-dimensional scene of a smart city according to claim 1, wherein the step S2 comprises the following steps:
s21, determining each plane of the corresponding tiled cube according to the position information of each tiled cube;
s22, intersecting each plane of the tiled cube with each triangle grid in the three-dimensional scene data in sequence, and then taking the intersection of all triangles in the normal direction of each plane to obtain the scene data of the tiled cube.
6. The method for tiling and splitting a three-dimensional scene in a smart city according to claim 5, wherein the method for determining each plane of the tiled cube is as follows:
P0:{a=1,b=0,c=0,d=tile_min.X};
P1:{a=-1,b=0,c=0,d=-tile_min.X};
P2:{a=0,b=1,c=0,d=tile_min.Y};
P3:{a=0,b=-1,c=0,d=-tile_min.Y};
P4:{a=0,b=0,c=1,d=tile_min.Z};
P5:{a=0,b=0,c=-1,d=-tile_min.Z};
wherein P0, P1, P2, P3, P4, P5 are six planes of the tiled cube, a, b, c, d are four components of homogeneous coordinates of the planes, tile_min.X is a minimum coordinate of the tiled cube on the X coordinate axis, tile_min.Y is a minimum coordinate of the tiled cube on the Y coordinate axis, and tile_min.Z is a minimum coordinate of the tiled cube on the Z coordinate axis.
7. The method for tiling and splitting a three-dimensional scene in a smart city according to claim 5, wherein step S22 comprises the following steps:
s221, obtaining vertex coordinates and corresponding vertex attributes of each triangle mesh in the three-dimensional scene data;
s222, sequentially calculating the intersection points of each plane of the tiled cube and three sides of the triangular mesh;
s223, taking all intersection points of the forward space of the cutting plane, reorganizing the cut triangle, and outputting the triangle to the cut triangle net;
s224, judging whether the intersection point is continuous attribute information or discrete attribute information;
if the attribute information of the continuity is the attribute information, interpolating according to the vertex attributes of the two endpoints of the corresponding edge to obtain texture coordinates and normal vectors of the cut triangle;
if the attribute information is discrete, the discrete attribute information is copied to a new triangular surface and a new vertex.
8. The method for tiling and splitting a three-dimensional scene in a smart city according to claim 7, wherein step S222 comprises the following steps:
s2221, respectively calculating the distance from two endpoints of each side of the triangle mesh to the plane of the tiled cube;
s2222, judging whether the vector product of the distances from the two endpoints to the plane of the tiled cube is smaller than 0; if yes, the intersection point exists between the edge and the corresponding plane of the tiled cube, and step S2223 is executed; otherwise, the intersection point of the edge and the corresponding plane of the tiled cube does not exist, and the step S2221 is returned;
s2223, calculating the length proportion of the line segments according to the distance from the two endpoints to the plane of the tiled cube;
s2224, calculating the intersection point of the edge and the corresponding plane of the tiled cube according to the calculated line segment length proportion.
9. The method for tiling and segmenting the three-dimensional scene in the smart city according to claim 8, wherein the calculating method of the length ratio of the line segments is as follows:
s=|d0|/(|d0|+|d1|);
where s is the length ratio of the line segments, d0 is the distance from one end point of the edge to the plane of the tiled cube, and d1 is the distance from the other end point of the edge to the plane of the tiled cube.
10. The method for tiling and splitting the three-dimensional scene of the smart city according to claim 9, wherein the method for calculating the intersection point of the edge and the corresponding plane of the tiled cube is as follows:
I=v0×(1-s)+v1×s;
wherein I is the intersection point coordinate, v0 is one endpoint coordinate of the edge, and v1 is the other endpoint coordinate of the edge.
CN202310403511.7A 2023-04-17 2023-04-17 Smart city three-dimensional scene tiled segmentation method Active CN116128903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310403511.7A CN116128903B (en) 2023-04-17 2023-04-17 Smart city three-dimensional scene tiled segmentation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310403511.7A CN116128903B (en) 2023-04-17 2023-04-17 Smart city three-dimensional scene tiled segmentation method

Publications (2)

Publication Number Publication Date
CN116128903A true CN116128903A (en) 2023-05-16
CN116128903B CN116128903B (en) 2023-06-27

Family

ID=86299457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310403511.7A Active CN116128903B (en) 2023-04-17 2023-04-17 Smart city three-dimensional scene tiled segmentation method

Country Status (1)

Country Link
CN (1) CN116128903B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958455A (en) * 2023-09-21 2023-10-27 北京飞渡科技股份有限公司 Roof reconstruction method and device based on neural network and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040022835A (en) * 2002-09-10 2004-03-18 정동회 Apparatus and method for offering three-dimension image data
CN110910505A (en) * 2019-11-29 2020-03-24 西安建筑科技大学 Accelerated rendering method of scene model
CN111402390A (en) * 2020-02-20 2020-07-10 平安科技(深圳)有限公司 Model rendering method, device, equipment and storage medium
CN111754617A (en) * 2020-05-09 2020-10-09 北京飞渡科技有限公司 Method and system for optimizing large-volume BIM model data
CN112085826A (en) * 2020-09-27 2020-12-15 广州海格星航信息科技有限公司 Efficient three-dimensional space grid rendering method and device
CN112287138A (en) * 2020-10-15 2021-01-29 广州市城市规划勘测设计研究院 Organization scheduling method, device and equipment of city information model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040022835A (en) * 2002-09-10 2004-03-18 정동회 Apparatus and method for offering three-dimension image data
CN110910505A (en) * 2019-11-29 2020-03-24 西安建筑科技大学 Accelerated rendering method of scene model
CN111402390A (en) * 2020-02-20 2020-07-10 平安科技(深圳)有限公司 Model rendering method, device, equipment and storage medium
CN111754617A (en) * 2020-05-09 2020-10-09 北京飞渡科技有限公司 Method and system for optimizing large-volume BIM model data
CN112085826A (en) * 2020-09-27 2020-12-15 广州海格星航信息科技有限公司 Efficient three-dimensional space grid rendering method and device
CN112287138A (en) * 2020-10-15 2021-01-29 广州市城市规划勘测设计研究院 Organization scheduling method, device and equipment of city information model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958455A (en) * 2023-09-21 2023-10-27 北京飞渡科技股份有限公司 Roof reconstruction method and device based on neural network and electronic equipment
CN116958455B (en) * 2023-09-21 2023-12-26 北京飞渡科技股份有限公司 Roof reconstruction method and device based on neural network and electronic equipment

Also Published As

Publication number Publication date
CN116128903B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN113178014B (en) Scene model rendering method and device, electronic equipment and storage medium
CN110675496B (en) Grid subdivision and visualization method and system based on three-dimensional urban geological model
CN116128903B (en) Smart city three-dimensional scene tiled segmentation method
CN102117497A (en) Method and system for three-dimensional terrain modeling
CN112598793B (en) Three-dimensional map tile vector grid integrated system and method
CN102629391A (en) Three-dimensional space structure graph cutting and slicing method based on digital graph medium
CN110796732A (en) WebGL and C # based three-dimensional mine display method
Beck Real-time visualization of big 3D city models
CN114138265B (en) Visualization method based on digital twinning
CN103425806A (en) Three-dimensional programming product simulating system and method
CN113421336A (en) Method and device for volume rendering of dynamic water area, storage medium and electronic device
CN111028349A (en) Hierarchical construction method suitable for rapid visualization of massive three-dimensional live-action data
CN115953541A (en) Quad-tree LOD terrain generation method, device, equipment and storage medium
Lange et al. A 3D particle visualization system for temperature management
CN106875480B (en) Method for organizing urban three-dimensional data
WO2024108974A1 (en) Multi-stage simplification method for spatial data model slice
CN117437130B (en) Tree three-dimensional model splicing gap repairing method and related equipment
Sun et al. Research on 3D Big Data City Model Building
Han et al. Study on three-dimensional scene modeling and interactive technology based on marching square algorithm
CN114494584A (en) Method, device, equipment and medium for generating three-dimensional white mold based on shapefile file
CN114353757A (en) Automatic extraction algorithm for geographical entities of road sections of intersections
Gorte et al. Representation and reconconstruction of triangular irregular networks with vertical walls
Moet Experimental Verification of a Realistic Input Model for Polyhedral Terrains
Binder et al. Massively Parallel Stackless Ray Tracing of Catmull-Clark Subdivision Surfaces
CN116758196A (en) Three-dimensional visualization method, device, equipment and medium for road vector data

Legal Events

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