Data processing method and device, electronic equipment and medium

By generating a voxel model of a three-dimensional scene and searching for voxels from top to bottom, the triangular facets of the building are determined, which solves the labor-intensive and costly problem of manually building architectural models in the existing technology, and achieves efficient modeling of buildings. Primerization and monomerization.

CN118691733APending Publication Date: 2024-09-24CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310283330.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

The existing single-unit oblique photography is realized through manual modeling and dynamic loading, which requires manual construction of the geometric model of a single target building through software, which is labor-intensive and has high production costs.

Method used

By generating a voxel model of a three-dimensional scene based on image data, searching from top to bottom for voxels containing the surface of the target object, determining that the target object is a building, and determining the triangular patches constituting the building based on the target voxels, realizing the building's Voxelization and monomerization.

Benefits of technology

It reduces labor consumption and production costs, and can extract the individual geometric expression of the building from the three-dimensional oblique photography data with a small consumption of computing power, and realize the voxelization and singulation of the building.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691733A
    Figure CN118691733A
Patent Text Reader

Abstract

The invention provides a data processing method and device, electronic equipment and a medium, and relates to the technical field of communication, and the method comprises the steps: generating a voxel model of a three-dimensional scene based on image data; determining a first voxel layer containing a vertex of a target object in the voxel model, and searching a target voxel containing the surface of the target object from the first voxel layer from top to bottom; and under the condition that the target object is determined to be a building based on the target voxel, determining a triangular patch forming the building according to the target voxel. According to the embodiment of the invention, voxelization and monotonization of the high-rise building can be realized at the same time with relatively low computing power consumption, manpower consumption can be reduced, and the manufacturing cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Oblique photography technology reconstructs large-scale three-dimensional scenes based on image data from five perspectives through aerial triangulation, and is one of the key technologies for realizing digital twin visualization. Oblique photography technology obtains individual geometric expressions of buildings from oblique photography data through oblique photography singulation. In related technologies, oblique photography singulation is achieved through manual modeling and dynamic loading, which requires manual construction of the geometric model of a single target building through software, which consumes a lot of manpower and has high production costs. Summary of the invention

[0003] The embodiments of the present invention provide a data processing method, device, electronic device and medium to solve the problem that the existing oblique photography individualization is achieved through manual modeling and dynamic loading, and the geometric model of a single target building needs to be manually built by software, which consumes a lot of manpower and has high production costs.

[0004] To solve the above technical problems, the present invention is achieved as follows:

[0005] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising:

[0006] Generate a voxel model of a three-dimensional scene based on image data;

[0007] Determine a first voxel layer in the voxel model that contains vertices of the target object, and search from the first voxel layer from top to bottom for a target voxel that contains a surface of the target object;

[0008] When the target object is determined to be a building based on the target voxel, triangular facets constituting the building are determined according to the target voxel.

[0009] Optionally, the step of searching from the first voxel layer from top to bottom for a target voxel containing the surface of the target object comprises:

[0010] Searching from the first voxel layer from top to bottom, setting the identifier of the searched voxel containing the surface of the target object as the target identifier;

[0011] The voxel of the target mark is determined as the target voxel.

[0012] Optionally, the step of starting the top-down search from the first voxel layer and setting the identifier of the searched voxel containing the surface of the target object as the target identifier includes:

[0013] Setting the identifier of the voxel in the first voxel layer containing the vertex of the target object as the target identifier, and determining the first voxel layer as the current voxel layer;

[0014] Projecting the current voxel layer vertically to obtain a projected voxel layer, determining whether the projected voxel layer and its neighboring voxels contain the target object surface, and setting the identifier of the voxel that contains the target object surface in the projected voxel layer and its neighboring voxels as the target identifier;

[0015] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the current voxel layer meets a preset condition.

[0016] Optionally, the top-down search starting from the first voxel layer and setting the identifier of the searched voxel containing the surface of the target object as the target identifier also includes:

[0017] In the case where the current voxel layer satisfies the preset condition, vertically projecting the current voxel layer to obtain a projected voxel layer, determining whether the projected voxel layer includes the target object surface, and setting the identifier of the voxel in the projected voxel layer that includes the target object surface as the target identifier;

[0018] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the projected voxel layer does not contain the surface of the target object.

[0019] Optionally, the preset condition includes that a height of a voxel in the current voxel layer relative to a preset reference line is less than a preset building base height.

[0020] Optionally, when determining that the target object is a building based on the target voxel, determining triangular facets constituting the building according to the target voxel includes:

[0021] determining a total height of the target voxel in the voxel model;

