CN101751694A - Method for rapidly simplifying and drawing complex leaf - Google Patents

Method for rapidly simplifying and drawing complex leaf Download PDF

Info

Publication number
CN101751694A
CN101751694A CN200810239325A CN200810239325A CN101751694A CN 101751694 A CN101751694 A CN 101751694A CN 200810239325 A CN200810239325 A CN 200810239325A CN 200810239325 A CN200810239325 A CN 200810239325A CN 101751694 A CN101751694 A CN 101751694A
Authority
CN
China
Prior art keywords
blade
simplification
node
leaf
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200810239325A
Other languages
Chinese (zh)
Other versions
CN101751694B (en
Inventor
张晓鹏
邓擎琼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN200810239325XA priority Critical patent/CN101751694B/en
Publication of CN101751694A publication Critical patent/CN101751694A/en
Application granted granted Critical
Publication of CN101751694B publication Critical patent/CN101751694B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a method for rapidly simplifying and drawing a complex leaf. The method comprises the following steps of: inputting a tree model and extracting leaf information so as to complete first-time simplification on the complex leaf in leafage; iteratively combining the leaves so as to complete second-time simplification; iteratively combining the leaves in a crown so as to complete third-time simplification; calculating the density of the leaves; respectively storing leaf geometric information and simplification information in two arrays and reading the information; according to a current viewpoint and a pixel error, secondarily searching for the arrays storing simplification information; and determining a proper detail level model drawing image of a canopy. The invention is fit for simplifying the complex leaves of different shapes. The simplification speed can be promoted by using distance limitation so as to realize efficiently abstracting and drawing of the detail level model of the canopy. The drawing speed can be improved by establishing a multi-resolution con-existing model of the crown by using density factors. The method of the invention can maintain the shape of the crown, efficiently overcome the deformation phenomenon and finally realize real-time roaming in a forest of tens of thousands of plants.

Description

A kind of quick simplification and method for drafting to complex leaf
Technical field
The invention belongs to computer graphics and the interdisciplinary field that digital eagroforestry combines, relate to a kind of complex leaf efficiently and simplify and rendering algorithm.
Background technology
The drafting of plant scene is important problem in the computer graphics.Many application that relate to Outdoor Scene, as city planning, landscape design etc. all need increase plant model, and they are played up, to strengthen the sense of reality of drawing result in existing scene.But plant has various geometric detail usually, and their adding will cause render speed to descend and not reach real-time requirement.Therefore how improving render speed under the prerequisite that guarantees the sense of reality is a key issue.
In order to improve the render speed of plant scene, people have proposed various algorithms successively.Most of algorithm adopts texture image to replace former complex geometric models to come acceleration drawing.The typical case is represented as the billboard method (Billboard) of Rohlf and Helman employing in 1994.This method is determined a series of sampling viewpoints usually in pre-service, in each viewpoint direction, plant is drawn, and drawing result is preserved as texture image.And when real-time rendering,, find the sampling viewpoint the most contiguous with it according to current view point information, and then these sampling viewpoints corresponding texture images being carried out interpolation, the image that interpolation obtains is promptly as the rendering result image of current view point.In the accelerating algorithm that all plants are drawn, the fastest based on the algorithm render speed of image, and the geometry complexity of drafting time and plant scene is irrelevant.But this method need consume very big internal memory and store texture image, and because lack the geological information of plant, and the sense of reality and parallax effect are all relatively poor when drawing closely plant.Figure as a result when Fig. 2 (a) and Fig. 2 (b) have shown with the method drafting forest, wherein Fig. 2 (a) is for drawing the closely result of trees, and Fig. 2 (b) is for drawing the result of trees at a distance.The someone adopts a replacement triangle to be described in the leaf of the projected area of image space less than a pixel in addition.This method has very high drafting efficient.But it only is applicable to the drafting of remote plant; And it can smoothly fall some sharp features of plant, reduces the validity of drawing result; Li San point also can destroy the topological structure of plant in addition.Fig. 3 (a) and Fig. 3 (b) are respectively the method based on point that Deussen adopted in 2002 figure as a result when drawing meadow and forest.Recent years,, proposed based on polygonal method at plant.Polygon, particularly triangle model are the main flow models of computer graphics always, so people study very deep aspect the dough sheet simplification, the level of detail algorithm of a lot of maturations has been proposed, as vertex decimation, edge collapse, vertex clustering etc.But because the special attribute of trees, these algorithms can be used for the simplification of trunk usually, for the leaf part, then can produce wrong result.For remedying this defective, at leaf, from 2002, people such as Remolar proposed several shortcut calculations successively.Its committed step is referred to as blade and merges (leafcollapse), promptly replaces two original leaf (see figure 4)s with a new leaf.Carry out the blade union operation iteratively, just can constantly reduce the polygonal number that is used to represent leaf, keep crown appearance simultaneously, as shown in Figure 5, wherein Fig. 5 (a) is a master pattern, and Fig. 5 (b) is for using the model after leaf collapse simplifies.But also there are a lot of defectives in existing shortcut calculation.Mainly contain 3 points: (1) can only simplify quadrilateral or triangular shaped blade, can produce wrong result when simplifying complex leaf, lacks versatility; (2) simplification efficient is very low, simplifies the leaf of a common bearing tree, often needs several hours, even above one day; (3) most of algorithm level of detail model extraction method efficiently for want of, and support hardware quickens, and causes the drafting efficient of tree crown part very low.
Summary of the invention
The technical matters that desire of the present invention solves is how to simplify the plant canopy organ with different shape fast, as leaf, flower, fruit, set up the multi-resolution representation of plant canopy, and how to select suitable resolution to represent to replace the master pattern of canopy efficiently when drawing, finally reach real-time purpose, and guarantee the sense of reality of drawing result, the invention provides a kind of quick simplification and method for drafting of complex leaf for this reason.
For reaching described purpose, the present invention is example with the leaf, a kind of quick simplification and method for drafting of complex leaf are provided, this method extends to the processing of flower and fruit, it was made up of pre-service and two stages of real-time rendering, comprised following 9 steps, and wherein step S1-S7 finishes at pretreatment stage, step S8-S9 finished in the real-time rendering stage, specifically comprised as follows:
Step S1: at first import tree-model, extract leaf information;
Step S2: each the sheet blade in the leafage is judged, judged that whether blade is, if, finish first level of blade and simplify then the graticule model simplification quadrangularly of blade complexity; If not complex leaf, execution in step S3 then;
Step S3: by the blade union operation of iteration the quadrilateral blade in the leafage being simplified gradually becomes a quadrilateral, and this quadrilateral is referred to as leafage and represents quadrilateral, finishes second level of blade and simplifies;
Step S4: iteratively the representative quadrilateral blade in the tree crown is carried out the blade union operation, represent with a quadrilateral up to whole tree crown, finish the 3rd level of blade and simplify, the 3rd level adopts the distance limit method that the simplification process is quickened;
Step S5: calculate the density of all blades, and be in the simplification error of the blade of diverse location in the tree crown according to the blade Auto-regulating System of Density of Heavy Medium;
Step S6: adopt structure of arrays that the geological information of blade and simplification information are saved in respectively in two arrays;
Step S7: two arrays of having preserved the geological information and the information of simplification are saved in the hard disk as different files;
Step S8: the file of the geological information of having preserved blade and the information of simplification is read in CPU and GPU internal memory respectively from hard disk, and set camera information and pixel error;
Step S9:,, determine the level of detail model that canopy is suitable by the array of having preserved the information of simplifying is carried out binary search twice according to current view point information and pixel error; The relevant details hierarchical model is drawn, obtained drawing image.
Described be simplified to quadrilateral be adopt improved to contraction algorithm the graticule model simplification quadrangularly of blade complexity.It is angle point that every blade is specified two summits, and angle point remains unchanged the geometric position in the simplification process, and wherein first angle point is defined as apart from it and accepts stem summit farthest, and first angle point is the pairing point of blade tip; Second angle point is the point that links to each other with petiole, obtains second angle point by first angle point according to the symmetry of blade.
When described employing distance limit method is quickened simplification, at first be set by the user a distance threshold Ω, asking for distance then, to be less than or equal to the leaf of threshold value right, for effectively leaf is right, and the right screening of optimum leaf is limited to effective leaf centering carries out.Ask for effective leaf to the time, adopt the central point of blade to replace blade, and adopt improved octree structure to segment central point; This octree structure is the bounding box of computing center's point at first, then it is constantly segmented; Each time box is subdivided into eight parts, the each division all carried out on that the longest limit of box, and after each the division, two boxes that obtain because of division increase Ω/2 on corresponding sides; Such segmentation is constantly carried out, and the number of the central point in box is less than or equal to user's preset threshold L, and perhaps box has the length on a limit no longer greater than threshold value Ω.(λ ρ) is defined as the number that blade λ faces the territory intra vane to density Δ=Δ of described blade λ, and wherein λ represents the numbering of a slice blade, and the territory of facing of blade λ is defined as the center that the centre of sphere is positioned at blade λ, and radius is the spheroid of ρ; Obtain the density of the original blade in the master pattern according to this definition after, carry out the normalization operation again, make that the density value of original blade belongs to [1, η], wherein parameter η is defined by the user; And the density of newly-generated blade is defined as the weighted mean value of two blades that participate in to merge in the blade union operation, and wherein weight is by the merging number of times decision of blade, and the merging number of times of blade is writing down the number of the original blade that is merged by it.
Described simplification information with structure of arrays storage blade, this structure of arrays supports GPU to quicken, it satisfies following two conditions: (1). and each node of forming a level of detail model arbitrarily of tree crown all is to be stored in continuously in the array, and promptly different level of detail models all constitutes one section complete in the array; (2) in case. the given pixel error of user only needs to carry out twice binary search to array and just can determine the level of detail model that canopy is suitable.Each node is endowed three value: e in the array Min, e MaxAnd SN, wherein e MinBe the simplification error of this node, e MaxBe the simplification error of its father node, SN is the sequence number of the blade represented of this node; This array is being converted to binary tree in the process of array, with e by traditional binary tree structure conversion MaxDescending sort be main rule, with e MinDescending sort be auxiliary regular; When initiate node does not satisfy e MinDuring ordering, the node that does not satisfy condition is divided, it is divided into two, finally make array satisfy e simultaneously MaxAnd e MinDescending sort.The condition of twice binary search is respectively e Max<ε and e Min>ε, wherein ε is the space error of current permission, and utilizes the relevance between the consecutive frame to dwindle the hunting zone.
Beneficial effect of the present invention: method of the present invention has and has embodied characteristic and innovation everywhere.The one, adopt the two step short cut techniques to simplify blade, have versatility, overcome the defective that classic method can only be simplified quadrilateral and triangular shaped blade; The 2nd, dwindled the right hunting zone of optimum leaf by distance limit, improved simplification efficient; The 3rd, adopt to be fit to CPU, the linear structure of arrays that GPU operates replaces traditional binary tree structure storage blade to simplify information, and realizes extracting efficiently the canopy level of detail model partly of current view point correspondence on the basis of array; The 4th, regulate the level of detail of the canopy organ be positioned at diverse location by the density factor, make up the multiresolution Coexistence Model of tree crown.Thereby can under the prerequisite of the picture quality that keeps the simplification result, obtain bigger geometric data compression ratio.
By test, this method can effectively be simplified the blade of common different shape really, has higher simplification efficient and draws efficient.Even big tree with luxuriant foliage, pre-service also can be finished in several seconds.And the drafting time is generally tens microseconds.Simultaneously, it can greatly compress geometric data, keeps the visual effect of tree crown constant simultaneously, and can overcome the phenomenon of losing shape effectively.When even compressibility is very high, still can keep this character.When viewpoint changed continuously, the transition between each level of detail model of tree crown also was continuous, does not have jumping phenomenon.The present invention is applicable to the quick drafting of the canopy of all kinds of frequently seen plants.Can be used for urban visualization, landscape design, flight simulation, during virtual reality and computer game etc. are used, and visual its research object of auxiliary agricultural scholar.
Description of drawings
Fig. 1 is an algorithm flow chart of the present invention
Fig. 2 (a) is that traditional algorithm based on image is drawn the closely figure as a result of trees;
Fig. 2 (b) is that traditional algorithm based on image is drawn the figure as a result of trees at a distance;
Fig. 3 (a) is the as a result figure of traditional algorithm based on point when drawing the meadow;
Fig. 3 (b) is the as a result figure of traditional algorithm based on point when drawing forest;
Fig. 4 is traditional blade union operation (leaf collapse) synoptic diagram;
Fig. 5 (a) is original tree-model;
Fig. 5 (b) adopts traditional result after simplifying based on polygonal method;
Fig. 6 is the improved octree structure that the present invention adopts;
Fig. 7 (a) is traditional binary tree structure;
Fig. 7 (b) is traditional array that is converted by binary tree;
Fig. 7 (c) is process and the result that classic method is asked the level of detail model;
Fig. 8 is that the present invention changes binary tree into and satisfies e simultaneously MinAnd e MaxThe decomposition step of the array of ordering;
Fig. 9 is the figure as a result that the present invention simplifies complex leaf;
Figure 10 is four results that the present invention simplifies the black poplar tree;
Figure 11 (a) is the white poplar model that the present invention is used to draw the time comparative experiments;
Figure 11 (b) is the result that the present invention changes into canopy level of detail model value the real number in [0,1];
Figure 11 (c) is that the present invention adopts four kinds of drafting modes to draw the time comparative result of white poplar tree crown;
Figure 12 (a) is the maple model that the present invention is used for density influence experiment;
Figure 12 (b) is the simplified model of the present invention maple when not using Auto-regulating System of Density of Heavy Medium;
Figure 12 (c) is the simplified model of the present invention maple when using Auto-regulating System of Density of Heavy Medium, and it and Figure 12 (b) adopt identical space permissible error;
Figure 12 (d) is the simplified model of the present invention maple when not using Auto-regulating System of Density of Heavy Medium;
Figure 12 (e) is the simplified model of the present invention maple when using Auto-regulating System of Density of Heavy Medium, and the lobe numbers of it and Figure 12 (d) is suitable;
Figure 13 adopts the present invention to draw the figure as a result of four thornbusses that are in diverse location;
Result when Figure 14 is the present invention with manner of walking roaming forest;
Figure 15 is the result of the present invention when roaming forest to get a bird's eye view mode.
Embodiment
Describe each related detailed problem in the technical solution of the present invention in detail below in conjunction with accompanying drawing.
One, method general introduction (overview of approach)
The present invention is with the example that is reduced to of blade, and the simplification of flower and fruit is similar.The blade shortcut calculation is made up of pre-service and two parts of real-time rendering among the present invention.In pretreatment stage, blade is simplified successively at three levels, and promptly single blade, leafage and whole tree crown carry out.In first level, the grid model of blade is simplified as quadrilateral.Second and tri-layer then merge the number that reduces blade in the canopy by constantly filtering out two tetragonal leaves.Simultaneously by setpoint distance restriction in tri-layer, get rid of the leaf that far can not merge in advance to improving simplification efficient because of distance.For the polygon resolution of setting up canopy is represented, every blade has all been given a density value, the density degree of the blade of its region of indicator.This density value is used to regulate the simplification error of corresponding blade, makes that simplification error was more little when density was big more.The blade that is positioned at diverse location in the final tree crown also just has different level of detail because of the difference of density.In the pre-service final stage, the data that all simplify process comprise geometric data and simplification information, all deposit hard disk in.Wherein simplifying information (simplification relation, simplification error etc.) is saved in the linear structure of arrays of a suitable CPU and GPU operation.In the real-time rendering stage, then at first read in the reduced data that leaves in the hard disk, then according to the parameter of the distance between current view point and the trees, camera and the pixel error of user's setting, by structure of arrays being carried out twice simple binary search, extract the suitable level of detail model of canopy and draw.
The core of algorithm of the present invention is two step short cut techniques, distance limit methods of complex leaf, the multi-resolution models structured approach that blade density is relevant, and based on the level of detail model extraction method of structure of arrays.Algorithm specifically comprises 9 steps, and wherein preceding 7 steps are finished at pretreatment stage, and back 2 steps were finished in the real-time rendering stage.Provided the flow process of whole algorithm of the present invention as Fig. 1.
1, at first imports tree-model, extract leaf information.
2, judge whether blade is complex leaf, if, then the graticule model simplification quadrangularly of blade complexity.This is first level of simplifying, to liking each the sheet blade in the leafage.
3, by the blade union operation of iteration the quadrilateral blade in the leafage is simplified gradually and become a quadrilateral, this quadrilateral is referred to as to represent quadrilateral.This is second level simplifying.
4, iteratively the representative quadrilateral blade in the tree crown is carried out the blade union operation, represent with a quadrilateral up to whole tree crown.This is the 3rd level of simplifying.This level has adopted the distance limit method that the simplification process is quickened.
5, calculate the density of all blades, and be arranged in the simplification error of the blade of canopy diverse location according to Auto-regulating System of Density of Heavy Medium.
6, the geological information of blade and simplification information are saved in respectively in two arrays.
7, two arrays of having preserved the geological information and the information of simplification are saved in the hard disk as different files.
When 8, real-time rendering begins, the file of the geological information of having preserved blade and the information of simplification is read in CPU and GPU internal memory respectively from hard disk, and set camera information and pixel error.
9, according to current view point information and pixel error, by the array of having preserved the information of simplifying is carried out binary search twice, determine the level of detail model that canopy is suitable, and this level of detail model is drawn, obtain drawing image.
Two, the simplification of complex leaf
The blade of occurring in nature has shape miscellaneous usually, and every blade can be by a grid (Mesh) model representation.They can not be simplified by existing blade shortcut calculation, because existing algorithm can only be simplified quadrilateral or triangular shaped blade.
For simplification has the blade of arbitrary shape, algorithm of the present invention has been taked two steps.In the first step the graticule model simplification quadrangularly of blade complexity; And then in second step, adopt the blade union operation that the blade of quadrangle form is simplified.
In the first step, just blade from the process of graticule model simplification quadrangularly, employing be improved to contraction algorithm (Vertex Pair Contraction).Summit in the grid model of each the sheet blade in the leafage is divided three classes: interior point, frontier point and angle point.Point is the same with traditional Mesh simplification algorithm with the definition of frontier point wherein, and the definition of angle point is adjusted slightly.In order in the simplification process, to keep the profile of blade better, there are two kinds of summits to be scheduled and are angle point, they remain unchanged in the simplification process.Wherein first angle point is the pairing point of blade tip, and it accepts stem farthest apart from it usually.Second angle point is the point that links to each other with petiole, though in plant geometric model data, petiole is normally default.Second angle point can obtain by the symmetry of first angle point according to blade.After defining three kinds of points, just can ask for the simplification error line ordering of going forward side by side to the summit that has the limit to link to each other to each, choose a pair of summit of error minimum then and simplify.This process is constantly carried out, and becomes quadrilateral up to grid.
Second step adopted traditional blade union operation to do simplification leafage and this two-stage level of tree crown successively.In each step simplification, at first ask for the similarity degree of every pair of blade in the current level according to cost function, therefrom select the most similar a pair of blade then, promptly a pair of blade of cost minimum carries out the blade union operation.After operation was finished, two blades that are simplified disappeared, and newly-generated blade replaces them to carry out next step simplification.Such simplification is an iterative process.At first carry out in leafage, constantly merge in twos, all blades in leafage merge becomes a quadrilateral, and this quadrilateral is referred to as to represent quadrilateral.By instantiation information (known, as to produce in the plant modeling),, can obtain the quadrilaterals of representing a leafage separately all in the tree crown representing quadrilateral to carry out conversion such as displacement, rotation, scaled.For the sake of simplicity, claim that still they are the representative quadrilateral.Simplification at the tree crown level promptly is to represent quadrilateral to carry out the simplification of iteration to these.Similar with the leafage level, on behalf of quadrilateral, all in tree crown represented by a quadrilateral, simplifies just and finishes.
Three, simplify the acceleration of process
Second step in the two step short cut techniques of blade is an iterative process, no matter be at the leafage level, or the tree crown level, all need constantly to calculate the right cost value of leaf that all participate in simplification, the leaf that therefrom filters out the cost minimum then is to carrying out the blade union operation, and is very consuming time.
According to observations, when two blade wide aparts, they hardly can be selected and carry out blade union operation or line union operation.Therefore can suppose: have only when the distance between two blades during less than certain numerical value, these two blades just may be simplified.Wherein the distance between two blades is the distance between their central point.
By this hypothesis, can at first be set by the user a distance threshold Ω, it is right apart from the leaf that is less than or equal to threshold value to ask for then, for effectively leaf is right, and the right screening of optimum leaf is limited to effective leaf centering carries out, thereby avoid those leaves that can not merge because of apart from each other carrying out unnecessary calculating and screening.Right for the leaf that obtains satisfying in the tree crown distance condition, promptly effectively leaf is right, and a direct method is judged asking distance then to all leaves in the tree crown exactly.If leaf between distance be less than or equal to threshold value Ω, then this leaf is to satisfying distance condition; Otherwise, do not satisfy.But the complexity of asking for the right method of effective leaf like this is O (n 2), wherein n is the number of blade in the tree crown.In order to quicken right the asking for of effective leaf, can adopt improved octree structure.This structure has a very big advantage, that be exactly a node is asked effective leaf to the time, do not need to travel through simultaneously its neighbor node.That is to say that the effective leaf that only need obtain separately in each leaf node of this Octree is right, all effective leaves that just can obtain in the tree crown are right.
In order to simplify calculating, each sheet blade is replaced by its central point.Improved octree structure is set up the central point of blade.At first the bounding box of computing center's point constantly segments it then.Each time box is subdivided into eight parts, the each division all carried out on that the longest limit of box, and successively X, Y, three axles of Z divided unlike traditional Octree.And after each the division, two boxes that obtain because of division all can increase Ω/2 on corresponding sides, and as shown in Figure 6, wherein Fig. 6 left side is the box before dividing, and Fig. 6 right side is two boxes after dividing once.Such segmentation is constantly carried out, the number of the blade in box, and promptly the number of central point is less than or equal to user's preset threshold L, and perhaps box has the length on a limit no longer greater than threshold value Ω.
Right according to effective leaf that octree structure can be obtained in the tree crown.These effective leaves calculate once only needing, and they are that candidate's leaf of next all blade union operations is right.Simplify each time, it is right to select optimum leaf candidate's leaf centering, and promptly the leaf of cost minimum is to participating in the blade union operation.Screening process is carried out in two steps.The first step, the leaf of finding out the cost minimum in each leaf node of Octree is right, and these leaf symmetries are that the quasi-optimal leaf is right; In second step, to comparing, it is right to find out among them the leaf of cost minimum to the quasi-optimal leaf, and promptly global optimum's leaf is right.After executing the primary vane union operation, newly-generated blade is banned two blades that participate in merging.At this moment need find out relevant leaf node, promptly comprise the leaf nodes that a slice wherein or two participate in the blade that merges, then their effective leaf be adjusted accordingly to record, and it is right to recomputate the quasi-optimal leaf of these leaf nodes.And effective leaf of other leaf node to the record and the quasi-optimal leaf to all remaining unchanged.Therefore each record that only needs to upgrade a part of leaf node of simplifying, this also is to utilize octree structure to screen a right biggest advantage of optimum leaf in two steps.
What deserves to be mentioned is that the blade union operation of iteration need carry out in leafage and two levels of tree crown.Lobe numbers in the leafage is very little usually, for example has only 5 leaves, does not need to quicken.Therefore above-mentioned accelerating algorithm is only used at the tree crown level.
Four, the extraction of level of detail model
Though the blade shortcut calculation can be set up the continuous level of detail model of plant canopy, how to determine fast that according to current viewpoint information the level of detail model that satisfies error condition of plant canopy is a key issue that realizes the plant scene real time roaming in render phase.Because when drawing each two field picture, need determine its level of detail model to every the plant that is positioned at the cone.If lack level of detail model extraction algorithm efficiently, will become bottleneck because of the accumulative total effect.
The efficient of the level of detail model extraction algorithm of plant canopy and being used to is stored blade, and to simplify the data structure of information closely bound up.The traditional blades shortcut calculation adopts the geometric data of structure of arrays storage blade in the pre-service end, as information such as apex coordinate, normal direction, texture coordinates, and adopt binary tree structure storage simplification information.Wherein each time in the blade union operation newly-generated blade save as the father node that participates in two blades merging.In addition, each node in the binary tree has also been preserved corresponding simplification error e.During real-time rendering, at first geometric data is read in the GPU internal memory, simplification information is read in the CPU internal memory.According to the distance between the information of camera and camera and the conifer to be drawn, user-defined pixel error ξ is converted to space error ε then.Then according to space error ε, the binary tree structure of having preserved the information of simplifying is traveled through, up to running into the node of simplification error less than ε, these nodes just constitute the suitable level of detail model of tree crown.At last the vertex index of these node correspondences is sent to GPU, can draws by the VBO among the OpenGL (Vertex Buffer Objects) technology.In case viewpoint changes, need recomputate space error and traverse tree shape structure again, to upgrade the level of detail model.Determine the level of detail model by this recursive mode, efficient is very low, and support hardware does not quicken.For this reason, this algorithm is adjusted binary tree structure, has proposed the simplification information that linear data structure that a kind of suitable GPU plays up pipeline is preserved blade.Utilize this linear data structure, in case given view information can only just can be determined the level of detail model that canopy is suitable by twice simple binary search.
1 structure of arrays
For how binary tree structure being become structure of arrays, people such as Dachsbacher have proposed a kind of method.In binary tree structure, each node has been preserved a value r Min, it is selected and be sent to the minor increment that GPU draws that it is writing down this node.Rule of judgment when binary tree is from top to bottom traveled through is r>r Min, wherein r is the distance between current camera and the object.That is to say, if the r of node MinBe less than or equal to r, then this node is the part of level of detail model, should be sent to GPU and draw; Otherwise continue its child node is judged.For binary tree is become array, people such as Dachsbacher have given two value: r to each node in the binary tree MinAnd r Max, r wherein MaxBe the r of the father node of node correspondence MinValue.If node is a root node, its r then MaxValue is for infinitely great.[r Min, r Max) just constitute the effective range (seeing Fig. 7 (a)) of each node.At this moment, recurrence Rule of judgment r>r MinCan convert another kind of onrecurrent form to: r ∈ [r Min, r Max), if promptly r drops on the r of a node correspondence MinAnd r MaxIn the scope, then this node is the part of level of detail model, need draw; Otherwise do not draw.Adopt the biggest advantage of the Rule of judgment of onrecurrent form to be that each judgement only needs carry out a node, need not consider the relation of this node and other nodes, each node is separate.In the specific implementation process of algorithm, people such as Dachsbacher the node in the binary tree according to r MaxThe value ordering obtains an array (seeing Fig. 7 (b)).When the given r value of user, in Fig. 7 (c), r=3.5, at first by binary search weed out be positioned at the array afterbody because of r MaxValue can not constitute current level of detail model less than r some nodes then carry out condition judgment to remaining node: r ∈ [r one by one Min, r Max).The node that finally satisfies condition as node c, e, f and the g among Fig. 7 (c), has just constituted the level of detail model of suitable current view point, and these nodes are distributed in the array usually discretely.
For each node that makes any one level of detail model is stored in the array continuously, promptly different level of detail models all constitutes complete a section in the array, and the starting point that is every section is different with terminal point.This algorithm improves people's such as Dachsbacher method, makes the array that is finally changed by binary tree and come not only satisfy r MaxR is also satisfied in ordering MinOrdering.So just can more effectively utilize the resource of GPU.
If the effective range [r of a node Min, r Max) be divided into different sections, for example [r Min, r 1), [r 1, r 2) ... [r i, r Max), then each section is judged respectively that therefore judged result can not change.If the r value falls into wherein a certain section, the r value r ∈ [r that satisfies condition equally so Min, r Max); If any one section does not comprise the r value, the r r ∈ [r that also can not satisfy condition then Min, r Max).Satisfy r simultaneously at structure MaxOrdering and r MinIn the array of ordering, utilized this attribute of node just, a kind of node of ordering divides to only satisfying wherein.Though division can make a node become two, causes the increase of interstitial content in the array.
At the blade shortcut calculation, to traversal of binary tree the time, judge whether a node is drawn the simplification error e that is it and whether be less than or equal to space error ε.Therefore, symbol r, r MinAnd r MaxCan convert corresponding ε to, e MinAnd e MaxEach node in the array is endowed three value: e Min, e MaxAnd SN, wherein e MinBe the simplification error of this node, e MaxBe the simplification error of its father node, SN represents the sequence number of blade, can obtain the vertex index information of this blade by this value, promptly obtains representing the polygonal summit numbering of this blade.
In the building process of array, binary tree is being converted in the process of array to e MaxDescending sort be main rule, and e MinDescending sort be auxiliary regular.Therefore, when adding new node in array, array still can satisfy e MaxOrdering, but not necessarily satisfy e MinOrdering.When not satisfying auxiliary regular, the effective range of interdependent node is segmented and produced new node, make it finally also satisfy e simultaneously with regard to need MinOrdering.The node that does not satisfy condition is divided, it is divided into two, finally make array satisfy e simultaneously MaxAnd e MinDescending sort.
Algorithm 1 has shown to be transformed into by binary tree and has satisfied r simultaneously MaxAnd r MinThe false code of the array of ordering.
Algorithm 1: binary tree is changed into and satisfies e simultaneously MinAnd e NaxThe array of ordering
Input: binary tree
Output: F_Array
Initialization: the root node of binary tree is added to F_Array; CurrentNode is first node of F_Array
while?not?Finished()?do
if?currentNode==leafnode
currentNode=its?next?node;
end
else
child1=currentNode.Child1;child2=currentNode.Child2;
lastNode=the?last?node?of?F_Array;
ife minSatisfied(child1,child2,lastNode)==Yes
AddNodesInArray(child1,child2);
currentNode=currentNod?next?node;
end
else
for?each?node?from?currentNod’snext?node?to?lastNode?do
Propagate(node,currentNode.emin);
end
AddNodesInArray(child1,child2,newpropagatednodes);
currentNode=lastNode’snext?node;
end
end
end
Algorithm 1 is mainly by 3 function: Function e minSatisfied, and function AddNodesInArray and function Propagate form.Wherein Function e minSatisfied judges whether array still satisfies e when adding two child nodes of present node (currentNode) MinOrdering.If the e of two child nodes MinValue is less than or equal to the e of last node (lastNode) in the current array Min, then Function e minSatisfied returns very; Otherwise return vacation.Function AddNodesInArray is according to e MinDescending order is added new node in array.Function Propagate is then with the e of present node MinValue (currentNode ' s e Min) for separation the effective range of node is segmented, promptly the effective range [e of a node Min, e Max) be divided into [e Min, currentNode ' s e Min) and [currentNode ' se Min, e Max) two sections, and compose and give two new nodes, but the SN value of these two new nodes is identical, all equals to be divided the SN of node.
Fig. 8 has shown successively the binary tree among Fig. 7 is transformed into and has satisfied e simultaneously MaxAnd e Min5 steps of the array of ordering.Each node has all been given an effective range [e among the figure Min, e Max) and a SN value.In the first step, present node (currentNode) is identical with last node (lastNode) in the array, is the root node a of binary tree.Node a has two child nodes: node b and c.Because the simplification error of node b and c is all less than the e of lastNode Min, so Function e minSatisfied returns very.This moment, node b and c were according to e MinDescending order is directly added array to, shown in second step among Fig. 8.Afterwards, present node is down postponed one, become node b, and lastNode is node c.Node b has two child nodes: node d and e.Because the simplification error of node d is greater than the e of node c MinValue makes Function e minSatisfied return vacation, this means that newly added node d and e can destroy e in array MinOrdering.At this moment need the node between currentNode and lastNode and lastNode are carried out function Propagate, promptly carry out splitting operation and produce new node.Shown in the 3rd among Fig. 8 step, the effective range of node c [3,10) be divided into two sections [3,7) and [7,10), so produce two new nodes, the SN of these two new nodes is c, they will replace the ancestor node c that divided.After splitting operation is finished, two child nodes of newly-generated two nodes and present node, just node d and e are according to e MinThe order of successively decreasing adds array.After it should be noted that this step finishes, present node is not down postponed one, becomes node c, has formed the next bit of lastNode, i.e. node d, and lastNode is node e.In ensuing each step, new two child nodes that add present node can both satisfy e in array MinOrdering, just Function e minSatisfied returns very all the time, at this moment only needs two child nodes are directly added to array, does not need to carry out function Propagate.
In the blade shortcut calculation, the information of blade union operation adopts binary tree structure to preserve, and the process of the graticule model simplification quadrangularly of complex leaf adopts linear structure to preserve.After binary tree is converted to structure of arrays, can unite these two parts, represent with same structure of arrays.This unified array is referred to as to simplify pass coefficient sets (Simplification Relationship Array).
2 binary search
Utilize to simplify and close the level of detail model that coefficient sets can be determined plant canopy apace.
For every in scene plant, at first according to the distance between it and the camera, and the parameter setting (as the visual angle) of camera, the given pixel error ξ of user is converted to space error ε.Then according to this space error ε, close the coefficient sets from the simplification of the plant sample of correspondence and to extract suitable level of detail model.
Only need to close coefficient sets and carry out the level of detail model that twice simple binary search just can be met the space error requirement to simplifying.Wherein first e that satisfies condition in the array is sought in search for the first time MaxThe node of<ε, this node is designated as N; First e that satisfies condition in the array is sought in search for the second time MinThe node of>ε, this node is designated as M.Search is for the first time carried out in whole array, and the scope of search is node N first node to array for the second time.Satisfy e simultaneously owing to simplify the pass coefficient sets MinAnd e AmxTherefore descending sort, the ε ∈ [e that satisfies condition of the node between node M and N Min, e Max), so they have constituted current level of detail model, wherein each node is all being represented a slice blade.
With respect to traversal of binary tree, adopt binary search to determine that the efficient of level of detail model is very high.In addition, by utilizing the relevance between the consecutive frame, this process can also further be quickened.When scene was roamed, viewpoint normally gradually changed.Therefore same the level of detail model variation of plant in adjacent two frames can be very not greatly.In other words, two the level of detail models of same plant canopy in adjacent two frames corresponding reference position (M) and final position (N) in simplifying the pass coefficient sets all is more or less the same.Utilize this point can dwindle the hunting zone, improve the efficient of search.In the experiment, every plant all preserves three numerical value: M l, N lAnd ε l, they have write down the M of previous frame respectively, N and ε value.When drawing a new two field picture, at first compare present space error ε and ε lMagnitude relationship, carry out different processing according to the result then.The result has following three kinds of situations:
If ● ε=ε l, M=M then l, N=N l, do not need to search for again.
If ● ε>ε l, then at first carrying out the search first time, search condition is e Min>ε, the hunting zone is a node M lTo first node of array, Search Results is designated as M.And then in node M to node N lIn carry out second time search, seek first e that satisfies condition MaxThe node of<ε, Search Results is N for the second time.
If ● ε<ε l, then at first carrying out first time condition is e MaxThe search of<ε, hunting zone are node N lTo last node of array, Search Results is N.And then at node N and M lBetween the condition of carrying out be e MinThe search second time of>ε, Search Results is M.
After having extracted the level of detail model that is fit to by said method, can be according to the SN value of all nodes that constitute this model, the vertex index that obtain one group of correspondence is numbered.This group vertex index numbering is deposited in another array, and be transferred to GPU,, just can finish drafting by OpenGL from CPU.The geological information of blade has been sent into the GPU internal memory at the beginning of drawing, therefore in drawing process, geometric data does not need to transmit, but the transmission of vertex index numbering still can increase time loss, reduces the speed of drawing.Fortunately, because the configuration node of each level of detail model is a continuous distribution in simplifying the pass coefficient sets.Utilize this point, the transmission of vertex index numbering can be avoided equally.In preprocessing process, can close new array of coefficient sets structure according to simplifying, this array is referred to as array of indexes (Index Array).It according to the journal of simplify closing the node in the coefficient sets simplify the vertex index numbering of closing each node in the coefficient sets.Therefore these two arrays exist one-to-one relationship.When drawing beginning, geological information and array of indexes are all deposited in the GPU internal memory, and deposit in the CPU internal memory simplifying the pass coefficient sets.After given viewpoint, at first utilize to simplify and close coefficient sets by the level of detail model that twice binary search extraction is fit to, promptly obtain M and N.Find out the position of these two values correspondence in array of indexes again, be designated as M ' and N '.In case obtain M ' and N ', just can under the assistance of OpenGL, finish drafting.In this case, CPU and GPU almost without any need for data transmission, therefore it is very high to draw efficient.Even draw the forest that tens thousand of trees are formed, also can reach real-time requirement.
Five, based on the multi-resolution models of blade density
The method of introducing in the 4th joint can extract suitable level of detail model to tree crown according to the distance between trees and the viewpoint.Tree is far away more apart from viewpoint, and the level of detail model of describing tree crown is coarse more.In the level of detail model that extracts like this, the expression precision that is positioned at tree crown organ everywhere is the same.This is irrational, because the canopy organ of diverse location is different to the contribution of drawing result image.This algorithm is set up the model that allows multiple resolution coexistence to tree crown on the basis of blade density.Finally improve the data compression ratio of tree crown integral body, guarantee the quality of drawing image simultaneously.
The distribution of blade in canopy is uneven, and human eyes are also different for the sensitivity in the different zone of the sparse degree of blade in the canopy.For the dense place of blade, human vision is insensitive.Even variation has taken place in these places, people also not necessarily feel to draw.And for the sparse place of blade, people are then relatively more responsive.In a single day these local changing can be perceiveed out at once usually.Utilize this specific character of human vision, can set up the multi-resolution models of canopy, make that the dense place of blade is higher than the simplification degree in sparse place according to the distribution situation of blade.
For describing the distribution situation of blade in canopy, this algorithm has proposed the notion of blade density.(λ ρ) is defined as the number that blade λ faces the territory intra vane to density Δ=Δ of blade λ, and wherein the territory of facing of blade λ is defined as the center that the centre of sphere is positioned at blade λ, and radius is the spheroid of ρ.Judge whether a slice blade falls into facing in the territory of another sheet blade, need to judge that each summit of blade polygon concerns with the position of corresponding spheroid.In order to simplify calculating, every blade is replaced by its central point.In the algorithm, radius of sphericity ρ is a constant, so the density of blade λ can be abbreviated as Δ=Δ (λ).
After obtaining the density of each blade, need carry out the normalization operation, make that their value belongs to [1, η].Wherein parameter η is defined by the user.In actual applications, get η=2.Normalization is operating as simple linear transformation, and formula is as follows:
Δ’(λ)=[η-1]×[Δ(λ)-Δ min]/[Δ maxmin]+1
Δ wherein Min=min{ Δ (λ); λ ∈ Λ }, Δ Max=max{ Δ (λ); λ ∈ Λ }, Λ is the set of all blades.
For the new blade that produces in blade union operation or line union operation, and the density of newly-generated blade is defined as the weighted mean value of two blades that participate in to merge in the blade union operation, wherein weight is by the merging number of times decision of blade, and the merging number of times of blade is writing down the number of the original blade that is merged by it.Its density can be obtained by following formula:
Δ’(x)=(G(y 1)×Δ’(y 1)+G(y 2)×Δ’(y 2))/(G(y 1)+G(y 2))
Wherein be the newly-generated blade of x, y 1And y 2Be two blades that participate in merging, G (y 1) and G (y 2) be respectively blade y 1And y 2The merging number of times.
After the normalization operation is finished, can be according to the space error of the permission of the blade of diverse location in the blade Auto-regulating System of Density of Heavy Medium tree crown.Make the dense place of blade adopt big space error, and relatively little space error is adopted in the sparse place of blade.Like this when drawing, the representation model of blade that is positioned at dense place is just more coarse than the blade that is positioned at sparse place.The space error value ε (λ) of blade λ after regulating can be obtained by following formula:
ε(λ)=ε×Δ’(λ)
The real-time rendering stage that is adjusted in of space error carries out, and each frame all will calculate once.Though after the employing Auto-regulating System of Density of Heavy Medium, the polygon number that each frame need be drawn can reduce, thereby shorten the drafting time.But regulate computing itself and also need consume the regular hour.Fortunately, blade density and view information are irrelevant, and it does not change because of the change of viewpoint.Therefore need not be limited to the real-time rendering stage based on the adjusting of blade density carries out.The front is mentioned, and when binary tree structure is traveled through, judges that the standard whether a slice blade belongs to current level of detail model is whether the simplification error e that sees it is less than or equal to space error ε.Therefore amplifying space error ε is the same with the effect of dwindling simplification error e.Since blade density and viewpoint are irrelevant, just can adopt another kind of mode---at the simplification error of pretreatment stage according to blade Auto-regulating System of Density of Heavy Medium blade.At first calculate the density of each blade, then according to the simplification error of Auto-regulating System of Density of Heavy Medium blade.Adjustment process can be deleted the blade density information after finishing.So not only can not increase extra calculating, nor need store blade density in render phase.
The simplification error e (λ) of blade λ can regulate by following formula according to its density value Δ ' (λ) becomes e ' (λ):
e’(λ)=e(λ)/Δ′(λ)
By formula as can be known, Δ ' (λ) big more, the simplification error of blade λ is just more little, and this just means that the simplification degree of blade λ can be high more when drawing.The blade that is positioned at diverse location in the tree crown also just has different level of detail because of the difference of density.
Auto-regulating System of Density of Heavy Medium converts linear structure of arrays to binary tree structure not to be influenced.At pretreatment stage, after the simplification error of each blade was regulated according to the density of correspondence, the simplification information of blade can be utilized the method for introducing in the 4th joint to be stored in to simplify according to the simplification error after regulating and close in the coefficient sets.
Experimental result and conclusion
Realize method described in the invention with the C language, and be used for the simplification of several frequently seen needle.All experiments all are to finish on a Pentium (R) 3.4G, 1GB internal memory, GeForce 8600GT video card, operating system are the PC of Windows xp, and the OpenGL graph function storehouse of standard has been used in the display part.
Accompanying drawing 9 has shown the whole process of this algorithm simplification complex leaf.The pixel error given along with the user constantly increases, and the expression of blade is transformed into quadrilateral gradually from grid model.Wherein being denoted as red summit is angle point, and they remain unchanged the geometric position in the simplification process.
Accompanying drawing 10 has shown four models that a level of detail with 40 years old black poplar tree of 681,200 blades successively decreases gradually.The ratio of compression of these four models is respectively: 100%, 5.2%, 0.25% and 0.01%.As can be seen, even when blade quantity seldom the time, crown appearance still can keep well.
In order to show that level of detail model extraction algorithm among the present invention and GPU support the influence to render speed, the present invention is that example is tested with white poplar model (Figure 11 (a)).At first the level of detail to the white poplar tree crown quantizes, and makes each level of detail adopt the real number representation (seeing that Figure 11 (b) canopy level of detail model value changes into the real number in [0,1]) between 0 to 1.Precise analytic model, i.e. master pattern of 0 expression tree crown wherein; The most coarse model of 1 expression.Then this white poplar is adopted four kinds of different drafting modes, and measure the time that every kind of mode is consumed when extracting and drawing the different level of detail model of white poplar tree crown.Wherein mode 1 is a classic method, and it adopts the traversal of binary tree method to extract the level of detail model of tree crown, and does not support GPU to quicken, and all data all are kept in the CPU internal memory.Therefore when drawing each frame, all need the geological information that this frame need be drawn is passed to GPU from CPU.Mode 2 and mode 3 are that half GPU supports.The geological information of blade, promptly the summit array deposits the GPU internal memory at the beginning of drawing, and therefore need not transmit geometric data in CPU and GPU when drawing.The difference of this dual mode is that they have adopted different level of detail model extraction algorithms.Mode 2 is the same with mode 1, adopts the traversal of binary tree method; 3 of modes have adopted the method for introducing among the present invention.The level of detail model extraction algorithm of mode 4 and mode 3 is the same, supports that promptly at the beginning of drawing, summit array and array of indexes all are kept in the GPU internal memory but mode 4 is full GPU.Therefore this mode needs to carry out data transmission between CPU and the GPU hardly in drawing process.The statistics of these four kinds of modes is seen four kinds of time loss curves of drawing mode of Figure 11 (c).From comparison, can find out mode 4 most effective.With respect to classic method, promptly mode 1, and the raising of 4 pairs of render speed of mode reaches more than 100 times.Experiment this time also measured these four kinds of drafting modes when drawing the white poplar tree crown CPU and the consumption situation of GPU internal memory.Statistics comprises the number of the blade of original tree-model, the size of the geometric data of original tree-model, and CPU memory consumption, and GPU memory consumption see Table 1.
Table 1: four kinds of CPU, GPU memory consumption situations of drawing mode
Accompanying drawing 12 is that the Norway maple in 35 years old autumn adopts and do not adopt the result of blade Auto-regulating System of Density of Heavy Medium to compare respectively.Wherein Figure 12 (a) is a master pattern, and it comprises 73,600 leaves, and the distribution that can find out leaf is uneven, and Figure 12 (b)~(e) is a simplified model, and the number of blade of their correspondences is respectively 11,960,8,399,6,440 and 6,385.Figure 12 (b) and Figure 12 (d) are the results who does not consider density influence, Figure 12 (c) and Figure 12 (e) be correspondence consideration the result that influences of density.In comparison, Figure 12 (b) and Figure 12 (c) are one group, and Figure 12 (d) and Figure 12 (e) are another group.Figure 12 (b) is the same with the space error of Figure 12 (c).This two width of cloth visual quality for images is suitable, but Figure 12 (c) lacks than the number of the blade of Figure 12 (b).More as can be known, under same error condition, consider that the simplification result of density influence can obtain higher geometric data compression ratio under the prerequisite that guarantees picture quality by this group.The number of the blade of Figure 12 (d) and Figure 12 (e) is suitable, but the picture quality of Figure 12 (e) is obviously good than Figure 12 (d).This explanation is under the condition of blade quantity unanimity, and the simplification result of consideration density influence can keep the geometric detail of master pattern better.
Accompanying drawing 13 be one 25 years old spring thornbuss the LOD model.The thornbuss that is in four diverse locations has different level of detail because of different with the distance of camera.Far away more from viewpoint, the blade in the tree crown is just few more.But their visual effect is similar.Table 2 has been listed the statistics of this four trees, comprise and camera between distance, lobe numbers and with respect to the ratio of compression of master pattern.
Table 2: the statistics of four thornbusses in the accompanying drawing 13
The sequence number of tree ??a ??b ??c ??d
Distance to camera ??10.30m ??17.63m ??27.52m ??51.80m
Lobe numbers ??129,489 ??53,554 ??16,687 ??2,565
Ratio of compression ??100% ??41.36% ??12.89% ??1.98%
Figure 14 is the drawing result of mixed forest under two different viewpoint conditions that a slice is made up of broad leaf tree and conifer with Figure 15.The forest in this sheet autumn comprises 22,560 trees, and these trees are duplicated by seven plant samples.These seven plant samples are respectively: 10 years old pinus sylvestris var. mongolica, 12 years old white poplar, 12 years old bodhi tree, 15 years old holly, 15 years old thornbuss, 20 years old Yunnan white poplar and 35 years old maple.Before unreduced, the polygonal number of describing the leaf of this forest is 868,850,760, and the polygon number of branch is 7,299,027,168.Such data volume has surpassed the scope that CPU and GPU bore.Figure 14 is the scenery of seeing when in the mode of walking forest being roamed.Have 1,452 plant this moment in view frustums.The leaf of these trees is by 18,081, and 048 polygon and 8,996,680 lines represent that therefore the ratio of compression of blade data is 3.1% as can be known.The picture size of drawing result is 1280 * 1024, and render speed was 12.82 frame/seconds.Figure 15 then is the scenery of being seen when mode is roamed forest to get a bird's eye view.1,058 tree is arranged among Figure 15, and their blade is by 7,318, and 239 polygons and 235,704 lines are represented, so ratio of compression is 0.87%.Render speed was 21.28 frame/seconds.Figure 14 and 15 hatching effect are all finished in post-processing stages.
The above; only be the embodiment among the present invention; but protection scope of the present invention is not limited thereto; anyly be familiar with the people of this technology in the disclosed technical scope of the present invention; can understand conversion or the replacement expected; all should be encompassed in of the present invention comprising within the scope, therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (9)

1. quick simplification and method for drafting to a complex leaf is characterized in that, comprise the following steps, wherein step S1-S7 finishes at pretreatment stage, and step S8-S9 finished in the real-time rendering stage:
Step S1: at first import tree-model, extract leaf information;
Step S2: each the sheet blade in the leafage is judged, judged that whether blade is, if, finish first level of blade and simplify then the graticule model simplification quadrangularly of blade complexity; If not complex leaf, execution in step S3 then;
Step S3: by the blade union operation of iteration the quadrilateral blade in the leafage being simplified gradually becomes a quadrilateral, and this quadrilateral is referred to as leafage and represents quadrilateral, finishes second level of blade and simplifies;
Step S4: iteratively the representative quadrilateral blade in the tree crown is carried out the blade union operation, represent with a quadrilateral up to whole tree crown, finish the 3rd level of blade and simplify, the 3rd level adopts the distance limit method that the simplification process is quickened;
Step S5: calculate the density of all blades, and be in the simplification error of the blade of diverse location in the tree crown according to the blade Auto-regulating System of Density of Heavy Medium;
Step S6: adopt structure of arrays that the geological information of blade and simplification information are saved in respectively in two arrays;
Step S7: two arrays of having preserved the geological information and the information of simplification are saved in the hard disk as different files;
Step S8: the file of the geological information of having preserved blade and the information of simplification is read in CPU and GPU internal memory respectively from hard disk, and set camera information and pixel error;
Step S9:,, determine the level of detail model that canopy is suitable by the array of having preserved the information of simplifying is carried out binary search twice according to current view point information and pixel error; The relevant details hierarchical model is drawn, obtained drawing image.
2. by the described method of claim 1, it is characterized in that, described be simplified to quadrilateral be adopt improved to contraction algorithm the graticule model simplification quadrangularly of blade complexity.
3. by the described method of claim 2, it is characterized in that it is angle point that every blade is specified two summits, angle point remains unchanged the geometric position in the simplification process, wherein first angle point is defined as apart from it and accepts stem summit farthest, and first angle point is the pairing point of blade tip; Second angle point is the point that links to each other with petiole, obtains second angle point by first angle point according to the symmetry of blade.
4. by the described method of claim 1, it is characterized in that, when described employing distance limit method is quickened simplification, at first be set by the user a distance threshold Ω, it is right apart from the leaf that is less than or equal to threshold value to ask for then, for effectively leaf is right, and the right screening of optimum leaf is limited to effective leaf centering carries out.
5. by the described method of claim 4, it is characterized in that, ask for effective leaf to the time, adopt the central point of blade to replace blade, and adopt improved octree structure to segment central point; This octree structure is the bounding box of computing center's point at first, then it is constantly segmented; Each time box is subdivided into eight parts, the each division all carried out on that the longest limit of box, and after each the division, two boxes that obtain because of division increase Ω/2 on corresponding sides; Such segmentation is constantly carried out, and the number of the central point in box is less than or equal to user's preset threshold L, and perhaps box has the length on a limit no longer greater than threshold value Ω.
6. by the described method of claim 1, it is characterized in that density Δ=Δ (λ of described blade λ, ρ) be defined as the number that blade λ faces the territory intra vane, wherein λ represents the numbering of a slice blade, and the territory of facing of blade λ is defined as the center that the centre of sphere is positioned at blade λ, and radius is the spheroid of ρ; Obtain the density of the original blade in the master pattern according to this definition after, carry out the normalization operation again, make that the density value of original blade belongs to [1, η], wherein parameter η is defined by the user; And the density of newly-generated blade is defined as the weighted mean value of two blades that participate in to merge in the blade union operation, and wherein weight is by the merging number of times decision of blade, and the merging number of times of blade is writing down the number of the original blade that is merged by it.
7. by the described method of claim 1, it is characterized in that, described simplification information with structure of arrays storage blade, this structure of arrays supports GPU to quicken, it satisfies following two conditions:
(1). each node of forming a level of detail model arbitrarily of tree crown all is to be stored in continuously in the array, and promptly different level of detail models all constitutes one section complete in the array;
(2) in case. the given pixel error of user only needs to carry out twice binary search to array and just can determine the level of detail model that canopy is suitable.
8. by the described method of claim 7, it is characterized in that each node is endowed three value: e in the array Min, e MaxAnd SN, wherein e MinBe the simplification error of this node, e MaxBe the simplification error of its father node, SN is the sequence number of the blade represented of this node; This array is being converted to binary tree in the process of array, with e by traditional binary tree structure conversion MaxDescending sort be main rule, with e MinDescending sort be auxiliary regular; When initiate node does not satisfy e MinDuring ordering, the node that does not satisfy condition is divided, it is divided into two, finally make array satisfy e simultaneously MaxAnd e MinDescending sort.
9. by the described method of claim 7, it is characterized in that the condition of twice binary search is respectively e Max<ε and e Minε, wherein ε is the space error of current permission, and utilizes the relevance between the consecutive frame to dwindle the hunting zone.
CN200810239325XA 2008-12-10 2008-12-10 Method for rapidly simplifying and drawing complex leaf Expired - Fee Related CN101751694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810239325XA CN101751694B (en) 2008-12-10 2008-12-10 Method for rapidly simplifying and drawing complex leaf

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810239325XA CN101751694B (en) 2008-12-10 2008-12-10 Method for rapidly simplifying and drawing complex leaf

Publications (2)

Publication Number Publication Date
CN101751694A true CN101751694A (en) 2010-06-23
CN101751694B CN101751694B (en) 2011-10-05

Family

ID=42478632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810239325XA Expired - Fee Related CN101751694B (en) 2008-12-10 2008-12-10 Method for rapidly simplifying and drawing complex leaf

Country Status (1)

Country Link
CN (1) CN101751694B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976447A (en) * 2010-09-29 2011-02-16 广州中医药大学 Method for cutting off petioles under condition of keeping images of lamina main bodies undamaged
CN102810213A (en) * 2011-06-01 2012-12-05 华东师范大学 Method for building dynamic 3D (three-dimensional) greenness degree model
CN102881046A (en) * 2012-09-07 2013-01-16 山东神戎电子股份有限公司 Method for generating three-dimensional electronic map
CN102903146A (en) * 2012-09-13 2013-01-30 中国科学院自动化研究所 Image processing method for scene drawing
CN103175835A (en) * 2013-02-26 2013-06-26 上海烟草集团有限责任公司 Method for determining area quality of tobacco leaves based on intelligent image processing and model estimation
CN106412441A (en) * 2016-11-04 2017-02-15 珠海市魅族科技有限公司 Video anti-shake control method and terminal
CN106445329A (en) * 2016-08-31 2017-02-22 浙江科澜信息技术有限公司 Image capture method for dynamic balance scene loading hierarchy
CN107491305A (en) * 2017-08-10 2017-12-19 深圳市华傲数据技术有限公司 Data analysis and visible processing method, device
CN109087392A (en) * 2018-07-10 2018-12-25 凯尔博特信息科技(昆山)有限公司 A kind of dynamic level of detail model implementation method
CN111340317A (en) * 2020-05-19 2020-06-26 北京数字绿土科技有限公司 Automatic early warning method for tree obstacle hidden danger of overhead transmission line and electronic equipment
CN111462318A (en) * 2020-05-26 2020-07-28 南京大学 Three-dimensional tree model real-time simplification method based on viewpoint mutual information
CN114254501A (en) * 2021-12-14 2022-03-29 重庆邮电大学 Large-scale grassland rendering and simulating method
CN115830201A (en) * 2022-11-22 2023-03-21 光线云(杭州)科技有限公司 Cluster-based particle system optimization rendering method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304265B1 (en) * 1998-01-30 2001-10-16 Hewlett-Packard Company System for distinguishing front facing and back facing primitives in a computer graphics system using area calculations in homogeneous coordinates
CN1206614C (en) * 2002-07-19 2005-06-15 章新苏 Device for drawing 3D graphics
CN100474344C (en) * 2006-07-28 2009-04-01 中国科学院自动化研究所 Leaves advance gradually simplifying method
CN100570641C (en) * 2008-03-18 2009-12-16 中国科学院软件研究所 Plant leaf analogy method based on physics

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976447B (en) * 2010-09-29 2012-05-30 广州中医药大学 Method for cutting off petioles under condition of keeping images of lamina main bodies undamaged
CN101976447A (en) * 2010-09-29 2011-02-16 广州中医药大学 Method for cutting off petioles under condition of keeping images of lamina main bodies undamaged
CN102810213A (en) * 2011-06-01 2012-12-05 华东师范大学 Method for building dynamic 3D (three-dimensional) greenness degree model
CN102810213B (en) * 2011-06-01 2015-07-08 华东师范大学 Method for building dynamic 3D (three-dimensional) greenness degree model
CN102881046A (en) * 2012-09-07 2013-01-16 山东神戎电子股份有限公司 Method for generating three-dimensional electronic map
CN102881046B (en) * 2012-09-07 2014-10-15 山东神戎电子股份有限公司 Method for generating three-dimensional electronic map
CN102903146A (en) * 2012-09-13 2013-01-30 中国科学院自动化研究所 Image processing method for scene drawing
CN102903146B (en) * 2012-09-13 2015-09-16 中国科学院自动化研究所 For the graphic processing method of scene drawing
CN103175835A (en) * 2013-02-26 2013-06-26 上海烟草集团有限责任公司 Method for determining area quality of tobacco leaves based on intelligent image processing and model estimation
CN103175835B (en) * 2013-02-26 2015-04-08 上海烟草集团有限责任公司 Method for determining area quality of tobacco leaves based on intelligent image processing and model estimation
CN106445329A (en) * 2016-08-31 2017-02-22 浙江科澜信息技术有限公司 Image capture method for dynamic balance scene loading hierarchy
CN106412441A (en) * 2016-11-04 2017-02-15 珠海市魅族科技有限公司 Video anti-shake control method and terminal
CN106412441B (en) * 2016-11-04 2019-09-27 珠海市魅族科技有限公司 A kind of video stabilization control method and terminal
CN107491305A (en) * 2017-08-10 2017-12-19 深圳市华傲数据技术有限公司 Data analysis and visible processing method, device
CN109087392A (en) * 2018-07-10 2018-12-25 凯尔博特信息科技(昆山)有限公司 A kind of dynamic level of detail model implementation method
CN111340317A (en) * 2020-05-19 2020-06-26 北京数字绿土科技有限公司 Automatic early warning method for tree obstacle hidden danger of overhead transmission line and electronic equipment
CN111462318A (en) * 2020-05-26 2020-07-28 南京大学 Three-dimensional tree model real-time simplification method based on viewpoint mutual information
CN111462318B (en) * 2020-05-26 2022-05-17 南京大学 Three-dimensional tree model real-time simplification method based on viewpoint mutual information
CN114254501A (en) * 2021-12-14 2022-03-29 重庆邮电大学 Large-scale grassland rendering and simulating method
CN115830201A (en) * 2022-11-22 2023-03-21 光线云(杭州)科技有限公司 Cluster-based particle system optimization rendering method and device
CN115830201B (en) * 2022-11-22 2024-05-24 光线云(杭州)科技有限公司 Particle system optimized rendering method and device based on clustering

Also Published As

Publication number Publication date
CN101751694B (en) 2011-10-05

Similar Documents

Publication Publication Date Title
CN101751694B (en) Method for rapidly simplifying and drawing complex leaf
CN101315663B (en) Nature scene image classification method based on area dormant semantic characteristic
CN109086437B (en) Image retrieval method fusing fast-RCNN and Wasserstein self-encoder
CN103871100B (en) Tree modelling method for reconstructing based on a cloud Yu data-driven
CN104850633B (en) A kind of three-dimensional model searching system and method based on the segmentation of cartographical sketching component
JP4780106B2 (en) Information processing apparatus and information processing method, image processing apparatus and image processing method, and computer program
CN101887596B (en) Three-dimensional model reconstruction method of tree point cloud data based on partition and automatic growth
CN111462318B (en) Three-dimensional tree model real-time simplification method based on viewpoint mutual information
CN100570641C (en) Plant leaf analogy method based on physics
CN105930382A (en) Method for searching for 3D model with 2D pictures
CN103279980A (en) Tree leaf modeling method based on point cloud data
WO2015149302A1 (en) Method for rebuilding tree model on the basis of point cloud and data driving
CN110210431B (en) Point cloud semantic labeling and optimization-based point cloud classification method
CN109448015A (en) Image based on notable figure fusion cooperates with dividing method
CN114332366A (en) Digital city single house point cloud facade 3D feature extraction method
CN110889434A (en) Social network activity feature extraction method based on activity
CN111340723B (en) Terrain-adaptive airborne LiDAR point cloud regularization thin plate spline interpolation filtering method
CN104112007A (en) Data storage, organization and retrieval methods of image gradation segmentation result
CN101488235B (en) Constructing method for level detailed model of coniferous plant canopy
CN100474344C (en) Leaves advance gradually simplifying method
CN108805182A (en) It is a kind of based on connection distance and the BIRCH innovatory algorithms that are connected to intensity
Deng et al. Multiresolution foliage for forest rendering
CN107886132A (en) A kind of Time Series method and system for solving music volume forecasting
CN116258804A (en) BIM model light weight method based on digital-analog separation and compression optimization
CN103823843A (en) Gauss mixture model tree and incremental clustering method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111005