WO2022178714A1 - 基于手势交互的植物建模方法、存储介质、设备 - Google Patents
基于手势交互的植物建模方法、存储介质、设备 Download PDFInfo
- Publication number
- WO2022178714A1 WO2022178714A1 PCT/CN2021/077655 CN2021077655W WO2022178714A1 WO 2022178714 A1 WO2022178714 A1 WO 2022178714A1 CN 2021077655 W CN2021077655 W CN 2021077655W WO 2022178714 A1 WO2022178714 A1 WO 2022178714A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- contour
- line
- contour line
- gesture
- sampling points
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 102
- 230000003993 interaction Effects 0.000 title claims abstract description 39
- 238000003860 storage Methods 0.000 title claims abstract description 30
- 230000008569 process Effects 0.000 claims abstract description 33
- 230000009471 action Effects 0.000 claims abstract description 23
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 12
- 238000005070 sampling Methods 0.000 claims description 155
- 230000004048 modification Effects 0.000 claims description 26
- 238000012986 modification Methods 0.000 claims description 26
- 239000013598 vector Substances 0.000 claims description 22
- 230000005484 gravity Effects 0.000 claims description 11
- 238000009826 distribution Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 16
- 210000003811 finger Anatomy 0.000 description 15
- 210000003813 thumb Anatomy 0.000 description 6
- 230000004913 activation Effects 0.000 description 5
- 238000013459 approach Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 210000004935 right thumb Anatomy 0.000 description 3
- 230000003238 somatosensory effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000011835 investigation Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000012952 Resampling Methods 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000002789 length control Methods 0.000 description 1
- 230000033001 locomotion Effects 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000008188 pellet Substances 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000029264 phototaxis Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 239000007921 spray Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/017—Gesture based interaction, e.g. based on a set of recognized hand gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
Definitions
- the invention belongs to the technical field of computer graphics, and in particular, relates to a plant modeling method based on gesture interaction, a computer-readable storage medium, and a computer device.
- sketches allow users to express their modeling intent in a more intuitive way, which is what rule-based modeling methods lack.
- traditional sketch modeling tools are based on two-dimensional. Therefore, a core problem to be solved is how to convert two-dimensional branch sketches into corresponding three-dimensional structures. At present, most of the work is based on a single sketch and combined with certain empirical rules to calculate the depth information of branches.
- the technical problem solved by the present invention is: how to provide a plant modeling method that is less difficult to use and is convenient for users to use flexibly.
- a plant modeling method based on gesture interaction comprising:
- the plant model is processed according to a predetermined subtree growth algorithm to complete plant modeling.
- the gesture information includes several contour lines
- the method for generating an outline convex hull according to the gesture information includes:
- the first sampling point and the second sampling point are connected according to a predetermined matching rule to form a contour convex hull.
- both the first contour line and the second contour line are closed-loop lines, and the first sampling point and the second sampling point are connected according to a predetermined matching rule to form a contour convex hull methods include:
- sampling points obtained by interpolation on the first contour line or the second contour line are merged into adjacent sampling points obtained by sub-sampling to form a contour convex hull.
- the first contour line is a closed-loop line
- the second contour line is an open-close line
- the first sampling point and the second sampling point are connected according to a predetermined matching rule to form an outline
- Methods for contour convex hulls include:
- Two initial matching points corresponding to the sampling points at both ends of the second contour are selected on the first contour to form two sets of initial matching pairs, wherein the two initial matching points divide the first contour into first sub-line and second sub-line;
- the maximum number of sampling points in the first sub-line, the second sub-line and the second contour line is used as the number of interpolation targets, and other lines with fewer sampling points are interpolated, so that the number of sampling points of the three lines is the same;
- the interpolated sampling points are merged into the nearest sub-sampled sampling points on the same line to form a contour convex hull.
- selecting initial matching points on the first contour line and the second contour line respectively, and the method for forming an initial matching pair includes:
- the plant modeling method further includes editing processing of the convex hull of the outline, specifically including:
- gesture selection instruction includes a determination instruction and an area range instruction
- the line shape in the line editing area is modified according to the gesture modification instruction.
- the plant modeling method further includes editing processing of the convex hull of the outline, specifically including:
- gesture editing instruction includes a surface selection instruction and a surface shape modification instruction
- the surface selection instruction select the mesh area to be edited in the contour convex hull
- the present application also discloses a computer-readable storage medium, where the computer-readable storage medium stores a plant modeling program based on gesture interaction, and when the plant modeling program based on gesture interaction is executed by a processor, the above-mentioned A Plant Modeling Approach for Gesture Interaction.
- the present application also discloses a computer device comprising a computer-readable storage medium, a processor, and a gesture-interaction-based plant modeling program stored in the computer-readable storage medium, the gesture-interaction-based plant modeling program When the plant modeling program is executed by the processor, the above-mentioned plant modeling method based on gesture interaction is implemented.
- the invention discloses a plant modeling method based on gesture interaction, which has the following technical effects compared with the traditional plant modeling method:
- FIG. 1 is a flowchart of a method for modeling plants based on gesture interaction according to Embodiment 1 of the present invention
- FIG. 2 is a schematic diagram of sub-sampling the contour line according to Embodiment 1 of the present invention.
- FIG. 3 is a schematic diagram of a process of generating a contour convex hull from two closed-loop contour lines according to Embodiment 1 of the present invention
- FIG. 4 is a schematic diagram of a process of connecting sampling points on a contour according to Embodiment 1 of the present invention
- FIG. 5 is a schematic diagram of a process of generating a contour convex hull from a closed-loop contour line and an open-closed contour line according to Embodiment 1 of the present invention
- FIG. 6 is a schematic diagram of a process for generating a contour convex hull from multiple contour lines according to Embodiment 1 of the present invention
- FIG. 7 is a schematic diagram of a line editing process according to Embodiment 1 of the present invention.
- FIG. 8 is a schematic diagram of a surface editing process according to Embodiment 1 of the present invention.
- FIG. 9 is a schematic diagram of a moving area H and an unconstrained deformation area R according to Embodiment 1 of the present invention.
- FIG. 10 is a schematic diagram of a subtree growth process according to Embodiment 1 of the present invention.
- FIG. 11 is a schematic diagram of a subtree growth direction according to Embodiment 1 of the present invention.
- FIG. 12 is a schematic diagram of a plant modeling apparatus according to Embodiment 2 of the present invention.
- FIG. 13 is a schematic diagram of a computer device according to Embodiment 4 of the present invention.
- the interaction mode of gesture interaction adopted in this application is more natural and flexible to use, and together with the real-time three-dimensional display of the plant model, provides useful feedback for the user in the process of generating and editing plants.
- the method for modeling plants based on gesture interaction in the first embodiment includes the following steps:
- Step S10 Identify the gesture drawing action of the user, and obtain gesture information.
- Step S20 generating a plant skeleton and an outline convex hull according to the gesture information.
- Step S30 splicing the outline convex hull on a predetermined position of the plant skeleton to form a plant model.
- Step S40 Process the plant model according to a predetermined subtree growth algorithm to complete plant modeling.
- step S10 the user's gesture drawing action is recognized by using the somatosensory controller LeapMotion.
- the first embodiment recognizes the user's finger drawing action. Specifically, when the right index finger and the thumb tip are close enough, the line starts to be recorded, and when the index finger and the thumb are far away, the line drawing ends. The actual recording position of the line is the midpoint of the line connecting the index finger and the thumb tip.
- the running frame rate of the somatosensory controller LeapMotion is 90fps.
- the newly added position of the line in each frame is recorded in real time.
- the distance between the vertices that make up the line is the same.
- the default distance is 7.5 ⁇ 10 -3 .
- the system records redundant line vertex data.
- the design principle of the line sub-sampling method is to sample more points in the local area with strong curvature, that is, in the local area with large curvature, and sample less points in the smooth area with small curvature. Therefore, the sampling weight can be defined by the curvature of each sampling point of the initial line to control the step size of the subsampling.
- FIG. 2 is a schematic diagram of the process of sub-sampling the initial line P.
- the curvature k i at each sampling point p i of the line is calculated, and then starting from a random position of the line, the variable moving step ⁇ ( pi ) is used to sequentially access the Initial line P, and sample at the next sample point storage index i + ⁇ (pi ) after pi to collect sample points.
- the formula for calculating the moving step ⁇ ( pi ) at p i is :
- k i — is the curvature of the sampling point pi .
- step S20 the gesture information includes several contour lines, and the method for generating an outline convex hull according to the gesture information includes:
- Step S210 selecting two adjacent first and second contour lines from several contour lines
- Step S220 Perform sub-sampling processing on the first contour line and the second contour line to obtain a number of first sampling points on the first contour line and a number of second sampling points on the second contour line, respectively ;
- Step S230 Connect the first sampling point and the second sampling point according to a predetermined matching rule to form a contour convex hull.
- the contour lines drawn by the user gesture include two types, one is a closed-loop line, and the other is an open-closed line.
- There are two combinations of contour lines forming the contour convex hull one is a combination of closed-loop lines and open-closed lines, and the other is a combination of multiple groups of closed-loop lines. Combinations of different lines can generate many complex shapes.
- the line is marked as a closed-loop line. It is connected end to end. If the interval between the beginning and the end of the line is large, it will be marked as an open and closed line, and no interpolation will be performed.
- the opening and closing recognition of lines is automatically completed by the system at the bottom layer without additional user interaction. The following describes the formation process of the contour convex hull in two cases.
- the contour lines are all closed-loop lines. It should be noted that, in the actual modeling process, there are a plurality of contour lines, and this embodiment 1 takes two adjacent lines as an example to describe the forming process of the contour convex hull. When there are multiple contour lines, each time a contour line is added, the nearest contour line is found from the contour lines that have been formed to match the newly added contour line, and a new convex hull is guided to form.
- the method for connecting the first sampling point and the second sampling point according to a predetermined matching rule in step S230 to form a contour convex hull includes:
- Step S231 Interpolate the contour lines with fewer sampling points in the first contour line and the second contour line, so as to increase the sampling points, so that the sampling of the first contour line and the second contour line the same number of points;
- Step S232 Selecting initial matching points on the first contour line and the second contour line respectively to form an initial matching pair
- Step S233 Connect the initial matching pair between the first contour line and the second contour line, and then connect the remaining sampling points in a predetermined order, so that the first contour line and the second contour line are connected in a predetermined order.
- Several triangular meshes are formed between the two contour lines;
- Step S234 Merge the sampling points obtained by interpolation on the first contour line or the second contour line into adjacent sampling points obtained by initial sampling to form a contour convex hull.
- the two contour lines are first sub-sampled to obtain a set of sampling points, and then the contour line with fewer sampling points is interpolated to make it different from another line with more sampling points.
- the specific operation of interpolation is to adopt the idea of uniform interpolation, continuously insert a new point between the two adjacent sampling points with the largest line interval, and update the interval set at the same time until the number of sampling points is the same as that of another contour line.
- the new interpolation sampling points of the contour line are removed, and each interpolation sampling point and its associated triangle connection relationship are merged into other initial feature points closest to the interpolation sampling point. Then the triangle edge that should connect the interpolation sample point is reconnected to the new sample point, and finally the duplicate edge is removed.
- the removal of interpolation sampling points is to ensure that when the user uses more line incremental connections to generate a grid, the grid still maintains the manifold.
- one contour line is a closed-loop line
- the other contour line is an open and closed line.
- the function of the opening and closing lines is to close the convex hull of the outline and connect the mesh holes generated by the closed-loop lines, making it a complete closed mesh.
- the method of connecting the first sampling point and the second sampling point according to a predetermined matching rule in step S230 to form a contour convex hull includes:
- Step S231 ′ Select two initial matching points on the first contour line corresponding to the sampling points at both ends of the second contour line to form two groups of initial matching pairs, wherein the two initial matching points connect the first contour line. Divide into the first sub-line and the second sub-line;
- Step S232' the maximum number of sampling points in the first sub-line, the second sub-line and the second contour line is used as the interpolation target number, and other lines with fewer sampling points are interpolated, so that the number of sampling points of the three lines is the same;
- Step S233' Connect the two pairs of initial matching pairs between the first contour line and the second contour line, and then connect the remaining sampling points of the first sub-line and the second sub-line to the first sub-line in a predetermined order. on the remaining sampling points of the two contour lines to form several triangular meshes between the first contour line and the second contour line;
- Step S234' Merge the sampling points obtained by interpolation into the sampling points obtained by the nearest sub-sampling on the same line to form a contour convex hull.
- Figure 5 is a schematic diagram of the connection process. Given a closed-loop line A and an opening and closing line B, find two sampling points on the closed-loop line A that are most consistent with the direction vectors of the two end points of the opening and closing line B, and construct Two initial matching pairs. Then, by finding two sampling points on the closed-loop line A, the closed-loop line A is divided into two sub-lines located on both sides of the opening and closing line B, and there are currently three lines including the opening and closing line B. The maximum number of sampling points of the three lines is used as the number of interpolation targets, and the other two lines are interpolated until their number of sampling points is the same, as shown in Figure 4.
- FIG. 5 is a schematic diagram of the generation process of the outline convex hull grid. After the user draws a new line, the system will automatically splicing the line to the existing incomplete grid. In addition, the system does not strictly require the drawing order and category of the user's lines, and the user can draw two types of lines arbitrarily in the space, and drag and drop the line to a position he is satisfied with.
- the plant modeling method of the first embodiment further includes editing processing of the convex hull of the outline, and there are two specific implementations, one is line editing, and the other is surface editing.
- the line editing mode includes the step of determining the line editing area and the step of modifying the shape of the line.
- Determining the line editing area includes: recognizing the user's gesture selection action in real time, and generating a gesture selection instruction, where the gesture selection instruction includes a determination instruction and an area range instruction; selecting an outline to be edited according to the determination instruction, and according to the area range
- the command defines the line editing area on the selected outline.
- the step of modifying the line shape includes: recognizing the user's gesture modification action in real time, and generating a gesture modification instruction; and modifying the line shape in the line editing area according to the gesture modification instruction.
- this embodiment defines the area selection gesture as shown in the figure.
- the index finger and thumb of the right hand are stretched forward, and the remaining fingers are in the shape of a fist.
- the position of the right thumb and index finger determines the range editing range of the line.
- Sphere visualizes range results.
- the diameter of the ball is equal to the distance between the user's index finger and thumb tip, and is placed at the midpoint of the line connecting the two fingers, and moves with the movement of the right hand in space.
- the first embodiment designs a simple but efficient automatic selection method. As shown in FIG. 6 , each time a contour line is drawn, the position of the center of gravity of the contour line is calculated, and the position of the center of gravity is essentially the average vector of the positions of all primary sampling points of the contour line.
- a confirmation instruction is generated, and the contour line is designated as the contour line to be edited.
- the specific implementation method is to count the Euclidean distance between the position of the center of gravity of all contour lines and the position of the center of the right hand (which can be recognized by the somatosensory controller LeapMotion), and the one with the shortest distance is the contour line that meets the selection requirements.
- the specific contour line local modification range also needs to be visualized for feedback to the user.
- two red balls are used to mark the boundary position of the editing range.
- the boundary position is determined by calculating the distance from the first sampling point of the contour line to the midpoint of the line connecting the two fingers. When the distance is less than the distance between the two fingers, the sampling point is within the editing range, otherwise it is outside the editing range.
- the position of the range boundary is the position of the two fixed control points of the quadratic Bezier curve.
- the function of "determining" the range also requires a gesture.
- a natural gesture is to use the right thumb to lightly touch the middle fingertip to indicate OK.
- the contour line will be divided into two parts, the contour line in the editing range and the contour line outside the range, the former is visible with a green mark, and the green part of the edited contour line.
- the system will place an editing block at the midpoint of S inner .
- the green cube held by the right hand in Figure 7 represents the third control of the quadratic Bezier curve. point.
- the right hand moves freely by dragging the editing block with the pinch gesture, that is, the gesture modification instruction is generated, and the local shape of the line is changed in real time.
- the user is satisfied with the modified shape, use the same thumb to touch the middle finger gesture to confirm, then the line editing work is completed, and the relevant data of the hand-drawn line is updated synchronously, resampling, calculating the center of gravity coordinates, and judging whether it is related to opening and closing.
- the specific implementation process of changing the shape of the line is as follows: when the editing block is dragged and moved, the Bezier curve S new is generated by real-time interpolation with a sampling distance of 7.5 ⁇ 10 -3 for the line. When the modification is confirmed, the system will combine the newly generated line S new with the line outside the modification range s outside into a new hand-drawn line.
- the surface editing method includes the following steps: recognizing the user's gesture editing action in real time, and generating a gesture editing instruction, where the gesture editing instruction includes a surface selection instruction and a surface shape modification instruction;
- the outline convex hull selects the mesh area to be edited; and the mesh vertices in the mesh area are modified according to the surface shape modification instruction.
- the user first uses the right index finger to select the surface area that needs to be modified, that is, the surface selection command is generated, and then drags and stretches, that is, the surface modification command is generated, and the surface shape is modified.
- the different progress of the editing stage is determined by A visual representation of the fingertip pellet in the figure.
- Selecting a valid region selects the Laplacian surface deformation method's move anchor point and deformation range, the latter visually represented by the color of the range boundary vertices marked with a dark color on the surface.
- the selection of the moving area H and the unconstrained deformation area R is specified by the index finger of the right hand. As shown in Figure 9, through the user's investigation and summary, it is specified that the fingertip is the center of the ball, and the vertices of the inner surface of the small ball with diameters of 0.02 and 0.05 are the area H respectively. Range vertex with region R, where region R does not contain region H. In the actual visualization, the white ball on the fingertip of the system serves as the range indicator for area H, while ignoring the visual representation of area R.
- the gesture information further includes opening and closing lines, which are used to generate each trunk branch of the plant skeleton.
- the branch with the lowest y-value coordinate sampling point is selected from each trunk branch as the initial skeleton, and the branches closest to the skeleton are sequentially selected from the remaining hand-painted trunk branches and added to the current tree. Skeleton until all branches are used.
- this approach removes the restriction on the user's drawing direction.
- a line can be drawn from left to right or from right to left, which improves the convenience of user interaction to a certain extent.
- step S30 the splicing of the contour convex hull and the plant skeleton can be realized through a user's gesture operation.
- mark points are generated near the contour convex hull and the skeleton.
- the user can use gestures such as grabbing to grab these marked points and move to indirectly move the contour convex hull and the plant skeleton to the Suitable location.
- step S40 a recursive algorithm is used to guide the growth of the subtree.
- the basic idea is that in each step of the iteration process, the activated node upgraded from the node will generate a sub-branch, and so on and so forth, until the sub-branch completely fills the given contour convex hull, the iteration ends.
- the triangle mesh vertices of the convex hull of the contour are used, and these vertices are used as guiding points to guide the growth of the branches.
- each iterative process includes the following three parts.
- Part 1 The first division of guide points.
- the circle shown in a in Figure 10 represents the branch node.
- the set of nodes to be upgraded is set, and the active node with the qualification to generate new branches can only be selected from this set.
- the ascension set defaults to all nodes of the trunk's initial skeleton.
- each guide point in the convex hull triangular mesh of the outline with a certain node in the selected node set to be upgraded is connected to a certain node in the selected node set to be upgraded.
- the weight of the selection algorithm is the Euclidean distance from the guide point to the node to be upgraded, and the nearest node to be upgraded is the desired selection node.
- all guide points are clustered, and the guide points connected to the same node are clustered into a set.
- b in Figure 10 shows the clustering results of guide points after the first division, and they are marked with different colors.
- nodes with guide points will be upgraded to active nodes, which can generate new branches.
- the nodes that are not connected to the guide point will be removed from the node set to be upgraded.
- the purpose of removal is to reduce the problem of single branch filling effect caused by the branch database, and the combination of different predefined branches is enriched.
- the diversity of the branches generated inside the convex hull of the contour while taking into account the computational
- the set of guiding points connected to the same node may occasionally be disconnected, as shown by the solid-line box in Figure 10.
- different connected components should be divided into independent sets.
- the solution is to use the half-edge structure to store the outline convex hull mesh, and use the breadth-first idea to traverse all the vertices of the mesh, and the set of direct or indirect connection between the vertices is an independent set.
- the second part the second division of the guide point.
- a cluster of guide points with a large distribution angle may be generated, as shown in c in Figure 10.
- filling a widely distributed collection with a single branch often results in an unnatural filling effect. Therefore, this paper divides the widely distributed guide point clusters again to generate several small cluster sets with appropriate distribution angles.
- the specific algorithm of the secondary division is as follows.
- the large cluster set is divided from the vertical direction and the horizontal direction.
- ⁇ v and ⁇ h (not shown in the figure) represent the vertical span angle and the horizontal span angle, respectively.
- the vertical division result ⁇ v of the set of guide points projected onto the unit sphere. If ⁇ v or ⁇ h is greater than the given angle threshold t, the guide point set is divided according to the corresponding direction of the angle. Therefore, a cluster set with a large distribution will produce at most A small set of fragments, the user can indirectly control the generation density of internal branches by adjusting the threshold t.
- Part 3 Filling the stems.
- a new branch is placed on each activation node bound to the set, as shown in d in Figure 10.
- the selection of new branches is determined by the distribution angles ⁇ v and ⁇ h of the guide point clustering set.
- the single branch in the branch database is used to fill the narrower distribution, that is, the set with a small angle between ⁇ v and ⁇ h , and the double branch or Multiple branches are filled with widely distributed collections to ensure that the trees generated inside the convex hull of the outline are more natural and plump.
- the generation of new branches is also controlled by the branch length coefficient P and the growth direction dir branch .
- Figure 11 is a schematic diagram of the generation of new branches guided by a single guide point clustering.
- the red circle in the figure is the skeleton activation node, and the blue circle is the guide point set associated with the activation node.
- dir cluster represents the branch growth direction guided by the guide point set, and is the weighted vector and normalized vector value of the guide point set.
- the specific calculation formula is:
- V i the unit vector from the active node to the guide point i;
- N represents the total number of the guide point cluster set.
- Equation (3) uses Euclidean distance as the weight, which can guide the branches to grow toward the bulge of the constraining contour convex hull or the distance of the contour convex hull, thereby balancing the internal branch growth density from the inside to the outside.
- the final growth direction of the branches dir branch is calculated as follows:
- dir branch dir cluster + ⁇ dir origin + ⁇ dir gravity (4)
- ⁇ and ⁇ parameters that control the weight of the branch growth direction, the initial values are 0.8 and -0.3, respectively.
- the internal branch growth details of the tree model can be modified by adjusting the parameter values of ⁇ and ⁇ in formula (4) to achieve branch generation results with different degrees of aggregation, thereby simulating physiological characteristics such as phototaxis growth of branches.
- variable growth coefficient P is used to simulate the change of branch density characteristics, so that
- dist branch The Euclidean distance from the active node, along the vector direction dir branch to the surface of the outline convex hull mesh, this distance is a variable value.
- the generation of new branches is determined by the following factors: selecting appropriate branches in the database through the clustering distribution angles ⁇ v and ⁇ h , and adjusting the structure and placement of branches according to the growth coefficient P and the growth direction dir branch , Finally, the new branch node is merged into the current trunk skeleton. If the current active node only generates one branch, update the position of the active node again, and advance it along with the attached sub-branch by a small distance of 0.1 ⁇ P in the direction of dir branch .
- Iteration end condition When the distance between the active node and the convex hull surface of the contour along the dir branch direction is less than 10 -5 , the active node stops growing, and at the same time, the clustering set of guide points bound to the node does not participate in the next iterative growth process. The iteration ends when all guide points do not participate in the iterative growth.
- the stop condition ensures that the branches will not grow excessively in local areas during the tree growth process, so as to achieve the purpose of uniform distribution of the branches in the convex hull of the contour.
- the above-mentioned branch iterative growth and stop conditions have a good performance in the actual growth process of the tree.
- a long and sparse branch group will be generated.
- the tree skeleton is closer to the convex hull surface of the outline, and the number of node sets to be upgraded continues to increase, resulting in an increase in the number of guide point clusters, resulting in denser and shorter branches. This phenomenon roughly matches the morphological features of trees observed in the real world.
- the second embodiment also discloses a plant modeling device based on gesture interaction.
- the plant modeling device includes an action recognition unit 100 , a shape generation unit 200 , a model splicing unit 300 and a subtree Growth unit 400.
- the action recognition unit 100 is used for recognizing the gesture drawing action of the user, and obtains gesture information;
- the shape generation unit 200 is used for generating a plant skeleton and several outline convex hulls according to the gesture information;
- the model splicing unit 300 is used for combining some of the The contour convex hulls are respectively spliced on different positions of the plant skeleton to form a plant model;
- the subtree growing unit 400 is used to process the plant model according to a predetermined subtree growing algorithm to complete the plant modeling.
- the specific working process of the action recognition unit 100 , the shape generation unit 200 , the model splicing unit 300 , and the subtree growing unit 400 may refer to the relevant descriptions in the first embodiment, and will not be repeated here.
- the third embodiment also discloses a computer-readable storage medium, where the computer-readable storage medium stores a plant modeling program based on gesture interaction, and when the plant modeling program based on gesture interaction is executed by a processor, the above-mentioned A method for plant modeling based on gesture interaction.
- the terminal includes a processor 12 , an internal bus 13 , a network interface 14 , and a computer-readable storage medium 11 .
- the processor 12 reads the corresponding computer program from the computer-readable storage medium and then executes it, forming a request processing device on a logical level.
- one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subjects of the following processing procedures are not limited to each Logic unit, which can also be hardware or logic device.
- the computer-readable storage medium 11 stores a plant modeling program based on gesture interaction, and when the plant modeling program based on gesture interaction is executed by the processor, implements the above-mentioned method for plant modeling based on gesture interaction.
- Computer-readable storage media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology.
- Information may be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage , magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices.
- PRAM phase-change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read-only memory Memory
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种基于手势交互的植物建模方法、存储介质、设备。所述植物建模方法包括:识别用户的手势绘制动作,获得手势信息(S10);根据所述手势信息生成植物骨架与外形轮廓凸包(S20);将所述外形轮廓凸包拼接于所述植物骨架的预定位置上,形成植物模型(S30);按照预定的子树生长算法对所述植物模型进行处理,以完成植物建模(S40)。在建模过程中用户只需要关注高层输入,在空中绘制植物的骨架与轮廓的大致造型来控制整个植物的形状,而具体的细节枝干造型与树叶的分布则使用基于规则的过程化建模方法自动生成。所述方法采用的手势交互这一交互方式,使用起来更自然和灵活,与植物模型的实时三维显示一起,在植物的生成和编辑过程中为用户提供了有用的反馈。
Description
本发明属于计算机图形技术领域,具体地讲,涉及一种基于手势交互的植物建模方法、计算机可读存储介质、计算机设备。
植物建模技术的应用背景是交由用户基于美学与工程经验去自由地绘制现实生活中不存在的植物模型,依靠建模算法的辅助以达到高效产出。当前的植物建模方法主要分为基于规则的过程式建模、基于数据驱动的植物重建与基于手绘草图的建模。
基于草图的方法允许用户在建模时能同时拥有较大的自由度以及创造力。除此之外,草图能让用户以一种比较直观的方式来表达其建模意图,这正是基于规则的这类建模方式所欠缺的。由于时代背景对技术的限制,传统的草图建模工具都是基于二维的,因此,要解决的一个核心问题便是如何将二维枝干草图转换为对应的三维结构。当前,绝大多数的工作都是基于单张草图并结合一定的经验规则进行枝干深度信息的计算。为方便用户对多尺度树木结构的描述,允许使用笔画直接控制多个枝干或者连同树叶的整个子树木结构,即在笔画的邻近区域喷撒一定数目的控制点,并允许树枝往控制点的位置生长。通过这种方式不仅可以有效地对树木的整体形状进行控制,还可以从不同尺度对树木的局部结构进行相应控制。从而,用户可以通过修改笔刷的半径,控制树木在不同维度上的枝干形态。这类交互形式可以在平板设备上,通过触控等方式实现,用户只需一些简单直观的手势交互便可以生成满足特定整体形态,且具有丰富植物学特性的树木模型。
对于新手用户来说,使用基于规则的过程式建模或基于数据驱动的重建方法生成三维树模型并不容易,因为这两种方法要么需要专门的生物学知识,要么需要昂贵的设备以从真实植物中获取数据。基于草图的植物建模是自由创建三维植物模型最直观的方法。然而,以前的基于草图的方法都是在平板电脑或 桌面屏幕上绘制的2D草图,难以生成合理的深度值和植物的完整三维轮廓。尤其是对于内容设计者或艺术家,在概念设计阶段,如何灵活与方便地控制植物模型的形状仍然是一个挑战。
发明内容
(一)本发明所要解决的技术问题
本发明解决的技术问题是:如何提供一种使用难度较低、便于用户灵活使用的植物建模方法。
(二)本发明所采用的技术方案
一种基于手势交互的植物建模方法,所述植物建模方法包括:
识别用户的手势绘制动作,获得手势信息;
根据所述手势信息生成植物骨架与外形轮廓凸包;
将所述外形轮廓凸包拼接于所述植物骨架的预定位置上,形成植物模型;
按照预定的子树生长算法对所述植物模型进行处理,以完成植物建模。
可选择地,所述手势信息包括若干轮廓线,根据所述手势信息生成外形轮廓凸包的方法包括:
从若干轮廓线中选取两条相邻的第一轮廓线和第二轮廓线;
对所述第一轮廓线和第二轮廓线进行二次采样处理,分别获得所述第一轮廓线上的若干第一采样点以及所述第二轮廓线上的若干第二采样点;
按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包。
可选择地,所述第一轮廓线和所述第二轮廓线均为闭环线条,按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:
对所述第一轮廓线和所述第二轮廓线中采样点数量较少的轮廓线进行插值,以增加采样点,使得所述第一轮廓线和所述第二轮廓线的采样点数量相同;
分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹 配对;
将所述第一轮廓线和所述第二轮廓线之间的初始匹配对进行连接,接着将其余的采样点按照预定顺序进行连接,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;
将所述第一轮廓线或所述第二轮廓线上插值得到的采样点合并至邻近的二次采样得到的采样点,以形成外形轮廓凸包。
可选择地,所述第一轮廓线为闭环线条,所述第二轮廓线为开合线条,按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:
在第一轮廓线上选取与所述第二轮廓线两端的采样点相应的两个初始匹配点,构成两组初始匹配对,其中两个初始匹配点将所述第一轮廓线分割为第一子线条和第二子线条;
将第一子线条、第二子线条和第二轮廓线中采样点最大数目作为插值目标数目,采样点较少的其他线条进行插值,使得三条线条的采样点数目相同;
将所述第一轮廓线和所述第二轮廓线之间的两对初始匹配对进行连接,接着将第一子线条、第二子线条其余的采样点按照预定顺序连接至第二轮廓线的其余采样点上,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;
将插值得到的采样点合并至同一线条上最邻近的二次采样得到的采样点,以形成外形轮廓凸包。
可选择地,分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹配对的方法包括:
分别计算所述第一轮廓线上和所述第二轮廓线上每个采样点的重心方向向量;
将所述第一轮廓线上的每个采样点的重心方向向量和所述第二轮廓线上的每个采样点的重心方向向量一一进行比较,将所述第一轮廓线上和所述第二轮廓线上重心方向向量最接近的两个采样点作为初始匹配点,以形成一对初始匹配对。
可选择地,所述植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体包括:
确定线条编辑区域的步骤:
实时识别用户的手势选择动作,生成手势选择指令,所述手势选择指令包括确定指令和区域范围指令;
根据所述确定指令选定需要编辑的轮廓线,根据所述区域范围指令在选定的轮廓线上确定线条编辑区域;
修改线条形状的步骤:
实时识别用户的手势修改动作,生成手势修改指令;
根据所述手势修改指令对所述线条编辑区域内的线条形状进行修改。
可选择地,所述植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体包括:
实时识别用户的手势编辑动作,生成手势编辑指令,所述手势编辑指令包括曲面选择指令和曲面形状修改指令;
根据所述曲面选择指令在所述外形轮廓凸包选定需要编辑的网格区域;
本申请还公开了一种计算机可读存储介质,所述计算机可读存储介质存储有基于手势交互的植物建模程序,所述基于手势交互的植物建模程序被处理器执行时实现上述的基于手势交互的植物建模方法。
本申请还公开了一种计算机设备,所述计算机设备包括计算机可读存储介质、处理器和存储在所述计算机可读存储介质中的基于手势交互的植物建模程序,所述基于手势交互的植物建模程序被处理器执行时实现上述的基于手势交互的植物建模方法。
(三)有益效果
本发明公开了一种基于手势交互的植物建模方法,相对于传统的植物建模方法,具有如下技术效果:
在建模过程中用户只需要关注高层输入,在空中绘制植物的骨架与轮廓的大致造型来控制整个植物的形状,而具体的细节枝干造型与树叶的分布则使用基于规则的过程化建模方法自动生成。本申请采用的手势交互这一交互方式, 使用起来更自然和灵活,与植物模型的实时三维显示一起,在植物的生成和编辑过程中为用户提供了有用的反馈。
图1为本发明的实施例一的基于手势交互的植物建模方法的流程图;
图2为本发明的实施例一的对轮廓线进行二次采样的示意图;
图3为本发明的实施例一的两根闭环轮廓线生成外形轮廓凸包的过程示意图;
图4为本发明的实施例一的轮廓线上采样点连线过程示意图;
图5为本发明的实施例一的一根闭环轮廓线和一根开合轮廓线生成外形轮廓凸包的过程示意图;
图6为本发明的实施例一的多根轮廓线生成外形轮廓凸包的过程示意图;
图7为本发明的实施例一的线条编辑过程示意图;
图8为本发明的实施例一的曲面编辑过程示意图;
图9为本发明的实施例一的移动区域H与非约束变形区域R的示意图;
图10为本发明的实施例一的子树生长过程示意图;
图11为本发明的实施例一的子树生长方向示意图;
图12为本发明的实施例二的植物建模装置示意图;
图13为本发明的实施例四的计算机设备示意图。
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
在详细描述本申请的各个实施例之前,首先简单描述本申请的发明构思:现有生成三维树模型的方法中,基于规则的过程式建模或基于数据驱动的重建 方法,对于新手用户来说,使用并不容易,因为这两种方法要么需要专门的生物学知识,要么需要昂贵的设备以从真实植物中获取数据。本申请提出了一种基于手势交互的植物建模方法,首先识别用户的手势绘制动作,获得手势信息,接着根据手势信息生成植物骨架和外形轮廓凸包等植物造型,最后根据相关算法进行子树生长,完成植物建模,建模过程中用户只需要关注高层输入,在空中绘制植物的骨架与轮廓的大致造型来控制整个植物的形状,而具体的细节枝干造型与树叶的分布则使用基于规则的过程化建模方法自动生成。本申请采用的手势交互这一交互方式,使用起来更自然和灵活,与植物模型的实时三维显示一起,在植物的生成和编辑过程中为用户提供了有用的反馈。
如图1所示,本实施例一的基于手势交互的植物建模方法包括如下步骤:
步骤S10:识别用户的手势绘制动作,获得手势信息。
步骤S20:根据所述手势信息生成植物骨架与外形轮廓凸包。
步骤S30:将所述外形轮廓凸包拼接于所述植物骨架的预定位置上,形成植物模型。
步骤S40:按照预定的子树生长算法对所述植物模型进行处理,以完成植物建模。
在步骤S10中,采用体感控制器LeapMotion识别用户的手势绘制动作。示例性地,本实施例一识别为用户的手指绘制动作,具体来说,当右手食指与拇指指尖足够接近时,开始记录线条,食指与拇指远离时,该线条绘制结束。线条实际记录位置为食指与拇指指尖连线的中点。
进一步地,体感控制器LeapMotion的运行帧率为90fps,当用户开始绘制线条时,实时记录线条在每一帧的新增位置。每当一条线条绘制完毕,对其第一次采样,使得组成线条的顶点间隔距离是相同的,根据经验选择,该间隔距离默认为7.5×10
-3,其采样目的是处理用户在绘制阶段悬停思考时,系统多余记录的线条顶点数据。综上,用户绘制的线条由一组连续且间隔均匀的采样点集合P={p
0,p
1,…,p
N}表示。
从效率角度考虑,直接使用含有大量连续采样点的初始线条P生成三角网格,无疑会消耗过多计算资源。因此,我们对初始线条P二次采样,以尽可能少的采样点来表示线条在外形轮廓凸包生成过程中的整体特征,这些采样点称 为线条采样点。线条二次采样方法的设计原则是,在线条弯曲幅度较强,即曲率较大的局部区域采样较多的点,而在曲率较小的平滑区域采样较少的点。因此,可以利用初始线条每个采样点的曲率定义采样权值,以控制二次采样的步长。图2是初始线条P进行二次采样的过程示意图,首先计算线条每个采样点p
i处的曲率k
i,然后从线条随机位置开始,以可变移动步长Δ(p
i)顺序访问该初始线条P,并在p
i之后的下一个采样点储存索引i+Δ(p
i)处采样,以收集采样点。p
i处的移动步长Δ(p
i)计算公式为:
式中:
μ——采样步长,默认初始值为2,用于控制步长的增长倍率;
k
i——是采样点p
i的曲率。
在公式(1)中,max(k
i,0.01)决定线条不同采样点处的移动步长幅度,因此,当采样点曲率减小时,与对数函数log共同作用以减缓采样索引移动步长的增长。如果使用默认参数值,则移动步长变化范围为(2,13],其中,步长最小值与最大值分别是线条最尖锐(k
i=+∞)与最平缓(k
i=0.01)处的采样点。
在步骤S20中,所述手势信息包括若干轮廓线,根据所述手势信息生成外形轮廓凸包的方法包括:
步骤S210:从若干轮廓线中选取两条相邻的第一轮廓线和第二轮廓线;
步骤S220:对所述第一轮廓线和第二轮廓线进行二次采样处理,分别获得所述第一轮廓线上的若干第一采样点以及所述第二轮廓线上的若干第二采样点;
步骤S230:按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包。
其中,用户手势绘制得到的轮廓线包括两种类型,一种是闭环线条,另一种是开合线条。形成轮廓外形轮廓凸包的轮廓线有两种组合,一种是闭环线条与开合线条的组合,另一种是多组闭环线条的组合。不同线条的组合可以生成许多复杂的形状。当一根手绘线条的起始点与终止点间隔距离小于一定阈值时,标定该线条为闭环线条,系统自动按线条一次采样间隔7.5×10
-3的距离在该线 条首尾之间插值补点,将其首尾相连。若线条首尾间隔较大,则标定其为开合线条,不做插值处理。线条的开闭识别工作由系统在底层自动完成,不需要用户额外交互,下面分两种情况对外形轮廓凸包的形成过程进行描述。
第一种情况:轮廓线均为闭环线条。需要说明的是,实际建模过程中,轮廓线的数量具有多条,本实施例一以相邻两根线条为例,描述外形轮廓凸包的形成过程。当存在多条轮廓线时,每增加一条轮廓线,从已经形成的轮廓线中寻找一个最邻近的轮廓线与新增的轮廓线进行匹配,引导形成新的凸包。
其中,在步骤S230中按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:
步骤S231:对所述第一轮廓线和所述第二轮廓线中采样点数量较少的轮廓线进行插值,以增加采样点,使得所述第一轮廓线和所述第二轮廓线的采样点数量相同;
步骤S232:分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹配对;
步骤S233:将所述第一轮廓线和所述第二轮廓线之间的初始匹配对进行连接,接着将其余的采样点按照预定顺序进行连接,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;
步骤S234:将所述第一轮廓线或所述第二轮廓线上插值得到的采样点合并至邻近的初始采样得到的采样点,以形成外形轮廓凸包。
具体来说,如图3所示,首先对两根轮廓线进行二次采样,获得采样点集合,然后对采样点较少的轮廓线进行插值,使其与另一根采样点较多的线条具有相同的采样点数目,其中圆圈表示二次采样点,三角形表示插值得到的采样点。插值的具体操作为采用均匀插值思想,不断在线条间隔最大的两个相邻采样点之间插入一个新点,同时更新间隔集合,直到与另一根轮廓线的采样点数目相同。
接着寻找两根轮廓线之间的初始匹配对,从该对两个采样点开始,顺序生成初始三角网格,初始匹配对其描绘轮廓线整体形状特征的属性应最为接近,因此,本实施例选择使用采样点重心的概念对形状描绘特征进行量化。计算每个二次采样点q
i的重心方向向量dir
barycentric(q
i),其可以近似由q
i指向线条上其他 二次采样点的矢量方向平均值表示,具体计算公式为:
式中:
q
k——是该线条上除q
i外其他的二次采样特征点;
normalize——矢量归一化函数。
首先,使用短线可视化展示每个特征点的重心方向,最终找到的重心方向向量最为一致的初始匹配对如图3中的实心正方形所示。然后从初始匹配对开始,依次连接两根轮廓线的后续匹配对,并三角网格化处理获得初始三角网格,具体连接过程可参照图4。
当获得初始三角网格后,对轮廓线的新插值采样点进行移除,将每个插值采样点与其附属的三角形连接关系,一同并入到与该插值采样点最邻近的其他初始特征点,则本应连接插值采样点的三角形边重新连接到了新的采样点,最后去除重复的边。插值采样点的移除操作是为了保证用户后续使用更多的线条增量连接生成网格时,网格仍然保持流形。
第二种情况:如图5所示,一根轮廓线为闭环线条,另一根轮廓线为开合线条。开合线条的作用是封闭外形轮廓凸包,连接由闭环线条产生的网格空洞,使其成为一个完整封闭的网格。
其中,步骤S230中按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:
步骤S231’:在第一轮廓线上选取与所述第二轮廓线两端的采样点相应的两个初始匹配点,构成两组初始匹配对,其中两个初始匹配点将所述第一轮廓线分割为第一子线条和第二子线条;
步骤S232’:将第一子线条、第二子线条和第二轮廓线中采样点最大数目作为插值目标数目,采样点较少的其他线条进行插值,使得三条线条的采样点数目相同;
步骤S233’:将所述第一轮廓线和所述第二轮廓线之间的两对初始匹配对进行连接,接着将第一子线条、第二子线条其余的采样点按照预定顺序连接至第二轮廓线的其余采样点上,以在所述第一轮廓线和所述第二轮廓线之间形成 若干三角形网格;
步骤S234’:将插值得到的采样点合并至同一线条上最邻近的二次采样得到的采样点,以形成外形轮廓凸包。
具体来说,图5是连接过程示意,给定闭环线条A与开合线条B,在闭环线条A上分别寻找与开合线条B的两个端点重心方向向量最一致的两个采样点,构造两个初始匹配对。然后通过寻找到的闭环线条A上两个采样点,将闭环线条A划分为位于开合线条B两侧的两根子线条,则当前包括开合线条B在内,共三根线条。以三根线条的采样点最大数目作为插值目标数目,插值其他两根线条,直到他们的采样点数目相同,如图4所示。接着从两个初始匹配对开始,依次连接开合线条B与闭环线条A的两个子线条的其他特征点,生成三角网格。最后,使用与第一种情况中相同的插值采样点移除操作移除归并插值采样点,最终生成的网格结果如图5所示。
基于上述组合条件,用户可以生成含有任意两根手绘线条的三角网格,网格随线条数目的增加而逐步更新。图5是外形轮廓凸包网格的生成过程示意,用户每绘制完毕一根新的线条,系统会自动将该线条拼接到现有不完整网格。此外,系统并不严格要求用户的线条的绘制顺序与类别,用户可在空间中任意绘制两类线条,并将该线条拖拽移动到自己满意的位置。当用户绘制完毕,得到完整封闭的网格后,标定所有手绘线条为重构特征边,依次使用增量网格重构与曲面细分方法进行后处理,生成三角形分布更均匀与更密集的高质量三角网格。
进一步地,本实施例一的植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体有两种实施方式,一种是线条编辑,另一种是曲面编辑。
对于第一种方式,线条编辑方式包括确定线条编辑区域的步骤和修改线条形状的步骤。确定线条编辑区域包括:实时识别用户的手势选择动作,生成手势选择指令,所述手势选择指令包括确定指令和区域范围指令;根据所述确定指令选定需要编辑的轮廓线,根据所述区域范围指令在选定的轮廓线上确定线条编辑区域。修改线条形状的步骤包括:实时识别用户的手势修改动作,生成手势修改指令;根据所述手势修改指令对所述线条编辑区域内的线条形状进行修改。
具体来说,在确定线条编辑区域的步骤中,通过调查问询,用户使用线条 编辑的需求通常是对较小的局部区域进行修改,而不是线条全局修改,其中后者的需求,用户往往采用撤销线条重新绘制的方式解决。所以综合考虑,本实施例定义区域选择手势如图所示,右手食指和拇指前伸,其余手指呈握拳状,用右手拇指与食指的位置决定线条的范围编辑幅度,并通过图中的灰色小球可视化范围结果。小球直径与用户食指和拇指指尖的距离等长,且放置于两指间连线的中点位置,随右手在空间中的移动而移动。
为方便用户在所有轮廓线中,迅速指定需要修改的轮廓线,本实施例一设计一种简单却高效的自动化选择方法。如图6所示,每当一根轮廓线绘制完毕,计算该轮廓线的重心位置,重心位置本质是该轮廓线所有一次采样点位置的平均矢量。在编辑过程中,当用户右手与轮廓线足够靠近时,即生成确定指令,则指定该轮廓线为待编辑轮廓线。具体实现方法是统计所有轮廓线重心位置与右手掌心位置(可被体感控制器LeapMotion识别)之间的欧式距离,距离最短的那根则是符合选择要求的轮廓线。
具体的轮廓线局部修改范围同样需要可视化以反馈用户,本实施例使用两个红色小球标记编辑范围的边界位置。边界位置通过依次计算轮廓线一次采样点到两指连线中点的距离决定,当该距离小于两指之间距离时,该采样点属于编辑范围内,否则属于编辑范围外。当确定编辑范围后,范围边界位置即为二次贝塞尔曲线两个固定控制点的位置。
当用户满意其选择的编辑范围,“确定”范围的功能同样需要一个手势实现。在编辑范围手势仍然继续工作的前提下,一个自然的手势是使用右手拇指轻轻触碰中指指尖,以表示确定。同时,轮廓线将被分割为两个部分,编辑范围内的轮廓线与范围外的轮廓线,前者用绿色标记可视,被编辑轮廓线的绿色部位。
在修改线条形状的步骤中,一旦确定线条编辑范围,系统会在S
inner的中点放置一个编辑块,图7中右手握持的绿色立方块,表示二次贝塞尔曲线的第三个控制点。右手用抓捏的手势拖着编辑块自由移动,即生成手势修改指令,实时改变线条的局部形状。当用户对修改形状满意时,使用相同的拇指轻触中指的手势进行确定,则此次线条编辑工作完成,同步更新手绘线条的相关数据,重新采样,计算重心坐标,判断是否开合等相关。线条形状改变的具体实现过程为,拖拽编辑块移动时,以线条一次采样距离7.5×10
-3为间隔,实时插值生 成贝塞尔曲线S
new。当修改确定后,系统将组合新生成的线条S
new与修改范围外的线条s
outside为一根新的手绘线条。
对于第二种方式,曲面编辑方式包括如下步骤:实时识别用户的手势编辑动作,生成手势编辑指令,所述手势编辑指令包括曲面选择指令和曲面形状修改指令;根据所述曲面选择指令在所述外形轮廓凸包选定需要编辑的网格区域;根据所述曲面形状修改指令对所述网格区域内的网格顶点进行修改。
具体来说,如图8所示,用户首先使用右手食指选择需要修改的曲面区域,即生成曲面选择指令,然后拖拽拉伸,即生成曲面修改指令,修改曲面形状,编辑阶段的不同进度由图中指尖小球可视化表示。当用户移动右手选择有效编辑区域时,小球为白色,当捏住有效区域拖拽时,小球为红色。
选择有效区域即选择拉普拉斯曲面变形方法的移动锚点与变形范围,后者通过在曲面上使用深色标记范围边界顶点的颜色可视化表示。一旦用户通过曲面标记颜色的指导,确定编辑区域后,用户通过右手拇指与食指合并,做出“捏”的手势拖拽编辑区域进行移动,同时小球颜色变红,表示处于移动变形阶段。为拉普拉斯变形方法能够高效实时工作,本实施例做了一些优化处理,在用户做出抓捏手势的那一帧,即选中移动区域H与非约束变形区域R,曲面的其他区域则为固定区域F,变形方程Ax=b中的矩阵A只被计算一次,而矩阵b随着H的移动实时更改,然后实时求解变形方程并不断映射回初始曲面网格。
移动区域H与非约束变形区域R的选择由右手食指指定,如图9所示,通过用户调研总结,规定以指尖为球心,直径为0.02与0.05的小球内曲面顶点分别为区域H与区域R的范围顶点,其中区域R并不包含区域H。在实际可视化效果中,系统指尖的白色小球作为区域H的范围指示器,同时忽略区域R的可视化表示。
具体来说,步骤S20中,手势信息还包括开合线条,用于生成植物骨架的各个主干枝节。示例性地,当用户绘制完成主干枝节后,从各个主干枝节选择具有最低y值坐标采样点的枝节作为初始骨架,依次从剩余的手绘主干枝节中选择最临近骨架的枝节,添加到当前的树木骨架,直到所有的枝节都被使用为止。使用最小生成树算法,构建所有剩余线条的两端采样点到骨架所有采样点的欧式距离图,选择距离最近的一对,将所属线条添加到现有骨架以构成新的骨架,如此循环往复直至所有线条都被使用。在实际交互中,这样的做法解除 了对用户绘制方向的限制,一根线条,从左至右绘制,或从右至左绘制均可,一定程度的提升了用户交互的便利性。
进一步地,在步骤S30中,可通过用户的手势操作来实现外形轮廓凸包与植物骨架的拼接。当植物骨架与外形轮廓凸包生成之后,在外形轮廓凸包与骨架的附近生成标记点,用户可采用抓取等手势动作抓住这些标记点移动以间接将外形轮廓凸包与植物骨架移动至合适的位置。
进一步地,在步骤S40中,采用递归算法,引导子树生长。其基本思路是,在每一步迭代过程中,由节点升格而来的激活节点将生成一个子枝干,如此迭代往复,直到子枝干完全填满给定的外形轮廓凸包,则迭代结束。为生成符合外形轮廓凸包形状且分布均匀,合理的树木枝干,利用外形轮廓凸包三角网格顶点,并将这些顶点作为导向点引导枝干生长。本实施例的子树生长算法,每次迭代过程包括如下三个部分。
第一部分:导向点的第一次划分。图10中的a所示的圆圈表示枝干节点,首先设置待升格节点集合,具有生成新枝干资格的激活节点只能从该集合中进行选择,在树木生成的第一次迭代过程中,待升格集合默认为主干初始骨架的所有节点。
然后将外形轮廓凸包三角网格中的每一个导向点,与选择出的待升格节点集合中的某个节点进行连接。选择算法的权重为导向点到待升格节点的欧式距离,距离最近的待升格节点为期望选择节点。接着,聚类所有导向点,将连接至同一节点的导向点聚类为一个集合,图10中的b展示了第一次划分后的导向点聚类结果,并用不同颜色进行标记。在这次划分中,拥有导向点的节点将升格为激活节点,可以生成新的枝干。同时,与导向点并无连接关系的节点将被移除出待升格节点集合,移除目的是减少由枝干数据库引起的枝干填充效果单一的问题,不同预定义枝干之间的组合丰富了外形轮廓凸包内部枝干生成的多样性,同时兼顾方法计算效率。
连接至同一节点的导向点集合,偶尔会出现不连通的情况,如图10中的b实线框所示,这种情形应将不同的连通分量下分为独立的集合。解决方法为使用半边结构存储外形轮廓凸包网格,利用广度优先思想,遍历网格所有顶点,则顶点之间有直接或间接连接关系的集合为一个独立集合。
第二部分:导向点的第二次划分。在树木生长的早期阶段,由于待升格节 点集合的节点数目过少,所以可能会产生分布角度较大的导向点聚类,如图10中的c所示。而用单个枝干填充分布较广的集合,其填充效果往往不自然。因此,本文再次划分分布较广的导向点聚类,以生成分布角度恰当的数个小聚类集合。
二次划分具体算法如下,从垂直方向与水平方向对大聚类集合进行划分,θ
v与θ
h(图未示出)分别表示垂直跨度角与水平跨度角,图10中的c描述了将导向点集合投影到单位球体上的垂直划分结果θ
v。如果θ
v或θ
h大于给定的角度阈值t,那么按照角度对应方向分割导向点集合,因此,一个分布较大的聚类集合最多会产生
个碎片小集合,用户可以通过调整阈值t间接控制内部枝干的生成密度。
第三部分:枝干填充。当适当的导向点聚类集合被划分完毕时,在每个与该集合绑定的激活节点上放置一个新的枝干,如图10中的d所示。新枝干的选择由导向点聚类集合分布角度θ
v与θ
h决定,用枝干数据库中的单杈枝干填充分布较窄,即θ
v与θ
h角度小的集合,而用双杈或多杈枝干填充分布较广的集合,以保证在外形轮廓凸包内部生成的树木更加自然与饱满。除此之外,新枝干的生成还需枝干长度系数P与生长方向dir
branch控制。
图11是由单个导向点聚类引导的新枝干生成示意,图中红色圆点是骨架激活节点,蓝色圆点为与该激活节点相关联的导向点集合。dir
cluster表示由该导向点集合引导的枝干生长方向,是导向点集合的加权矢量和归一化向量值,其具体计算公式为:
式中:
V
i——由激活节点指向导向点i的单位矢量;
Dist
i——由激活节点到导向点i的欧式距离;
N——表示该导向点聚类集合的总数。
公式(3)以欧式距离为权重,可以引导枝干向约束外形轮廓凸包的隆起部位或外形轮廓凸包远处生长,从而平衡由内往外的内部枝干生长密度。另外考虑重力等外部环境因素对枝干生长的影响,枝干最终生长方向dir
branch,计算 如下:
dir
branch=dir
cluster+α·dir
origin+β·dir
gravity (4)
式中:
dir
origin——由激活节点指向其父节点的逆方向;
dir
gravity——重力方向,默认为(0,-1,0)
T;
α与β——控制枝干生长方向权重的参数,初始值分别为0.8与-0.3。
可以通过调整公式(4)中α与β的参数值来修改树木模型的内部枝干生长细节,实现不同聚拢程度的枝干生成结果,从而对枝干的趋光性生长等生理特性进行仿真。
通过观察自然界树木的枝干分布规律,枝干密度由树木主干向叶冠末端呈正向增大的趋势。所以,本文采用可变生长系数P仿真枝干密度特性变化,令
P=k×dist
branch (5)
式中:
k——长度控制系数,默认为0.6;
dist
branch——由激活节点出发,沿矢量方向dir
branch到外形轮廓凸包网格表面的欧式距离,该距离是一个可变值。
综上所述,新枝干的生成由以下因素决定:通过聚类分布角度θ
v与θ
h在数据库中选择合适枝干,并根据生长系数P与生长方向dir
branch调整枝干结构与放置位置,最终将新生的枝干节点归并入当前主干骨架。若当前激活节点仅生成一个枝干,则再次更新该激活节点位置,将其与附属的子枝干一起沿dir
branch方向前进0.1×P的小段距离。因为这种情形一般出现在与初始主干相离较远,与外形轮廓凸包表面相离较近的激活节点,其位置再次更新目的是使枝干更快填满外形轮廓凸包内部,减少总的迭代次数,增加计算效率,同时额外扩充了枝干细节的多样性。当本轮迭代所有激活节点处的新枝干放置完毕后,本轮迭代结束,同时将所有新生成枝干的节点添加进当前待升格节点集合。
迭代结束条件。当激活节点沿dir
branch方向到外形轮廓凸包表面距离小于10
-5时,该激活节点停止生长,同时,与该节点绑定的导向点聚类集合,不再 参与下次迭代生长过程。直到所有导向点均不参与迭代生长时,迭代结束。该停止条件保证枝干在树木生长过程中,不会在局部区域过度生长,达到枝干在外形轮廓凸包内部分布均匀的目的。
上述枝干迭代生长与停止条件,在树木实际生长过程有着良好的表现,在迭代初期,会生成长度较长且较稀疏的枝干群。而随着迭代次数的增加,树木骨架愈靠近外形轮廓凸包表面,且待升格节点集合数目不断上升,导致导向点聚类的数量随之上升,从而生成更加稠密与短小的枝干。这一现象与在现实世界中观察到的树木形态特征大致相符。
进一步地,如图12所示,本实施例二还公开了一种基于手势交互的植物建模装置,所述植物建模装置包括动作识别单元100、造型生成单元200、模型拼接单元300和子树生长单元400。其中,动作识别单元100用于识别用户的手势绘制动作,获得手势信息;造型生成单元200用于根据所述手势信息生成植物骨架与若干外形轮廓凸包;模型拼接单元300用于将若干所述外形轮廓凸包分别拼接于所述植物骨架的不同位置上,形成植物模型;子树生长单元400用于按照预定的子树生长算法对所述植物模型进行处理,以完成植物建模。其中,动作识别单元100、造型生成单元200、模型拼接单元300和子树生长单元400的具体工作过程可参照实施例一的相关描述,在此不进行赘述。
本实施例三还公开了一种计算机可读存储介质,所述计算机可读存储介质存储有基于手势交互的植物建模程序,所述基于手势交互的植物建模程序被处理器执行时实现上述的基于手势交互的植物建模方法。
本申请的另一实施例还公开了一种计算机设备,在硬件层面,如图13所示,该终端包括处理器12、内部总线13、网络接口14、计算机可读存储介质11。处理器12从计算机可读存储介质中读取对应的计算机程序然后运行,在逻辑层面上形成请求处理装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。所述计算机可读存储介质11上存储有基于手势交互的植物建模程序,所述基于手势交互的植物建模程序被处理器执行时实现上述的基于手势交互的植物建模方法。
计算机可读存储介质包括永久性和非永久性、可移动和非可移动媒体可以 由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机可读存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
上面对本发明的具体实施方式进行了详细描述,虽然已表示和描述了一些实施例,但本领域技术人员应该理解,在不脱离由权利要求及其等同物限定其范围的本发明的原理和精神的情况下,可以对这些实施例进行修改和完善,这些修改和完善也应在本发明的保护范围内。
Claims (15)
- 一种基于手势交互的植物建模方法,其中,所述植物建模方法包括:识别用户的手势绘制动作,获得手势信息;根据所述手势信息生成植物骨架与外形轮廓凸包;将所述外形轮廓凸包拼接于所述植物骨架的预定位置上,形成植物模型;按照预定的子树生长算法对所述植物模型进行处理,以完成植物建模。
- 根据权利要求1所述的基于手势交互的植物建模方法,其中,所述手势信息包括若干轮廓线,根据所述手势信息生成外形轮廓凸包的方法包括:从若干轮廓线中选取两条相邻的第一轮廓线和第二轮廓线;对所述第一轮廓线和第二轮廓线进行二次采样处理,分别获得所述第一轮廓线上的若干第一采样点以及所述第二轮廓线上的若干第二采样点;按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包。
- 根据权利要求2所述的基于手势交互的植物建模方法,其中,所述第一轮廓线和所述第二轮廓线均为闭环线条,按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:对所述第一轮廓线和所述第二轮廓线中采样点数量较少的轮廓线进行插值,以增加采样点,使得所述第一轮廓线和所述第二轮廓线的采样点数量相同;分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹配对;将所述第一轮廓线和所述第二轮廓线之间的初始匹配对进行连接,接着将其余的采样点按照预定顺序进行连接,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;将所述第一轮廓线或所述第二轮廓线上插值得到的采样点合并至邻近的二次采样得到的采样点,以形成外形轮廓凸包。
- 根据权利要求2所述的基于手势交互的植物建模方法,其中,所述第一轮廓线为闭环线条,所述第二轮廓线为开合线条,按照预定的匹配规则将所 述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:在第一轮廓线上选取与所述第二轮廓线两端的采样点相应的两个初始匹配点,构成两组初始匹配对,其中两个初始匹配点将所述第一轮廓线分割为第一子线条和第二子线条;将第一子线条、第二子线条和第二轮廓线中采样点最大数目作为插值目标数目,采样点较少的其他线条进行插值,使得三条线条的采样点数目相同;将所述第一轮廓线和所述第二轮廓线之间的两对初始匹配对进行连接,接着将第一子线条、第二子线条其余的采样点按照预定顺序连接至第二轮廓线的其余采样点上,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;将插值得到的采样点合并至同一线条上最邻近的二次采样得到的采样点,以形成外形轮廓凸包。
- 根据权利要求3所述的基于手势交互的植物建模方法,其中,分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹配对的方法包括:分别计算所述第一轮廓线上和所述第二轮廓线上每个采样点的重心方向向量;将所述第一轮廓线上的每个采样点的重心方向向量和所述第二轮廓线上的每个采样点的重心方向向量一一进行比较,将所述第一轮廓线上和所述第二轮廓线上重心方向向量最接近的两个采样点作为初始匹配点,以形成一对初始匹配对。
- 根据权利要求2所述的基于手势交互的植物建模方法,其中,所述植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体包括:确定线条编辑区域的步骤:实时识别用户的手势选择动作,生成手势选择指令,所述手势选择指令包括确定指令和区域范围指令;根据所述确定指令选定需要编辑的轮廓线,根据所述区域范围指令在选定的轮廓线上确定线条编辑区域;修改线条形状的步骤:实时识别用户的手势修改动作,生成手势修改指令;根据所述手势修改指令对所述线条编辑区域内的线条形状进行修改。
- 根据权利要求2所述的基于手势交互的植物建模方法,其中,所述植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体包括:实时识别用户的手势编辑动作,生成手势编辑指令,所述手势编辑指令包括曲面选择指令和曲面形状修改指令;根据所述曲面选择指令在所述外形轮廓凸包选定需要编辑的网格区域;根据所述曲面形状修改指令对所述网格区域内的网格顶点进行修改。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有基于手势交互的植物建模程序,所述基于手势交互的植物建模程序被处理器执行时实现权利要求1任一项所述的基于手势交互的植物建模方法。
- 根据权利要求8所述的计算机可读存储介质,其中,所述手势信息包括若干轮廓线,根据所述手势信息生成外形轮廓凸包的方法包括:从若干轮廓线中选取两条相邻的第一轮廓线和第二轮廓线;对所述第一轮廓线和第二轮廓线进行二次采样处理,分别获得所述第一轮廓线上的若干第一采样点以及所述第二轮廓线上的若干第二采样点;按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包。
- 根据权利要求9所述的计算机可读存储介质,其中,所述第一轮廓线和所述第二轮廓线均为闭环线条,按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:对所述第一轮廓线和所述第二轮廓线中采样点数量较少的轮廓线进行插值,以增加采样点,使得所述第一轮廓线和所述第二轮廓线的采样点数量相同;分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹配对;将所述第一轮廓线和所述第二轮廓线之间的初始匹配对进行连接,接着将 其余的采样点按照预定顺序进行连接,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;将所述第一轮廓线或所述第二轮廓线上插值得到的采样点合并至邻近的二次采样得到的采样点,以形成外形轮廓凸包。
- 根据权利要求9所述的计算机可读存储介质,其中,所述第一轮廓线为闭环线条,所述第二轮廓线为开合线条,按照预定的匹配规则将所述第一采样点与所述第二采样点进行连接,以形成外形轮廓凸包的方法包括:在第一轮廓线上选取与所述第二轮廓线两端的采样点相应的两个初始匹配点,构成两组初始匹配对,其中两个初始匹配点将所述第一轮廓线分割为第一子线条和第二子线条;将第一子线条、第二子线条和第二轮廓线中采样点最大数目作为插值目标数目,采样点较少的其他线条进行插值,使得三条线条的采样点数目相同;将所述第一轮廓线和所述第二轮廓线之间的两对初始匹配对进行连接,接着将第一子线条、第二子线条其余的采样点按照预定顺序连接至第二轮廓线的其余采样点上,以在所述第一轮廓线和所述第二轮廓线之间形成若干三角形网格;将插值得到的采样点合并至同一线条上最邻近的二次采样得到的采样点,以形成外形轮廓凸包。
- 根据权利要求10所述的计算机可读存储介质,其中,分别在所述第一轮廓线和所述第二轮廓线上选取初始匹配点,形成初始匹配对的方法包括:分别计算所述第一轮廓线上和所述第二轮廓线上每个采样点的重心方向向量;将所述第一轮廓线上的每个采样点的重心方向向量和所述第二轮廓线上的每个采样点的重心方向向量一一进行比较,将所述第一轮廓线上和所述第二轮廓线上重心方向向量最接近的两个采样点作为初始匹配点,以形成一对初始匹配对。
- 根据权利要求9所述的计算机可读存储介质,其中,所述植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体包括:确定线条编辑区域的步骤:实时识别用户的手势选择动作,生成手势选择指令,所述手势选择指令包括确定指令和区域范围指令;根据所述确定指令选定需要编辑的轮廓线,根据所述区域范围指令在选定的轮廓线上确定线条编辑区域;修改线条形状的步骤:实时识别用户的手势修改动作,生成手势修改指令;根据所述手势修改指令对所述线条编辑区域内的线条形状进行修改。
- 根据权利要求9所述的计算机可读存储介质,其中,所述植物建模方法还包括对所述外形轮廓凸包的编辑处理,具体包括:实时识别用户的手势编辑动作,生成手势编辑指令,所述手势编辑指令包括曲面选择指令和曲面形状修改指令;根据所述曲面选择指令在所述外形轮廓凸包选定需要编辑的网格区域;根据所述曲面形状修改指令对所述网格区域内的网格顶点进行修改。
- 一种计算机设备,其中,所述计算机设备包括计算机可读存储介质、处理器和存储在所述计算机可读存储介质中的基于手势交互的植物建模程序,所述基于手势交互的植物建模程序被处理器执行时实现权利要求1所述的基于手势交互的植物建模方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110203699.1A CN112799517B (zh) | 2021-02-23 | 2021-02-23 | 基于手势交互的植物建模方法及其植物建模装置、设备 |
CN202110203699.1 | 2021-02-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022178714A1 true WO2022178714A1 (zh) | 2022-09-01 |
Family
ID=75815423
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/077655 WO2022178714A1 (zh) | 2021-02-23 | 2021-02-24 | 基于手势交互的植物建模方法、存储介质、设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112799517B (zh) |
WO (1) | WO2022178714A1 (zh) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392484A (zh) * | 2014-11-13 | 2015-03-04 | 中国科学院深圳先进技术研究院 | 一种三维树木建模方法及装置 |
CN107730587A (zh) * | 2016-08-11 | 2018-02-23 | 浙江中环瑞蓝科技发展有限公司 | 一种基于图片快速三维化交互式建模方法 |
CN108717723A (zh) * | 2018-04-19 | 2018-10-30 | 浙江大学 | 一种基于草图实现形状保持的树木变形动画方法 |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102008020772A1 (de) * | 2008-04-21 | 2009-10-22 | Carl Zeiss 3D Metrology Services Gmbh | Darstellung von Ergebnissen einer Vermessung von Werkstücken |
CN101639945A (zh) * | 2009-08-26 | 2010-02-03 | 北京农业信息技术研究中心 | 园艺植物几何造型建模方法及系统 |
CN101833788B (zh) * | 2010-05-18 | 2011-09-07 | 南京大学 | 一种采用手绘草图的三维人体建模方法 |
CN101887596B (zh) * | 2010-06-01 | 2013-02-13 | 中国科学院自动化研究所 | 树木点云数据基于分割和自动生长的三维模型重建方法 |
CN103177098B (zh) * | 2013-03-19 | 2015-08-26 | 浙江大学 | 一种基于手绘图的三维模型检索的方法 |
US20150324114A1 (en) * | 2014-05-06 | 2015-11-12 | Conceptualiz Inc. | System and method for interactive 3d surgical planning and modelling of surgical implants |
CN104200516B (zh) * | 2014-08-05 | 2017-02-15 | 北京农业信息技术研究中心 | 一种植物三维模型的展示方法及系统 |
CN106066690A (zh) * | 2016-05-27 | 2016-11-02 | 北京派得伟业科技发展有限公司 | 基于体感技术的模拟插秧方法和装置 |
CN206101173U (zh) * | 2016-08-11 | 2017-04-19 | 华南理工大学 | 一种分析植物和手势图像信息的自动灌溉系统 |
US10732812B2 (en) * | 2018-07-06 | 2020-08-04 | Lindsay Corporation | Computer-implemented methods, computer-readable media and electronic devices for virtual control of agricultural devices |
CN110794956A (zh) * | 2019-06-19 | 2020-02-14 | 南京邮电大学 | 一种基于Kinect的手势追踪和精准指尖定位系统 |
CN112328821A (zh) * | 2020-10-27 | 2021-02-05 | 同济大学 | 一种基于树型空间的三维树木模型匹配方法 |
-
2021
- 2021-02-23 CN CN202110203699.1A patent/CN112799517B/zh active Active
- 2021-02-24 WO PCT/CN2021/077655 patent/WO2022178714A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392484A (zh) * | 2014-11-13 | 2015-03-04 | 中国科学院深圳先进技术研究院 | 一种三维树木建模方法及装置 |
CN107730587A (zh) * | 2016-08-11 | 2018-02-23 | 浙江中环瑞蓝科技发展有限公司 | 一种基于图片快速三维化交互式建模方法 |
CN108717723A (zh) * | 2018-04-19 | 2018-10-30 | 浙江大学 | 一种基于草图实现形状保持的树木变形动画方法 |
Non-Patent Citations (3)
Title |
---|
HUANG JINMIAO, RAI RAHUL: "Conceptual Three-Dimensional Modeling Using Intuitive Gesture-Based Midair Three-Dimensional Sketching Technique", JOURNAL OF COMPUTING AND INFORMATION SCIENCE IN ENGINEERING, AMERICAN SOCIETY OF MECHANICAL ENGINEERS, NEW YORK, NY, US, vol. 18, no. 4, 1 December 2018 (2018-12-01), US , XP009539217, ISSN: 1530-9827, DOI: 10.1115/1.4040982 * |
LIU ZHIHAO; SHEN CE; LI ZHI; WENG TINGYU; DEUSSEN OLIVER; CHENG ZHANGLIN; WANG DANGXIAO: "Interactive Modeling of Trees using VR Devices", 2019 INTERNATIONAL CONFERENCE ON VIRTUAL REALITY AND VISUALIZATION (ICVRV), IEEE, 18 November 2019 (2019-11-18), pages 69 - 75, XP033836516, DOI: 10.1109/ICVRV47840.2019.00020 * |
YANG YINHUI, WANG RUI: "Realistic Modeling and Rendering of Trees:a Survey", JOURNAL OF COMPUTER-AIDED DESIGN & COMPUTER GRAPHICS, GAI-KAN BIAN-WEI-HUI, BEIJING, CN, vol. 30, no. 2, 1 January 2018 (2018-01-01), CN , pages 191, XP055962083, ISSN: 1003-9775, DOI: 10.3724/SP.J.1089.2018.16236 * |
Also Published As
Publication number | Publication date |
---|---|
CN112799517B (zh) | 2022-08-16 |
CN112799517A (zh) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105844706B (zh) | 一种基于单幅图像的全自动三维头发建模方法 | |
US11217010B2 (en) | Sketch-based shape-preserving tree animation method | |
CN104361632B (zh) | 一种基于Hermite径向基函数的三角网格补洞方法 | |
CN109325993A (zh) | 一种基于类八叉树索引的显著性特征强化采样方法 | |
WO2015188445A1 (zh) | 点云三维模型重建方法及系统 | |
CN102339475B (zh) | 基于表面网格的快速毛发建模方法 | |
CN106887000A (zh) | 医学图像的网格化处理方法及其系统 | |
JP7129529B2 (ja) | 人工知能の使用による3dオブジェクトへのuvマッピング | |
CN113221857B (zh) | 一种基于草图交互的模型变形方法及装置 | |
CN111462306A (zh) | 基于体向量场稀疏局部化分解的三维头发参数化模型方法 | |
CN114021222B (zh) | 建筑物的建模方法、电子设备及计算机存储介质 | |
WO2011034858A2 (en) | Hair meshes | |
CN115423931B (zh) | 一种基于点体素的实景树木三维模型重建方法 | |
Ma et al. | Flowtour: An automatic guide for exploring internal flow features | |
CN111881919A (zh) | 一种基于追踪式格网剖分的线要素智能化简方法与装置 | |
Zhou et al. | Image deformation with vector-field interpolation based on MRLS-TPS | |
WO2024159998A1 (zh) | 三维模型的重构方法及装置 | |
WO2022178714A1 (zh) | 基于手势交互的植物建模方法、存储介质、设备 | |
Liu et al. | 3D Deep Learning for 3D Printing of Tooth Model | |
Mattingly et al. | 3D modeling of branching structures for anatomical instruction | |
CN114049426A (zh) | 植物的建模方法、电子设备及计算机存储介质 | |
CN107452065A (zh) | 实物表面采样数据的边界样点识别方法 | |
CN109636914B (zh) | 一种基于自适应滚球算法的曲面重建方法和系统 | |
CN113298919A (zh) | 一种三维植物点云模型的骨架提取方法 | |
CN112215951B (zh) | 一种核外多分辨率点云表示方法及点云显示方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21927159 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21927159 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.01.2024) |