[0022] When the total height of the target voxel in the voxel model is greater than a preset threshold, determining that the target object is a high-rise building;

[0023] The triangular facets constituting the high-rise building are determined according to the target voxels.

[0024] Optionally, determining the triangular facets constituting the building according to the target voxels comprises:

[0025] Determine the triangular facet corresponding to the target voxel based on the stored correspondence between the voxels and the triangular facets;

[0026] The triangular facet corresponding to the target voxel is determined as the triangular facet constituting the building.

[0027] In a second aspect, an embodiment of the present invention provides a data processing device, the device comprising:

[0028] A generation module, for generating a voxel model of a three-dimensional scene based on the image data;

[0029] A first determining module is used to determine a first voxel layer containing vertices of the target object in the voxel model, and to search from the first voxel layer from top to bottom for a target voxel containing a surface of the target object;

[0030] The second determination module is used to determine the triangular facets constituting the building according to the target voxels when the target object is determined to be a building based on the target voxels.

[0031] Optionally, the first determining module includes:

[0032] A first determining unit, configured to determine a first voxel layer in the voxel model that contains vertices of the target object;

[0033] A setting unit, configured to search from the first voxel layer from top to bottom, and set the identifier of the searched voxel containing the surface of the target object as the target identifier;

[0034] The second determining unit is used to determine the voxel of the target mark as the target voxel.

[0035] Optionally, the setting unit is specifically used to:

[0036] Setting the identifier of the voxel in the first voxel layer containing the vertex of the target object as the target identifier, and determining the first voxel layer as the current voxel layer;

[0037] Projecting the current voxel layer vertically to obtain a projected voxel layer, determining whether the projected voxel layer and its neighboring voxels contain the target object surface, and setting the identifier of the voxel that contains the target object surface in the projected voxel layer and its neighboring voxels as the target identifier;

[0038] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the current voxel layer meets a preset condition.

[0039] Optionally, the setting unit is further configured to:

[0040] In the case where the current voxel layer satisfies the preset condition, vertically projecting the current voxel layer to obtain a projected voxel layer, determining whether the projected voxel layer includes the target object surface, and setting the identifier of the voxel in the projected voxel layer that includes the target object surface as the target identifier;

[0041] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the projected voxel layer does not contain the surface of the target object.

[0042] Optionally, the preset condition includes that a height of a voxel in the current voxel layer relative to a preset reference line is less than a preset building base height.

[0043] Optionally, the second determining module is specifically configured to:

[0044] determining a total height of the target voxel in the voxel model;

[0045] When the total height of the target voxel in the voxel model is greater than a preset threshold, determining that the target object is a high-rise building;

[0046] The triangular facets constituting the high-rise building are determined according to the target voxels.

[0047] Optionally, in a case where the target object is determined to be a building based on the target voxel, the second determining module is specifically configured to:

[0048] Determine the triangular facet corresponding to the target voxel based on the stored correspondence between the voxels and the triangular facets;

[0049] The triangular facet corresponding to the target voxel is determined as the triangular facet constituting the building.

[0050] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the data processing method described in the first aspect when executed by the processor.

[0051] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method described in the first aspect are implemented.

[0052] In an embodiment of the present application, a voxel model of a three-dimensional scene is generated based on image data; a first voxel layer containing vertices of a target object in the voxel model is determined, and a target voxel containing the surface of the target object is searched from top to bottom starting from the first voxel layer; when the target object is determined to be a building based on the target voxel, the triangular facets constituting the building are determined based on the target voxel. In this way, the building can be individually formed through a top-down voxelization method, and a separate geometric expression of a building can be extracted from three-dimensional oblique photography data, and the voxelization and individualization of the building can be simultaneously achieved with less computing power consumption, which can reduce manpower consumption and production costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0054] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present invention;

[0055] Figure 2 It is one of the voxel schematic diagrams provided by an embodiment of the present invention;

[0056] Figure 3 This is a second voxel schematic diagram provided by an embodiment of the present invention;

[0057] Figure 4 It is one of the three-dimensional scene schematic diagrams provided by an embodiment of the present invention;

[0058] Figure 5 It is one of the three-dimensional scene schematic diagrams provided by an embodiment of the present invention;

[0059] Figure 6 It is one of the three-dimensional scene schematic diagrams provided by an embodiment of the present invention;

[0060] Figure 7 It is one of the three-dimensional scene schematic diagrams provided by an embodiment of the present invention;

[0061] Figure 8 It is one of the three-dimensional scene schematic diagrams provided by an embodiment of the present invention;

