CN115661404A - Multi-fine-grain tree real scene parametric modeling method - Google Patents

Multi-fine-grain tree real scene parametric modeling method Download PDF

Info

Publication number
CN115661404A
CN115661404A CN202211306819.1A CN202211306819A CN115661404A CN 115661404 A CN115661404 A CN 115661404A CN 202211306819 A CN202211306819 A CN 202211306819A CN 115661404 A CN115661404 A CN 115661404A
Authority
CN
China
Prior art keywords
tree
model
trunk
branches
point cloud
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.)
Pending
Application number
CN202211306819.1A
Other languages
Chinese (zh)
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.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN202211306819.1A priority Critical patent/CN115661404A/en
Publication of CN115661404A publication Critical patent/CN115661404A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a multi-fine-grain tree real scene parameterization modeling method, which comprises the following steps: dividing and clustering a plant canopy height model and a plant region point cloud model by combining a watershed algorithm and a clustering method, so as to realize single tree division of the plant region three-dimensional point cloud; determining tree species information and tree individual characteristic parameters in the plant area through single-tree multi-view image recognition and characteristic extraction; establishing a tree growth rule equation, and describing the growth of plants through a variable relation expressed by the equation; building a tree parameter information database, and storing tree category characteristic parameters, trunk and leaf material maps in a classified manner; reading the tree parameter information database according to the tree species information to obtain matched information, and combining the extracted individual characteristic parameters of the trees to realize the steps of constructing a multi-fine-grain tree three-dimensional model, assembling and pasting a material quality map; and generating and displaying a tree scene. The tree three-dimensional model building method can realize the rapid building of the tree three-dimensional model with multiple fine particle sizes and the efficient and smooth display of large-scale tree scenes.

Description