[0062] Fig. 9 It is one of the three-dimensional scene schematic diagrams provided by an embodiment of the present invention;

[0063] Fig.10 is a structural schematic diagram of a data processing device provided by an embodiment of the present invention;

[0064] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments 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.

[0066] Among the related technologies, oblique photography technology reconstructs large-scale three-dimensional scenes based on image data from five perspectives (one vertical perspective and four oblique perspectives) through aerial triangulation, and is one of the key technologies for realizing digital twin visualization. Oblique photography data is usually saved as triangular meshes according to plots, and the number of vertices of a plot may reach hundreds of thousands, and the number of triangular facets may reach millions, which increases the difficulty of storage, visualization, and post-processing. In addition, since oblique photography data is generally stored in units of plots, and users are more concerned about a certain building or several buildings in the plot, the original oblique photography data is difficult to meet user needs. By singulating the buildings in the oblique photography data, the individual geometric expression of the building can be obtained from the original data.

[0067] In the related technology, the individualization of oblique photography is achieved through manual modeling and dynamic loading, which requires manual construction of the geometric model of a single target building through software, which consumes a lot of manpower and has high production costs.

[0068] In the embodiments of the present invention, a data processing method, device and electronic device are proposed to solve the problem that the existing oblique photography individualization is achieved through manual modeling and dynamic loading, and the geometric model of a single target building needs to be manually built by software, which consumes a lot of manpower and has high production costs.

[0069] See also Figure 1 , Figure 1 is a flow chart of a data processing method provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0070] Step 101: Generate a voxel model of a three-dimensional scene based on image data.

[0071] The image data may be oblique photography image data, for example, three-dimensional oblique photography image data. The oblique photography image data contains surface contour information of objects in a three-dimensional scene. The process of generating a voxel model of a three-dimensional scene may be a voxelization process, and voxelization may convert a geometric representation of the model into a voxel representation that is closest to the object. Model voxelization may rasterize the three-dimensional space where the model is located, and fill the entire model surface and interior with a number of cubes of the same size.

[0072] In one implementation, a bounding box of a three-dimensional scene may be generated based on the three-dimensional oblique photography image data, and the scene may be segmented according to the bounding box of the three-dimensional scene and the set length, width and height of the voxel unit to generate a voxel model of the three-dimensional scene.

[0073] Step 102: determine a first voxel layer in the voxel model that contains vertices of the target object, and search from the first voxel layer from top to bottom for a target voxel that contains the surface of the target object.

[0074] The target object may be any object in the three-dimensional scene. For example, the target object may be a building, a plant, an animal, etc. The voxel module may be traversed from top to bottom until the vertex of the target object is found, and the voxel layer containing the vertex of the target object is used as the first voxel layer.

[0075] It should be noted that the outer surface of the target object is composed of triangular facets, and the relationship between triangular facets and voxels exists Figure 2 and Figure 3 There are two cases: one is that the vertices of the triangle are inside the voxel, and the other is that the edges of the triangle are inside the voxel. Corresponding to the first case, such as Figure 2 As shown in , judging whether the vertex is in the voxel can determine whether the voxel contains the vertex. If the voxel contains the vertex, the index number of the vertex is recorded and the corresponding relationship between the voxel and the triangle is stored. Corresponding to the second case, such as Figure 3 As shown, it is necessary to use the geometric relationship of "line segment-cube intersection" to determine whether the edge of the triangle is within the voxel. If the voxel contains an edge, the index number of the triangle containing the edge is recorded, and the correspondence between the voxel and the triangle is stored. To determine whether the line segment intersects with the cube, the intersection of the straight line segment and the six faces of the cube is used for judgment. If the line segment has no intersection with the cube, the voxel does not contain the edge of the triangle; if the line segment has an intersection with the cube, it means that the vertex of the triangle is within the voxel, which is the same as the first case; if the line segment has more than one intersection with the cube, it means that the edge of the triangle is within the voxel.

[0076] Step 103: When it is determined that the target object is a building based on the target voxels, determine the triangular facets constituting the building according to the target voxels.

[0077] The total height of the target voxel in the voxel model may be determined, and when the total height of the target voxel in the voxel model is greater than a preset threshold, the target object is determined to be a building.

[0078] It should be noted that this method is particularly suitable for determining triangular facets of high-rise buildings.

[0079] In the related technologies, the methods of individualization of oblique photography can be roughly divided into two categories: manual modeling and dynamic loading and pre-processing extraction. The former requires scene designers to manually build a geometric model of a single target building through software, which requires a lot of manpower and has a high production cost. The pre-processing extraction method avoids this problem and often uses a neural network-based image recognition algorithm to automatically identify buildings in oblique photography data or attached orthophotos and extract building units in batches.

[0080] In addition, the original oblique photography point cloud or patch data only contains the surface contour information of the building model and cannot describe the internal properties of the model. Voxelization is a better technical means to solve this problem. It can convert the geometric form representation of the model into the voxel representation that is closest to the object. The essence of model voxelization is to rasterize the three-dimensional space where the model is located, and use several cubes of the same size to fill the entire model surface and interior, so as to achieve the description of the internal properties of the model.

[0081] In the related art, although the automatic extraction algorithm based on neural network does not require a large number of manual modeling, its individualization effect depends on the training data set and requires high computing power. At the same time, the production of training data sets also requires a lot of manual annotation. In addition, the oblique photography voxelization scheme in the related art only voxelizes the individualized model or the entire block, and cannot directly automatically extract buildings from oblique photography data with complex structures, uneven distribution, and various shapes for voxelization.

[0082] In an embodiment of the present application, a voxel model of a three-dimensional scene is generated based on image data; a first voxel layer containing vertices of a target object in the voxel model is determined, and a target voxel containing the surface of the target object is searched from top to bottom starting from the first voxel layer; when the target object is determined to be a building based on the target voxel, the triangular facets constituting the building are determined based on the target voxel. In this way, the building can be individually formed through a top-down voxelization method, and a separate geometric expression of a building can be extracted from three-dimensional oblique photography data, and the voxelization and individualization of the building can be simultaneously achieved with less computing power consumption, which can reduce manpower consumption and production costs.

[0083] Optionally, the step of searching from the first voxel layer from top to bottom for a target voxel containing the surface of the target object comprises:

[0084] Searching from the first voxel layer from top to bottom, setting the identifier of the searched voxel containing the surface of the target object as the target identifier;

[0085] The voxel of the target mark is determined as the target voxel.

[0086] Among them, the first voxel layer can be determined as the current voxel layer, the current voxel layer is vertically projected to obtain the projection voxel layer, determine whether the projection voxel layer and its neighboring voxels contain the target object surface, and set the identifiers of the voxels containing the target object surface in the projection voxel layer and its neighboring voxels as the target identifier, that is, set the identifiers of the voxels containing the target object surface to the same identifier. Continue to project the projection voxel layer downward, and set the identifiers of the voxels containing the target object surface in the updated projection voxel layer and its neighboring voxels as the target identifier, and repeat this process. By continuously projecting downward, the identifiers of all voxels containing the target object surface can be set to the same identifier.

[0087] In this embodiment, a top-down search is started from the first voxel layer, the identifier of the searched voxel containing the surface of the target object is set as the target identifier, and the voxel of the target identifier is determined as the target voxel, so that the building can be singulated through the voxels with the same identifier.

[0088] Optionally, the step of starting the top-down search from the first voxel layer and setting the identifier of the searched voxel containing the surface of the target object as the target identifier includes:

[0089] Setting the identifier of the voxel in the first voxel layer containing the vertex of the target object as the target identifier, and determining the first voxel layer as the current voxel layer;

[0090] Projecting the current voxel layer vertically to obtain a projected voxel layer, determining whether the projected voxel layer and its neighboring voxels contain the target object surface, and setting the identifier of the voxel that contains the target object surface in the projected voxel layer and its neighboring voxels as the target identifier;

[0091] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the current voxel layer meets a preset condition.

[0092] For the voxels in the projection voxel layer, it can be determined one by one whether the voxels contain the target object surface, and it can be determined whether the neighboring voxels adjacent to the voxels in the projection voxel layer contain the target object surface.

[0093] By way of example, the first voxel layer can be determined as the current voxel layer; the current voxel layer is vertically projected to obtain a projection voxel layer (the second voxel layer in this case), it is determined whether the projection voxel layer and its neighboring voxels contain the target object surface, and the identifiers of the voxels in the projection voxel layer and its neighboring voxels that contain the target object surface are set as target identifiers; the projection voxel layer is updated to the current voxel layer (the second voxel layer in this case), and the vertical projection of the current voxel layer is performed to obtain a projection voxel layer (the third voxel layer in this case), it is determined whether the projection voxel layer and its neighboring voxels contain the target object surface, and the identifiers of the voxels in the projection voxel layer and its neighboring voxels that contain the target object surface are set as target identifiers; and so on, and so forth, until the current voxel layer meets the preset conditions.