Multi-fine-grain tree real scene parameterization modeling method
Technical Field
The invention relates to the technical field of image processing and environmental modeling simulation, in particular to a multi-fine-grain tree real-scene parametric modeling method.
Background
Plants are important components of natural scenes, and in real scenes, the plants are various in variety, different in form and wide in distribution. Plants can be divided into herbaceous and woody plants, the latter generally being referred to collectively as trees, depending on the nature of the roots and stems. Trees can be subdivided into trees, shrubs and vines, depending on the height of the plant. The division is carried out according to the structural characteristics of the leaves, and the trees are mainly concentrated in dicotyledonous plants (broad leaf trees) and conifer (conifer trees). In addition, other seed plants such as bamboo, palm, ginkgo, etc. are also included.
In recent years, the three-dimensional reconstruction technology is widely applied to various fields, and is widely applied to battlefield environment simulation, smart cities, disaster monitoring and the like. The existing three-dimensional live-action modeling software can generate a high-resolution three-dimensional live-action model from a simple photo, but due to the limitation of the shooting visual angle and the space structure of an oblique photographic image and the defects of the modeling software, the finally generated scene model, particularly a plant region model, has the problems of a large amount of distortion, deformation, cavities and the like, the overall effect of scene three-dimensional reconstruction is influenced, and the integrity and the sense of reality of various ground objects, particularly tree three-dimensional models in the scene are in urgent need to be improved. Therefore, researching tree automatic modeling and improving the modeling quality of the tree model are one of the important subjects in the field of three-dimensional live-action modeling at the present stage.
The continuous development of computer graphics puts higher requirements on the reality and the interactivity of virtual scenes. When the viewpoint of the observer changes in the scene, the virtual scene observed by the observer changes correspondingly. To reduce the amount of computation and rendering overhead, the degree of refinement of the model in the field of view needs to be determined according to the viewpoint position. The tree model with multiple fine granularities is introduced into the three-dimensional modeling of the real scene, and the time efficiency, the memory efficiency and the sense of reality of the large-scale scene model construction are considered, so that the tree model is one of the leading-edge problems of the research in the field.
Disclosure of Invention
In view of the above, the present invention provides a multi-fine-grained tree real-scene parametric modeling method, which is used to solve the problems of model voids and distortion caused by surface reconstruction based on an oblique photographic image, and to implement rapid construction of a multi-fine-grained tree three-dimensional model and efficient and smooth display of a large-scale tree scene.
The invention provides a multi-fine-grain tree real scene parameterization modeling method, which comprises the following steps:
s1: dividing and clustering a plant canopy height model and a plant region point cloud model by combining a watershed algorithm and a clustering method, so as to realize single tree division of the plant region three-dimensional point cloud;
s2: determining tree species information and tree individual characteristic parameters in the plant area through single-tree multi-view image recognition and characteristic extraction;
s3: establishing a tree growth rule equation, and describing the growth of plants through a variable relation expressed by the equation;
s4: building a tree parameter information database, and storing tree category characteristic parameters, trunk and leaf material maps in a classified manner;
s5: reading the tree parameter information database according to the tree species information to obtain matched information, and combining the extracted individual characteristic parameters of the trees to realize the steps of constructing a multi-fine-grain tree three-dimensional model, assembling and pasting a material quality map;
s6: and generating and displaying a tree scene.
Further, the algorithm process of the plant area three-dimensional point cloud single tree segmentation in the S1 is as follows:
s1-1: utilizing a Point Cloud filter statistical outlierRemoval provided in a Point Cloud Library PCL (Point Cloud Library) to perform statistical analysis on three-dimensional Point clouds in a plant area in a scene, removing outliers and finishing a filtering process;
s1-2: generating a plant canopy height grid model by a sampling and interpolation calculation method;
s1-3: mapping the actual height of the plant canopy in the plant canopy height grid model to a range of 0-255 to generate a single-channel image of the plant canopy height;
s1-4: water shed is adopted, a mark image-based watershed algorithm is adopted to segment single-channel images of the plant canopy height to obtain single tree contours in a scene, and image segmentation results are mapped to a plant area three-dimensional point cloud model to realize primary single tree segmentation;
s1-5: and (4) performing segmentation again on the single-wood point cloud with the diameter exceeding the threshold value by using a K-means clustering algorithm.
Up to this point, the plant area three-dimensional point cloud model has been segmented and clustered into a series of single wood point clouds, and the diameter of each single wood point cloud is within a reasonable range.
Further, in S2, the algorithm for determining the tree species information and the tree individual characteristic parameters includes:
s2-1: mapping the single tree point cloud coordinates back to the oblique photographic image according to a coordinate mapping relation from a three-dimensional point cloud coordinate system to a two-dimensional image pixel coordinate system and in combination with pose parameters of a camera for shooting the oblique photographic image, and acquiring a multi-view image of the tree scenery;
s2-2: self-making a plant image data set, training a plant classification network, identifying the multi-view images of the tree scenery by using the network, and determining the tree species information in the scene;
s2-3: and calculating the coordinates, height and diameter of the single tree point cloud center point, and determining the individual characteristic parameters of the trees.
So far, tree species information and individual characteristic parameters of trees in the scene are determined.
Further, the algorithm flow of establishing the tree growth rule equation in S3 is as follows:
s3-1: reading and calculating characteristic parameters of trunks and branches of the current layer and modeling;
s3-2: calculating the characteristic parameters of the next layer of branches according to the characteristic parameters of the trunks and the branches of the current layer;
s3-3: after the modeling of the trunk and the branches is finished, blades grow at the proper positions of the branches according to the growth relation of the real branches and the leaves.
At this moment, a tree growth rule equation is established, tree commonality parameters are embedded in the tree growth rule equation, and tree category parameters, tree individual characteristic parameters and environment parameter interfaces are reserved.
Further, in S4, the algorithm flow for constructing the tree parameter information database is as follows:
s4-1: determining tree category characteristic parameters according to the appearance characteristics and topological structures of trees of different categories, and storing the tree category characteristic parameters in a tree parameter information database, wherein the tree category characteristic parameters comprise at least one of the following parameters: the tree number of layers, the bending angle of the trunk and the branches, the initial position, the initial growth direction, the length of the trunk and the branches, the radius of the initial end of the trunk and the branches, the parent-child information of the branches, the rotation angle between the trunk and the branches and the length-width ratio of blades;
s4-2: generating tree trunk and leaf material mapping data for different types of trees, and storing the data in a tree parameter information database.
Further, the algorithm flow for generating the multi-fine-grained tree model building, assembling and material mapping in S5 is as follows:
s5-1: and constructing a standard tree three-dimensional model. According to the tree species information identified in the S2-2, reading tree species characteristic parameters in the tree parameter information database, combining the tree individual characteristic parameters extracted in the S2-3, including tree height and crown radius, and modeling the trees in the scene according to the tree growth rule equation to obtain the standard tree three-dimensional model;
s5-2: reading the material mapping data of the trunk and the leaves in the tree parameter information database according to the tree species information, and mapping the standard tree three-dimensional model by using the baked material mapping;
s5-3: constructing a tree three-dimensional model with multiple fine granularities on the basis of the standard tree three-dimensional model by adopting a curved surface triangular mesh simplification algorithm;
s5-4: and carrying out material mapping on the tree three-dimensional model with multiple fine particle sizes.
So far, the construction, assembly and material mapping of a multi-fine-grained tree model have been realized.
Further, in S6, the algorithm flow for generating and displaying the tree scene is as follows:
s6-1: importing a multi-fine-grained tree three-dimensional model from a model library to a corresponding position in a scene according to the single tree point cloud central point coordinates obtained through calculation in the S2-3 in a rendering engine;
s6-2: setting a display level of the multi-fine-grained tree three-dimensional model according to the viewpoint of an observer, the distance of the model and the size of a projection area of a scene in a scene, wherein when the viewpoint distance model is smaller than a first threshold value, the details of the multi-fine-grained tree three-dimensional model are allowed to be observed; and when the viewpoint distance model is larger than a second threshold value, in order to ensure that the whole scene runs smoothly when the viewpoint changes, the details of the tree three-dimensional model with multiple fine granularities are not displayed. Finally, the tree scene display of the smooth transition of the multiple fine-grained models is realized, and the calculation speed and the rendering efficiency are improved.
Compared with the surface reconstruction of the traditional real-scene three-dimensional modeling software, the multi-fine-grained tree real-scene parameterized modeling method provided by the invention has the advantages that:
(1) By parametric modeling, the integrity of the whole tree model and the authenticity of details are ensured, and the problems of model holes, distortion and deformation caused by the angle limitation of oblique photographic images are avoided;
(2) The tree model multi-LOD (Level of Detail) display is supported, the tree models are flexibly loaded and unloaded according to the viewpoint and the angle of an observer, the calculation speed and the rendering efficiency of large-scale scenes are improved, and the efficient and smooth display of the scenes is ensured.
Drawings
In order to illustrate embodiments of the present invention or technical solutions in the prior art more clearly, the drawings which are needed in the embodiments will be briefly described below, so that the features and advantages of the present invention can be understood more clearly by referring to the drawings, which are schematic and should not be construed as limiting the present invention in any way, and for a person skilled in the art, other drawings can be obtained on the basis of these drawings without any inventive effort. Wherein:
FIG. 1 is a flow chart of a multi-fine-grain tree real-scene parameterization modeling method provided by the embodiment of the invention;
FIG. 2 is a flow chart of point cloud single tree segmentation provided by an embodiment of the invention;
FIG. 3 is a diagram illustrating a single-tree segmentation result of a local scene according to an embodiment of the present invention;
FIG. 4 is a flowchart of tree species information and individual characteristic parameter identification and calculation according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a multi-view image mapping result of a tree scene in a scene according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of tree species information and individual characteristic parameter identification and calculation results in a certain area in a scene according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a tree parameter information database according to an embodiment of the present invention;
FIG. 8 is a flow chart of a multi-fine-grained tree model construction provided by an embodiment of the present invention;
FIG. 9 is a schematic diagram of a multi-fine-grained tree model in a scene according to an embodiment of the present invention;
fig. 10 is a schematic view showing a tree scene model according to an embodiment of the present invention.
Detailed Description
In order to make the technical scheme of the present invention clearer, the present invention is further explained with reference to the attached drawings. The overall flow chart is shown in fig. 1.
Specifically, the multi-fine-grain tree real-scene parameterization modeling method specifically comprises the following steps:
s1: and (4) combining a watershed algorithm and a clustering method to segment and cluster the plant canopy height model and the plant area point cloud model, so as to realize single tree segmentation of the plant area three-dimensional point cloud.
As shown in the flow chart of fig. 2, the specific algorithm flow of the plant area three-dimensional point cloud single tree segmentation is as follows:
s1-1: utilizing a Point Cloud filter statistical outlierRemoval provided in a Point Cloud Library PCL (Point Cloud Library), carrying out statistical analysis on three-dimensional Point clouds in a plant area in a scene, removing outliers, and finishing a filtering process.
S1-2: and generating a plant canopy height grid model by a sampling and interpolation calculation method. In the scene example of the invention, a point cloud of a certain local plant area has a length Δ x =15m and a width Δ y =15m, and has 759035 points, as shown in fig. 3 (a), and the algorithm is used to generate an 8192 by 8192 plant canopy height grid model, as shown in fig. 3 (b). With i row and j column grid points P ij For example, the specific calculation procedure of the plant canopy height at this point is as follows:
s1-2-1: searching point clouds in the neighborhood and solving a sampling average value:
Figure BDA0003906170020000051
Figure BDA0003906170020000052
wherein, the actual distance r =0.00183m of the point cloud coordinate system corresponding to one grid of the grid image is used as the radius to search for P ij N point clouds in neighborhood r Point; note that the elevation of the k-th point in the neighborhood is
Figure BDA0003906170020000053
Adding and calculating the average value of all point cloud elevations in the neighborhood, and P ij Topographic elevation g of ij Making a difference, obtaining P preliminarily ij Height of plant canopy
Figure BDA0003906170020000054
S1-2-2: and (3) refining the height data of the canopy of the grid plant by adopting an Inverse distance weighted interpolation algorithm (IDW):
Figure BDA0003906170020000061
Figure BDA0003906170020000062
Figure BDA0003906170020000063
wherein, taking P ij Grid points in the range of 7*7 serve as neighborhoods, and the m-th row and n-th column of grid points P in the neighborhoods mn Distance to the center point squared is
Figure BDA0003906170020000064
P mn To P ij Weight coefficient of
Figure BDA0003906170020000065
And
Figure BDA0003906170020000066
in inverse proportion, mu is a weight parameter, and the value is 2 in the example; calculating P after filtering according to the weight coefficient ij Height of plant canopy
Figure BDA0003906170020000067
And finally obtaining the plant canopy height grid model.
S1-3: and mapping the actual height of the plant canopy in the plant canopy height grid model to an interval of 0-255 to generate a 8192 by 8192 single-channel image of the plant canopy height. The larger the image gray value is, the higher the plant canopy height at the corresponding position is, the smaller the gray value is, the lower the plant canopy height at the corresponding position is, and the gray value corresponding to the non-plant region is 0.P ij Corresponding to a single channel value p ij The specific calculation formula of (2) is as follows:
Figure BDA0003906170020000068
s1-4: the method comprises the steps of segmenting a single-channel image with the height of a plant canopy layer by utilizing a watershed algorithm based on a marked image in the classical watershed algorithm cv in the field of image segmentation in OpenCV to obtain a single-tree contour in a scene, mapping an image segmentation result to a plant area three-dimensional point cloud model to obtain a single-tree point cloud, and realizing primary single-tree segmentation. The specific process is as follows:
s1-4-1: removing noise points in the image by using an opening operation, and performing expansion operation on the de-noised image to obtain a determined background area;
s1-4-2: performing distance transformation on the image by using cv, replacing a pixel value with a distance value between a pixel point in the image and a background, wherein the farther the pixel point is away from the background, the larger the distance value is, the higher the possibility of being a foreground is, and setting a reasonable threshold value to perform binarization processing on the image after the distance transformation to obtain a determined foreground area;
s1-4-3: and c, using cv, connecting component to mark different connected domains in the foreground region from 1 in sequence, marking the background as 0, using the 0 as a seed point of a watershed algorithm, and segmenting the single-channel image with the plant canopy height to obtain the single-tree contour in the scene instance.
S1-4-4: and mapping the image segmentation result into a plant area three-dimensional point cloud model, and performing segmentation processing on the plant area three-dimensional point cloud to obtain the single-tree point cloud. Finally, the preliminary single-tree segmentation is realized, and the single-tree contour in the scene instance is obtained as shown in fig. 3 (c).
S1-5: and (3) performing subdivision on the single wood point cloud with the diameter exceeding a threshold value by using a K-means clustering algorithm, wherein the K-means clustering algorithm is used for realizing the minimization of the sum of squares of distances from sample points in the point cloud to corresponding clustering centers of the sample points through iteration. In order to avoid the problem that tall trees are segmented by mistake in the longitudinal direction in the clustering process, when the spatial distance between two sample points is calculated, the weight alpha occupied by the longitudinal distance between the two sample points is reduced according to a preset rule, and the specific calculation formula is as follows:
Figure BDA0003906170020000071
the optimization method is equivalent to longitudinally compressing the three-dimensional point cloud of the plant scene, and the problem of longitudinal error segmentation is effectively avoided. In this example, the weight α of the longitudinal distance is 0.1, which can achieve a better point cloud segmentation effect.
Finally, the single-tree segmentation result of the local scene instance is shown in fig. 3 (d). Up to this point, a plant area three-dimensional point cloud model has been segmented and clustered into a series of single-wood point clouds, and the diameter of each single-wood point cloud is within a reasonable range.
S2: and determining tree species information and tree individual characteristic parameters in the plant region through single-tree multi-view image recognition and characteristic extraction.
As shown in the flowchart of fig. 4, the specific algorithm flow for determining the tree species information and the tree individual characteristic parameters is as follows:
s2-1: and mapping the single-tree point cloud coordinate back to the oblique photographic image according to the coordinate mapping relation between the three-dimensional point cloud coordinate system and the two-dimensional image pixel coordinate system and the pose parameter of the camera for shooting the oblique photographic image to obtain the multi-view image of the tree scenery. The specific calculation formula is as follows:
Figure BDA0003906170020000072
wherein the camera rotation matrix
Figure BDA0003906170020000073
Relative displacement exists between the optical center of the camera and the coordinate origin of the point cloud coordinate system
Figure BDA0003906170020000081
The focal length of the camera is f; d u ,d v Respectively representing the corresponding physical dimensions of the unit pixel in the x and y directions of the image coordinate system,
Figure BDA0003906170020000082
the number of pixel points included in the unit length of the image coordinate system is expressed, if the unit length is one inch,
Figure BDA0003906170020000083
i.e. the image metric unit DPI (Dot Per Inch), u 0 、v 0 Is the coordinate of the origin of the image coordinate system in the pixel coordinate system. A single-wood point cloud in the scene example is mapped to the oblique-photograph original image as shown in fig. 5 (a), and the mapping result is shown in fig. 5 (b).
S2-2: self-making a plant image data set, training a plant classification network, identifying the multi-view images of the tree scenery by using the network, and determining the tree species information in the scene. The homemade plant image data set comprises a plurality of common plants, including 6 types of arborvitae, robinia pseudoacacia, erythrina indica, spruce, ginkgo and camphor tree, and 4200 pictures in total; taking the pre-training results of VGG16 and inclusion-v 3 on the ImageNet image data set as a pre-training model, performing migration learning on the self-made plant image data set, and training a plant classification network; the network is used for identifying the multi-view images of the tree scenery and determining the tree species information in the scene.
S2-3: and determining individual characteristic parameters of the trees by calculating the coordinates, the height and the diameter of the point cloud central point of the single tree.
So far, the tree species information and the individual characteristic parameters of the trees in the scene are determined, and the identification and calculation result of a certain area in the scene example is shown in fig. 6.
S3: and establishing a tree growth rule equation, and describing the growth of the plants through the variable relation expressed by the equation.
The standard tree model comprises a trunk, branches at all levels and leaves, the branches and leaves at each level are constructed in a grading manner, and a parent-child relationship is established. And embedding tree commonality parameters in the equation, and reserving tree category parameters, tree individual characteristic parameters and environment parameter interfaces. The basic parameters are listed below:
Figure BDA0003906170020000084
Figure BDA0003906170020000091
the specific algorithm flow for establishing the tree growth rule equation is as follows:
s3-1: and reading and calculating the characteristic parameters of the trunk and the branches of the current layer and establishing a tree growth rule equation. In the modeling process, basic units of the tree model are points, lines and surfaces, a basic component is a polygonal cylinder, and the smoothness of the trunk and branches is ensured by setting the number of sides of the polygonal cylinder to be not less than 8, namely, the resolution > =8 of the cross section of the spline is adjusted; in order to realize the bending effect of the tree trunk branches, a plurality of sections of cylindrical splines are constructed for each tree trunk branch, a certain rotation angle curve exists among the plurality of sections of cylindrical splines, the plurality of sections of cylindrical splines are connected into the bent tree trunk branches, and the specific calculation formulas of the parameters of the plurality of sections of cylindrical splines are as follows:
Figure BDA0003906170020000092
Figure BDA0003906170020000093
Figure BDA0003906170020000094
wherein the radius of the starting end of the branch of the nth layer of the tree trunk is radS n Radius of end being rad n The bending angle is curve n Length of length n Setting the number seg of the tree trunk and branch segments n The bending angle of the kth section of the columnar spline is curve n|k Length of the columnar spline n|k The radius of the starting end of the columnar spline is radS n|k
In real scene, the branch direction of the treeThe multi-direction growth, for guaranteeing that the orientation of branch accords with the natural growth law, when calculating the originated growth direction quat of branch, need combine branch and father level trunk branch between contained angle downAngle and trunk branch between contained angle rotate calculate. In the equation, the included angle rotate existing between all trunk branches of the current layer is considered n Recording the included angle between the initial branch orientation of the layer and the y axis as rotate n|0 The mth branch faces rotate n|m The specific calculation formula of (A) is as follows:
rotate n|m =rotate n|0 +(m-1)*rotate n
s3-2: and calculating the branch characteristic parameters of the next layer according to the branch characteristic parameters of the trunk of the current layer. After the tree branch model of the current layer trunk is constructed, various parameters of the branch of the sub-level are determined according to the known parameter information, including the starting position, the starting point orientation and the starting end radius of the branch.
The specific calculation formula of the radius of the starting end of the branch at the subordinate level is as follows:
Figure BDA0003906170020000101
Figure BDA0003906170020000102
Figure BDA0003906170020000103
wherein, the next sublevel of the branch of the nth layer of the trunk, namely the number of the branches of the (n + 1) th layer is child n The starting position of the mth branch is at the kth branch n|m Segment spline and kth n|m Add between +1 segment of spline n|m The radius of the starting end of the branch at the sub level is radS n+1|m . And storing the characteristic parameters in a list, circularly executing S3-1 to S3-2, and continuing modeling of the next layer according to data in the list until the modeling of all layers of trunk branches is completed.
S3-3: after the modeling of the trunk and the branches is finished, blades grow at the proper positions of the branches according to the growth relation of the real branches and the leaves.
And at this moment, after the tree growth rule equation is established, tree commonality parameters are embedded in the tree growth rule equation, and tree category parameters, tree individual characteristic parameters and environment parameter interfaces are reserved, so that the parameterized modeling of specific trees in the scene can be conveniently carried out subsequently.
S4: and (4) building a tree parameter information database, and storing the tree category characteristic parameters, the trunk and the leaf material maps in a classified manner.
The specific algorithm flow for establishing the tree parameter information database is as follows:
s4-1: determining tree category characteristic parameters according to the appearance characteristics and topological structures of trees of different categories, and storing the tree category characteristic parameters in a tree parameter information database, wherein the tree category characteristic parameters comprise at least one of the following parameters: the tree comprises the tree layer number, a tree trunk and branch bending angle, an initial position, an initial growth direction, tree trunk and branch lengths, tree trunk and branch initial end radiuses, branch parent-child generation information, tree trunk and branch rotation angles and a blade length-width ratio.
S4-2: generating tree trunk and leaf material mapping data for different types of trees, and storing the data in a tree parameter information database. The specific process of generating the trunk and leaf material data is as follows:
s4-2-1: in a Shader Editor (Shader Editor) of a blend, generation of programmed node materials is realized, and a default material node principal BSDF is mainly used to simulate the reflection and scattering effects of light on the surface of an object in the real world. The chartlet is generated into material by a shader editor, and the material structure corresponds to the tree category one by one.
S4-2-2: the trunk and leaf materials of each type of tree are respectively baked, and the material, the grid and other attributes of the model, including texture, surface unevenness and other information, are combined with illumination data in a scene to manufacture a special 2D material mapping. The generated map by baking can store some data generated during rendering, so that the final rendering performance is accelerated, and the rendering calculation time is effectively saved. And storing the baked trunk and leaf material mapping data in a tree parameter information database.
So far, a tree growth rule equation is established, a tree parameter information database is established, the tree parameter information database comprises tree category characteristic parameters and a tree trunk and leaf material mapping, and the final structure of the database is shown in fig. 7.
S5: and reading the tree parameter information database according to the tree species information to obtain matched information, and combining the extracted individual characteristic parameters of the trees to realize the steps of constructing a multi-fine-grain tree three-dimensional model, assembling and pasting a material quality map.
As shown in the flow chart of fig. 8, the algorithm flow of the multi-fine-grained tree model construction, assembly and material mapping is as follows:
s5-1: and constructing a standard tree three-dimensional model. And (3) reading tree category characteristic parameters in the tree parameter information database according to the tree species information identified in the step (S2-2), and modeling the trees in the scene according to the tree growth rule equation by combining the tree individual characteristic parameters extracted in the step (S2-3) including the tree height and the crown radius to obtain the standard tree three-dimensional model, as shown in the step (a) of FIG. 9.
S5-2: and reading the material mapping data of the trunk and the leaves in the tree parameter information database according to the tree species information, and mapping the standard tree three-dimensional model by using the baked material mapping.
S5-3: and constructing a multi-fine-grain tree three-dimensional model on the basis of the standard tree three-dimensional model by adopting a curved surface triangular mesh simplification algorithm. The resource allocation of object rendering is determined according to the positions and the importance of the nodes of the model in the display environment, the number of faces and the number of details of non-important objects are reduced, and therefore high-efficiency rendering calculation is achieved. The specific algorithm flow of the multi-fine-grain tree three-dimensional model is as follows:
s5-3-1: and simplifying the curved surface of the standard tree three-dimensional model, and reducing the number of vertexes and patches of the standard model LOD0 at the level of detail under the condition of not changing the shape of the model mesh as much as possible. The curved surface simplification algorithm is as follows: and combining two vertexes of one side of the model into one vertex by using a side collapse algorithm, introducing secondary error measurement for ensuring smooth visual transition formed between fine-grained models, calculating model errors caused by side collapse, namely the sum of vertical distances between a new vertex formed by collapse and original planes, and selecting a plurality of sides with the minimum weight for collapse. And (3) simplifying the curved surface of the standard model of the level of detail LOD0 to generate models with different resolutions, and completing the construction of the model of the level of detail LOD1-2, wherein the model of the level of detail LOD1 and the model of the LOD2 are respectively shown in fig. 9 (b) and 9 (c).
S5-3-2: a simple three-panel intersection model is built for the final level of detail LOD3 model, as shown in fig. 9 (d).
S5-3-3: and respectively naming the multi-fine-granularity models as tree _ LODn, and simultaneously deriving all levels of models in fbx format to realize the assembly of the multi-fine-granularity tree three-dimensional model.
S5-4: and carrying out material mapping on the tree three-dimensional model with the multiple fine particle sizes. Wherein, the level of detail LOD1-2 model inherits the texture map of the level of detail LOD0 model. The final level of detail LOD3 model is a three-panel cross model and a material map needs to be made again. In order to ensure that different fine-grained models are switched naturally in the viewpoint moving process, the LOD0 standard model of the level of detail is shot from a plurality of visual angles and used as a material chartlet of the three-side cross model.
So far, the construction, assembly and material mapping of a multi-fine-grained tree three-dimensional model are realized. A multi-fine-grained three-dimensional model of a tree in the scene instance is shown in fig. 9.
S6: and generating and displaying a tree scene.
The specific algorithm flow for generating the tree scene is as follows:
s6-1: and importing a multi-fine-grained tree three-dimensional model from a model library to a corresponding position in a scene according to the single tree point cloud central point coordinates obtained by calculation in the S2-3 in a rendering engine.
S6-2: setting a display level of the multi-fine-grained tree three-dimensional model according to the viewpoint of an observer, the distance of the model and the size of a projection area of a scene in a scene, wherein when the viewpoint distance model is smaller than a first threshold value, the details of the multi-fine-grained tree three-dimensional model are allowed to be observed; and when the viewpoint distance model is larger than a second threshold value, in order to ensure that the whole scene runs smoothly when the viewpoint changes, the details of the tree three-dimensional model with multiple fine granularities are not displayed. Finally, the tree scene with multiple fine-grained models in smooth transition is displayed in real time, the calculation speed and the rendering efficiency are improved, and the constructed scene model is shown in fig. 10.
The above-described embodiments are merely preferred embodiments of the present invention, which is not intended to limit the present invention in any way. Those skilled in the art can make many changes, modifications, and equivalents to the embodiments of the invention without departing from the scope of the invention as set forth in the claims below. Therefore, equivalent variations made in accordance with the spirit of the present invention should be covered by the protection scope of the present invention without departing from the content of the technical scheme of the present invention.

Claims (9)

1. A multi-resolution tree real scene parameterization modeling method is characterized by comprising the following steps:
s1: dividing and clustering a plant canopy height model and a plant region point cloud model by combining a watershed algorithm and a clustering method, so as to realize single tree division of the plant region three-dimensional point cloud;
s2: determining tree species information and tree individual characteristic parameters in the plant area through single-tree multi-view image recognition and characteristic extraction;
s3: establishing a tree growth rule equation, and describing the growth of plants through a variable relation expressed by the equation;
s4: building a tree parameter information database, and storing tree category characteristic parameters, trunk and leaf material maps in a classified manner;
s5: reading the tree parameter information database according to the tree species information to obtain matched information, and combining the extracted individual characteristic parameters of the trees to realize the steps of constructing a multi-fine-grain tree three-dimensional model, assembling and pasting a material quality map;
s6: and generating and displaying a tree scene.
2. The method according to claim 1, wherein S1 comprises the steps of:
s1-1: utilizing a point cloud filter Statistical Outlierremoval provided in a point cloud base PCL to perform statistical analysis on three-dimensional point clouds in a plant area in a scene, removing outliers and finishing a filtering process;
s1-2: generating a plant canopy height grid model by a sampling and interpolation calculation method;
s1-3: mapping the actual height of the plant canopy in the plant canopy height grid model to a range of 0-255 to generate a plant canopy height single-channel image P ij Corresponding to a single channel value p ij The specific calculation formula of (2) is as follows:
Figure FDA0003906170010000011
s1-4: segmenting the plant canopy height gray level image by adopting a watershed algorithm based on a marked image to obtain a single tree outline in a scene, and mapping an image segmentation result to a plant area three-dimensional point cloud model to realize primary single tree segmentation;
s1-5: the tree point cloud with the diameter exceeding a threshold value is subdivided by utilizing a K-means clustering algorithm, the K-means clustering algorithm is used for realizing the minimization of the sum of squares of distances from sample points in the point cloud to corresponding clustering centers of the sample points through iteration, wherein when the space distance between the two sample points is calculated, the weight alpha occupied by the longitudinal distance between the two sample points is reduced according to a preset rule, and the specific calculation formula is as follows:
Figure FDA0003906170010000012
3. method according to claim 2, characterized in that in the step S1-2, for the ith row and j columns of grid points P ij The specific algorithm process of the plant canopy height of the pointThe following were used:
s1-2-1: searching point clouds in a neighborhood and solving a sampling mean value:
Figure FDA0003906170010000021
Figure FDA0003906170010000022
wherein, deltax and Deltay are respectively the length and width of the point cloud of the plant area, and P is searched by taking the actual distance r of the point cloud coordinate system corresponding to one grid of the raster image as the radius ij N point clouds in neighborhood r Point; note that the elevation of the k-th point in the neighborhood is
Figure FDA0003906170010000023
Adding and calculating the average value of all point cloud elevations in the neighborhood, and P ij Height g ij Making a difference to obtain P preliminarily ij Height of plant canopy
Figure FDA0003906170010000024
S1-2-2: and (3) improving the height data of the canopy of the grid plant by adopting an inverse distance weighted interpolation algorithm IDW:
Figure FDA0003906170010000025
Figure FDA0003906170010000026
Figure FDA0003906170010000027
wherein, taking P ij Grid points in the range of 7*7 serve as neighborhoods, and the m-th row and n-th column of grids in the neighborhoodsLattice point P mn Distance squared to the center point of
Figure FDA0003906170010000028
P mn To P ij Weight coefficient of (2)
Figure FDA0003906170010000029
And
Figure FDA00039061700100000210
inversely proportional, mu is a weight parameter; calculating P after filtering according to the weight coefficient ij Height of plant canopy
Figure FDA00039061700100000211
And finally obtaining the plant canopy height grid model.
4. The method of claim 1, wherein the S2 comprises:
s2-1: mapping single tree point cloud coordinates of the plant area three-dimensional point cloud back to the oblique photographic image according to a coordinate mapping relation between a three-dimensional point cloud coordinate system and a two-dimensional image pixel coordinate system in combination with pose parameters of a camera for shooting the oblique photographic image, and acquiring a tree scene multi-view image;
s2-2: self-making a plant image data set, training a plant classification network, identifying the multi-view images of the tree scenery by using the network, and determining the tree species information in the scene;
s2-3: and determining individual characteristic parameters of the trees by calculating the coordinates, the height and the diameter of the point cloud central point of the single tree.
5. The method according to claim 1, wherein said S3 comprises the steps of:
s3-1: reading, calculating current layer trunk branch characteristic parameter and establishing trees growth rule equation, wherein, at the modeling in-process, the tree model basic unit is point, line, face, and basic component is the polygon cylinder, through setting up the smoothness that the trunk branch was guaranteed not less than 8 to the limit number of polygon cylinder constructs multistage column spline for each trunk branch, there is certain rotation angle cure between the multistage column spline, by multistage column spline connects into crooked trunk branch, the concrete formula of calculating of each parameter of multistage column spline is as follows:
Figure FDA00039061700100000212
Figure FDA0003906170010000031
Figure FDA0003906170010000032
wherein the radius of the starting end of the branch of the nth layer of the trunk is radS n End radius of radE n The bending angle is curve n Length of Length n Setting the number seg of the segments of the trunk and the branches n The bending angle of the kth section of the columnar spline is curve n|k Length of the columnar sample strip n|k Radius of starting end of spline is radS n|k
When calculating the initial growth direction quat of the branches, the angle between the branches of the branches and the branches of the parent-level trunk and the angle between the branches of the trunk are required to be combined for calculation, and the angle between all the branches of the trunk of the current layer is considered in the equation n Recording the included angle between the initial branch orientation of the layer and the y axis as rotate n|0 The mth branch faces rotate n|m The specific calculation formula of (A) is as follows:
rotate n|m =rotate n|0 +(m-1)*rotate n
s3-2: calculating the characteristic parameters of the next layer of branches according to the characteristic parameters of the current layer of trunk branches, and determining various parameters of the subordinate branches according to the known parameter information after the construction of the current layer of trunk branch model is completed, wherein the parameters comprise the initial position, the initial point orientation and the initial end radius of the branches;
the specific calculation formula of the radius of the starting end of the branch at the subordinate level is as follows:
Figure FDA0003906170010000033
Figure FDA0003906170010000034
Figure FDA0003906170010000035
wherein, the next sublevel of the branch of the nth layer of the trunk, namely the number of the branches of the (n + 1) th layer is child n The starting position of the mth branch is at the kth branch n|m Segment spline and kth n|m Add between +1 segment of spline n|m The radius of the starting end of the branch at the sub level is radS n+1|m
Storing the characteristic parameters in a list, circularly executing S3-1 to S3-2, and continuing modeling of the next layer according to data in the list until the modeling of all layers of trunk branches is completed;
s3-3: after modeling of the trunk and the branches is completed, blades grow at proper positions of the branches according to the growth relation of real branches and leaves, wherein tree common parameters are embedded in the tree growth rule equation, tree category parameters, tree individual characteristic parameters and environment parameter interfaces are reserved, and accordingly subsequent parameterized modeling of specific trees in a scene is facilitated.
6. The method of claim 1, wherein the tree parameter information database in S4 is constructed by:
s4-1: determining tree category characteristic parameters according to appearance characteristics and topological structures of trees of different categories, and storing the tree category characteristic parameters in a tree parameter information database, wherein the tree category characteristic parameters comprise at least one of the following parameters: the tree growth method comprises the following steps of (1) the number of tree layers, a bending angle of a trunk and branches, an initial position, an initial growth direction, the length of the trunk and branches, the radius of an initial end of the trunk and branches, information of parent and child branches, a rotation angle between the trunk and the branches and a length-width ratio of blades;
s4-2: generating tree trunk and leaf material mapping data for different types of trees, and storing the data in a tree parameter information database.
7. The method according to claim 4, wherein the S5 comprises the steps of:
s5-1: building a standard tree three-dimensional model, wherein tree category characteristic parameters in the tree parameter information database are read according to the tree species information identified in the step S2-2, and the tree in the scene is modeled according to the tree growth rule equation by combining the tree individual characteristic parameters extracted in the step S2-3, including the tree height and the crown radius;
s5-2: reading the material mapping data of the trunk and the leaves in the tree parameter information database according to the tree species information, and mapping the standard tree three-dimensional model by using the baked material mapping;
s5-3: constructing a multi-fine-grained tree three-dimensional model on the basis of the standard tree three-dimensional model by adopting a curved surface triangular mesh simplification algorithm, wherein the resource allocation of object rendering is determined according to the positions and the importance of the nodes of the model in a display environment;
s5-4: and carrying out material mapping on the tree three-dimensional model with the multiple fine particle sizes.
8. The method of claim 7, wherein the multi-fine grained tree three-dimensional model in S5-3 is constructed by:
s5-3-1: simplifying the curved surface of the standard tree three-dimensional model, and reducing the number of vertexes and patches of the standard model of level of detail LOD0 under the condition of not changing the shape of the model mesh as much as possible; the curved surface simplification algorithm is as follows: combining two vertexes of one side of the model into one vertex by using a side collapse algorithm, introducing secondary error measurement for ensuring smooth visual transition formed between fine-grained models, calculating model errors caused by side collapse, selecting a plurality of sides with the minimum weight for collapse, carrying out surface simplification on a detail level LOD0 standard model, generating models with different resolutions, and completing construction of a detail level LOD1-2 model;
s5-3-2: establishing a simple three-panel cross model for the last level of detail LOD3 model;
s5-3-3: and respectively naming the multi-fine-granularity models as tree _ LODn, and simultaneously deriving all levels of models in fbx format to realize the assembly of the multi-fine-granularity tree three-dimensional model.
9. The method according to claim 4, wherein said S6 comprises the steps of:
s6-1: importing a multi-fine-grained tree three-dimensional model from a model library to a corresponding position in a scene according to the single tree point cloud central point coordinates obtained through calculation in the S2-3 in a rendering engine;
s6-2: setting a display level of the tree three-dimensional model with multiple fine grain sizes according to the viewpoint of an observer, the distance of the model and the size of a projection area of a scene, wherein when the viewpoint distance is smaller than a first threshold value, the details of the tree three-dimensional model with multiple fine grain sizes are allowed to be observed; and when the viewpoint distance is greater than a second threshold value, in order to ensure that the whole scene runs smoothly when the viewpoint changes, the details of the tree three-dimensional model with multiple fine granularities are not displayed.
CN202211306819.1A 2022-10-25 2022-10-25 Multi-fine-grain tree real scene parametric modeling method Pending CN115661404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211306819.1A CN115661404A (en) 2022-10-25 2022-10-25 Multi-fine-grain tree real scene parametric modeling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211306819.1A CN115661404A (en) 2022-10-25 2022-10-25 Multi-fine-grain tree real scene parametric modeling method