[0094] In one embodiment, the preset condition includes that the height of the voxels in the current voxel layer relative to a preset reference line is less than a preset building base height. The preset reference line may be a horizon in a three-dimensional scene.

[0095] In this implementation, the current voxel layer is vertically projected to obtain a projected voxel layer, and it is determined whether the projected voxel layer and its neighboring voxels contain the surface of the target object, and the identifiers of the voxels in the projected voxel layer and its neighboring voxels that contain the surface of the target object are set as target identifiers, and the projected voxels containing the grid points and edges of the target object surface are marked downward in the vertical direction. This method is independent of the data set and does not require manual labeling, which can reduce the demand for computing power and can simultaneously realize voxelization and monomerization of oblique photography data, thereby reducing the amount of data processing.

[0096] Optionally, the top-down search starting from the first voxel layer and setting the identifier of the searched voxel containing the surface of the target object as the target identifier also includes:

[0097] In the case where the current voxel layer satisfies the preset condition, vertically projecting the current voxel layer to obtain a projected voxel layer, determining whether the projected voxel layer includes the target object surface, and setting the identifier of the voxel in the projected voxel layer that includes the target object surface as the target identifier;

[0098] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the projected voxel layer does not contain the surface of the target object.

[0099] The preset condition may include that the height of the voxels in the current voxel layer relative to a preset reference line is less than a preset building base height. The preset reference line may be a horizon in a three-dimensional scene.

[0100] By way of example, when the current voxel layer satisfies the preset condition, the current voxel layer (assuming that it is the Nth voxel layer at this time, and N is a positive integer) can be vertically projected to obtain a projection voxel layer (at this time, the N+1th voxel layer), determine whether the projection voxel layer contains the target object surface, and set the identifier of the target object surface in the projection voxel layer as the target identifier; update the projection voxel layer to the current voxel layer (at this time, the N+1th voxel layer), and perform vertical projection on the current voxel layer to obtain a projection voxel layer (at this time, the N+2th voxel layer), determine whether the projection voxel layer contains the target object surface, and set the identifier of the target object surface in the projection voxel layer as the target identifier, and so on, and so on, until the projection voxel layer does not contain the target object surface.

[0101] In this implementation, when the current voxel layer satisfies the preset conditions, the current voxel layer is vertically projected to determine whether the projected voxels of the current voxel layer include the surface of the target object, and the identifier of the target object surface in the projected voxels of the current voxel layer is set as the target identifier. When the voxel position height is lower than the preset building base height, the projected voxels containing the grid points and edges of the target object are marked downward in the vertical direction until the projected voxels do not contain the grid points and edges of the target object, so as to separate the target object from its junction with the ground.

[0102] Optionally, when determining that the target object is a building based on the target voxel, determining triangular facets constituting the building according to the target voxel includes:

[0103] determining a total height of the target voxel in the voxel model;

[0104] When the total height of the target voxel in the voxel model is greater than a preset threshold, determining that the target object is a high-rise building;

[0105] The triangular facets constituting the high-rise building are determined according to the target voxels.

[0106] The total number of layers of voxels of the target mark can be determined, and the total height of the voxels of the target mark in the voxel model can be determined based on the total number of layers of voxels of the target mark and the height of each layer of voxels. For example, the height of each layer of voxels can be H, and the total number of layers of voxels of the target mark is L, then the total height of the voxels of the target mark in the voxel model is H*L.

[0107] It should be noted that there is a corresponding relationship between voxels and triangular facets in a three-dimensional scene. The triangular facets corresponding to the voxels of the target mark can be determined based on the voxels of the target mark, and thus the triangular facets constituting the building can be determined based on the voxels of the target mark. The triangular facets constituting the building are the triangular facets corresponding to the voxels of the target mark.

[0108] In this implementation, the total height of the voxels of the target mark in the voxel model is determined; when the total height of the voxels of the target mark in the voxel model is greater than a preset threshold, the target object is determined to be a building; and the triangular facets constituting the building are determined based on the voxels of the target mark. This enables the distinction between buildings and other objects such as the ground and vegetation, and enables the automatic extraction of high-rise building monomers in oblique photography data, saving manual modeling costs.

[0109] Optionally, determining the triangular facets constituting the building according to the target voxels comprises:

[0110] Determine the triangular facet corresponding to the target voxel based on the stored correspondence between the voxels and the triangular facets;

[0111] The triangular facet corresponding to the target voxel is determined as the triangular facet constituting the building.

[0112] In this implementation, based on the correspondence between stored voxels and triangular facets, the triangular facets corresponding to the target voxel are determined as triangular facets that constitute the building, so that the separate geometric expression of the building can be extracted from the image data using voxels and simple geometric relationships, thereby achieving both voxelization and individualization of the building with less computing power consumption.