Publications (1)

Publication Number Publication Date
CN115661404A true CN115661404A (en) 2023-01-31

Family

ID=84990964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211306819.1A Pending CN115661404A (en) 2022-10-25 2022-10-25 Multi-fine-grain tree real scene parametric modeling method

Country Status (1)

Country Link
CN (1) CN115661404A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152256A (en) * 2023-04-21 2023-05-23 长沙能川信息科技有限公司 Tree growth simulation method, device, equipment and storage medium
CN116630552A (en) * 2023-07-26 2023-08-22 北京中科辅龙智能技术有限公司 Optimized rendering method for large-scale three-dimensional process factory model
CN117271859A (en) * 2023-11-22 2023-12-22 中国建筑西南设计研究院有限公司 Method, device and equipment for rapidly generating landscape engineering parameter information

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152256A (en) * 2023-04-21 2023-05-23 长沙能川信息科技有限公司 Tree growth simulation method, device, equipment and storage medium
CN116630552A (en) * 2023-07-26 2023-08-22 北京中科辅龙智能技术有限公司 Optimized rendering method for large-scale three-dimensional process factory model
CN116630552B (en) * 2023-07-26 2023-11-07 北京中科辅龙智能技术有限公司 Optimized rendering method for large-scale three-dimensional process factory model
CN117271859A (en) * 2023-11-22 2023-12-22 中国建筑西南设计研究院有限公司 Method, device and equipment for rapidly generating landscape engineering parameter information
CN117271859B (en) * 2023-11-22 2024-01-30 中国建筑西南设计研究院有限公司 Method, device and equipment for rapidly generating landscape engineering parameter information

Similar Documents

Publication Publication Date Title
CN113128405B (en) Plant identification and model construction method combining semantic segmentation and point cloud processing
CN115661404A (en) Multi-fine-grain tree real scene parametric modeling method
KR101165534B1 (en) Geospatial modeling system providing simulated tree trunks and branches for groups of tree crown vegetation points and related methods
CN110084817B (en) Digital elevation model production method based on deep learning
CN114529707B (en) Three-dimensional model segmentation method and device, computing equipment and readable storage medium
Zhao Application of 3D CAD in landscape architecture design and optimization of hierarchical details
CN109118588B (en) Automatic color LOD model generation method based on block decomposition
CN114332366A (en) Digital city single house point cloud facade 3D feature extraction method
CN105205861A (en) Tree three-dimensional visualization model realization method based on Sphere-Board
CN111340822B (en) Multi-scale self-adaptive airborne LiDAR point cloud building single segmentation method
Poullis et al. Photorealistic large-scale urban city model reconstruction
CN111754618A (en) Object-oriented live-action three-dimensional model multilevel interpretation method and system
CN116342783B (en) Live-action three-dimensional model data rendering optimization method and system
CN115937461B (en) Multi-source fusion model construction and texture generation method, device, medium and equipment
CN111273877B (en) Linkage display platform and linkage method for live-action three-dimensional data and two-dimensional grid picture
CN115471634A (en) Modeling method and device for urban green plant twins
CN114241160A (en) Single-view-angle blade three-dimensional reconstruction method based on deep learning
Boudon et al. Survey on computer representations of trees for realistic and efficient rendering
Deng et al. Multiresolution foliage for forest rendering
CN113838199B (en) Three-dimensional terrain generation method
CN116402973A (en) Oblique photography model optimization method and system based on LOD reconstruction
CN112991300B (en) Single wood skeleton extraction and visualization method based on neighborhood characteristics
CN113205019A (en) Method for detecting defective insulator
Favorskaya et al. Realistic tree modelling
TWI789267B (en) Method of using two-dimensional image to automatically create ground truth data required for training three-dimensional pointnet

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