[0113] In one implementation, the data processing method includes the following steps:

[0114] Step (11): Generate a bounding box of the three-dimensional scene based on the three-dimensional oblique photography data.

[0115] Step (12): Divide the scene according to the bounding box and the length, width and height of the voxel unit set by the user to generate a voxel model.

[0116] Step (13): Use the triangular mesh of the scene to determine the voxels that contain the exterior surface of the building.

[0117] Furthermore, the triangular mesh of the scene is used to determine the voxel units containing the outer surface of the building, including:

[0118] Traverse each triangle of the scene triangle mesh and select the voxel containing the vertex according to the vertex position;

[0119] Based on the edges of the triangle patch, select the voxels that contain the edge.

[0120] Step (14): Search from top to bottom for the voxel that contains the top of the building, and assign the same ID number to each connected voxel.

[0121] Step (15): Project the voxels of the current layer to the next layer, determine whether the projected voxels and adjacent voxels contain the outer surface of the building, and descend in sequence according to this step.

[0122] Among them, starting from the voxel at the top of the building obtained in step (4), vertically projecting to the next layer, judging whether the projected voxel contains the grid points and edges of the scene, if so, marking the voxel and assigning the ID number of the upper voxel; when the height of the projected voxel relative to the preset reference line is higher than the building base height set by the user, starting from the projected voxel, judging whether the adjacent voxels of the projected voxel contain the grid points and edges of the scene along the horizontal direction, if so, marking the voxel and assigning the ID number of the upper voxel, and continuing to judge the adjacent voxels; if not, continuing to judge the adjacent N voxels (N can be the value entered by the user); judging whether the adjacent voxel has been marked, if so, it means that the grid of the current voxel and the adjacent voxel belongs to the same building, and merging the ID numbers; performing vertical projection and descending until the voxel height is lower than the building base height set by the user; when the voxel height is lower than the building base height set by the user, judging whether the projected voxel contains the grid points and edges of the scene along the vertical direction downward, if so, marking the voxel. Descending until the projected voxel does not contain the grid points and edges of the scene.

[0123] Step (16): If the total height from the vertex position to the final descent is greater than the building height threshold set by the user, the object currently being processed is considered to be a high-rise building.

[0124] Step (17): Select the vertices and faces of the triangular mesh surface according to the voxels containing the building to complete the monomerization.

[0125] Among them, all IDs can be traversed in sequence, all voxels with the same ID can be taken out according to the ID number, and the vertices and facets of the contained triangular mesh can be taken out through the voxels.

[0126] The embodiment of the present application proposes a method for voxelizing and singulating high-rise buildings in top-down oblique photography, which uses voxels and simple geometric relationships to extract individual geometric expressions of high-rise buildings from three-dimensional oblique photography data, thereby achieving voxelization and singulation of high-rise buildings at the same time with less computing power consumption.

[0127] Figure 4 The visualization result of 3D oblique photography data of a plot of land is shown, and the data is represented by a triangular mesh. As a specific embodiment, the data processing method includes the following process:

[0128] Step (21): Calculate the maximum value (x max ,y max 、z max ), minimum value (x min ,y min 、z min ), and then generate the bounding box of the three-dimensional scene based on these 6 values.

[0129] Step (22): Assume that the length, width, and height of each voxel are d X ,d Y ,d Z (specified by the user), calculate the number of voxels along the axis:

[0130] N X =(x max -x min ) / d X ;

[0131] N Y =(y max -y min ) / d Y ;

[0132] N Z =(z max -z min ) / d Z ;

[0133] Then, the entire space is divided using small cubes.

[0134] Step (23): Use the scene's triangular mesh to determine the voxels that contain the building's exterior surface. The building's exterior surface is composed of triangular meshes, and the relationship between triangular facets and voxels is Figure 2 and Figure 3 There are two cases: one is that the vertices of the triangle are inside the voxel, and the other is that the edges of the triangle are inside the voxel.

[0135] Corresponding to the first case, judging whether the vertex is in the voxel can determine whether the voxel contains the vertex. If the voxel contains the vertex, the index number of the vertex is recorded.

[0136] Corresponding to the second case, it is necessary to use the geometric relationship of "line segment-cube intersection" to determine whether the edge of the triangle is within the voxel. If the voxel contains an edge, the index number of the triangle containing the edge is recorded. To determine whether the line segment intersects with the cube, the intersection of the straight line segment and the six faces of the cube is used for judgment. If the line segment has no intersection with the cube, the voxel does not contain the edge of the triangle; if the line segment has an intersection with the cube, it means that the vertex of the triangle is within the voxel, which is the same as the first case; if the line segment has more than one intersection with the cube, it means that the edge of the triangle is within the voxel.

[0137] Step (24): Figure 5 and Figure 6 As shown, starting from the top voxel, we look down to the top of the building. The connected voxels belong to the same building and are given the same ID number. Figure 5 The building has the same width from top to bottom. Figure 6 It is a building that is narrow at the top and wide at the bottom.

[0138] Step (25): Project the voxels of the current layer to the next layer, and determine whether the projected voxels and adjacent voxels contain the outer surface of the building. The specific process is as follows:

[0139] like Figure 7 and Figure 8 As shown, starting from the voxel at the top of the building obtained in step (24), vertical projection is performed to the next layer, and the method of step (23) is used to determine whether the projected voxel contains the grid points and edges of the scene. If so, the voxel is marked and assigned the ID number of the upper layer voxel.

[0140] like Fig. 9 As shown in the figure, when the height of the projected voxel relative to the preset reference line (h V ) is higher than the building base height (h) set by the user A ), by the method of step (23), taking the projection voxel as the starting point, determine along the horizontal direction whether the external adjacent voxels of the projection voxel contain the grid points and edges of the scene; if so, mark the voxel, assign the ID number of the upper voxel, and continue to determine the adjacent voxels; if not, continue to determine the adjacent N voxels (N can be the value entered by the user); determine whether the adjacent voxel has been marked; if so, it means that the grid of the current voxel and the adjacent voxel belongs to the same building, and merge the ID numbers; perform vertical projection and descend until the voxel height is lower than the building base height (h set by the user). A ); when the voxel height (h V ) is lower than the building base height set by the user (h A ), by the method of step (23), determine whether the projected voxel contains the grid points and edges of the scene in the vertical direction downward, if it does, mark the voxel and assign the ID number of the upper voxel. Project from top to bottom until the projected voxel does not contain the grid points and edges of the scene.

[0141] Step (26): If the total descent height from the vertex position to the final descent (h D ) is greater than the building height threshold set by the user (t A ), the object currently being processed is considered to be a high-rise building.

[0142] Step (27): Select the vertices and faces of the triangular mesh surface according to the voxels containing the building to complete the monomerization.

[0143] Among them, all voxels of the building corresponding to the ID number are taken out according to the ID number, and the vertices and faces of the contained triangular mesh are taken out through the voxels and the saved vertex index and triangle face index; all IDs are traversed in turn to take out the vertices and faces of all high-rise buildings.

[0144] The top-down voxelization method is used to individualize high-rise buildings in oblique photography, which can distinguish between buildings and other objects such as the ground and vegetation. It can also realize the automatic extraction of high-rise building monomers in oblique photography data, saving the cost of manual modeling. By judging whether the projected voxels and adjacent voxels contain the grid points and edges of the scene, the extraction of building monomers of arbitrary shapes can be realized.

[0145] See also Fig.10 , Fig.10 is a structural diagram of a data processing device provided by an embodiment of the present invention, such as Fig.10 As shown, the data processing device 200 includes:

[0146] A generating module 201, for generating a voxel model of a three-dimensional scene based on image data;

[0147] A first determination module 202 is used to determine a first voxel layer containing vertices of the target object in the voxel model, and search from the first voxel layer from top to bottom for a target voxel containing a surface of the target object;

[0148] The second determination module 203 is configured to determine triangular facets constituting the building according to the target voxels when the target object is determined to be a building based on the target voxels.

[0149] Optionally, the first determining module includes:

[0150] A first determining unit, configured to determine a first voxel layer in the voxel model that contains vertices of the target object;

[0151] A setting unit, configured to search from the first voxel layer from top to bottom, and set the identifier of the searched voxel containing the surface of the target object as the target identifier;

[0152] The second determining unit is used to determine the voxel of the target mark as the target voxel.

[0153] Optionally, the setting unit is specifically used to:

[0154] Setting the identifier of the voxel in the first voxel layer containing the vertex of the target object as the target identifier, and determining the first voxel layer as the current voxel layer;

[0155] Projecting the current voxel layer vertically to obtain a projected voxel layer, determining whether the projected voxel layer and its neighboring voxels contain the target object surface, and setting the identifier of the voxel that contains the target object surface in the projected voxel layer and its neighboring voxels as the target identifier;

[0156] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the current voxel layer meets a preset condition.

[0157] Optionally, the setting unit is further configured to:

[0158] In the case where the current voxel layer satisfies the preset condition, vertically projecting the current voxel layer to obtain a projected voxel layer, determining whether the projected voxel layer includes the target object surface, and setting the identifier of the voxel in the projected voxel layer that includes the target object surface as the target identifier;

[0159] The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the projected voxel layer does not contain the surface of the target object.

[0160] Optionally, the preset condition includes that a height of a voxel in the current voxel layer relative to a preset reference line is less than a preset building base height.

[0161] Optionally, the second determining module is specifically configured to:

[0162] determining a total height of the target voxel in the voxel model;

[0163] When the total height of the target voxel in the voxel model is greater than a preset threshold, determining that the target object is a high-rise building;

[0164] The triangular facets constituting the high-rise building are determined according to the target voxels.

[0165] Optionally, in a case where the target object is determined to be a building based on the target voxel, the second determining module is specifically configured to:

[0166] Determine the triangular facet corresponding to the target voxel based on the stored correspondence between the voxels and the triangular facets;

[0167] The triangular facet corresponding to the target voxel is determined as the triangular facet constituting the building.

[0168] The data processing device can realize Figure 1 The various processes implemented in the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.

[0169] like Fig.11 As shown, an embodiment of the present invention further provides an electronic device 300, comprising: a processor 301, a memory 302, and a program stored in the memory 302 and executable on the processor 301. When the program is executed by the processor 301, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0170] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a ROM, RAM, a magnetic disk or an optical disk.

[0171] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0173] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: Generate a voxel model of a three-dimensional scene based on image data; Determine a first voxel layer in the voxel model that contains vertices of the target object, and search from the first voxel layer from top to bottom for a target voxel that contains a surface of the target object; When the target object is determined to be a building based on the target voxel, triangular facets constituting the building are determined according to the target voxel.

2. The method according to claim 1, characterized in that The step of searching from the first voxel layer from top to bottom for a target voxel containing the surface of the target object comprises: Searching from the first voxel layer from top to bottom, setting the identifier of the searched voxel containing the surface of the target object as the target identifier; The voxel of the target mark is determined as the target voxel.

3. The method according to claim 2, characterized in that The step of starting the top-down search from the first voxel layer and setting the identifier of the searched voxel containing the surface of the target object as the target identifier comprises: Setting the identifier of the voxel in the first voxel layer containing the vertex of the target object as the target identifier, and determining the first voxel layer as the current voxel layer; Projecting the current voxel layer vertically to obtain a projected voxel layer, determining whether the projected voxel layer and its neighboring voxels contain the target object surface, and setting the identifier of the voxel that contains the target object surface in the projected voxel layer and its neighboring voxels as the target identifier; The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the current voxel layer meets a preset condition.

4. The method according to claim 3, characterized in that The step of searching from the first voxel layer from top to bottom and setting the identifier of the searched voxel containing the surface of the target object as the target identifier also includes: In the case where the current voxel layer satisfies the preset condition, vertically projecting the current voxel layer to obtain a projected voxel layer, determining whether the projected voxel layer includes the target object surface, and setting the identifier of the voxel in the projected voxel layer that includes the target object surface as the target identifier; The projected voxel layer is updated to the current voxel layer, and the step of vertically projecting the current voxel layer is returned to be executed until the projected voxel layer does not contain the surface of the target object.

5. The method according to claim 3 or 4, characterized in that: The preset condition includes that the height of the voxels in the current voxel layer relative to the preset reference line is less than the preset building base height.

6. The method according to claim 1, characterized in that In the case where the target object is determined to be a building based on the target voxel, determining triangular facets constituting the building according to the target voxel includes: determining a total height of the target voxel in the voxel model; When the total height of the target voxel in the voxel model is greater than a preset threshold, determining that the target object is a high-rise building; The triangular facets constituting the high-rise building are determined according to the target voxels.

7. The method according to claim 1, characterized in that The step of determining the triangular facets constituting the building according to the target voxels comprises: Determine the triangular facet corresponding to the target voxel based on the stored correspondence between the voxels and the triangular facets; The triangular facet corresponding to the target voxel is determined as the triangular facet constituting the building.

8. A data processing device, characterized in that: The device comprises: A generation module, for generating a voxel model of a three-dimensional scene based on the image data; A first determination module is used to determine a first voxel layer containing vertices of the target object in the voxel model, and to search from the first voxel layer from top to bottom for a target voxel containing a surface of the target object; The second determination module is used to determine the triangular facets constituting the building according to the target voxels when the target object is determined to be a building based on the target voxels.

9. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.