CN109102565A - A method of automatically generating Virtual Terrain - Google Patents

A method of automatically generating Virtual Terrain Download PDF

Info

Publication number
CN109102565A
CN109102565A CN201810729619.4A CN201810729619A CN109102565A CN 109102565 A CN109102565 A CN 109102565A CN 201810729619 A CN201810729619 A CN 201810729619A CN 109102565 A CN109102565 A CN 109102565A
Authority
CN
China
Prior art keywords
fritter
sketch
sample
original
cluster
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
CN201810729619.4A
Other languages
Chinese (zh)
Other versions
CN109102565B (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.)
Neijiang Next Generation Internet Data Processing Technology Research Institute
University of Electronic Science and Technology of China
Original Assignee
Neijiang Next Generation Internet Data Processing Technology Research Institute
University of Electronic Science and Technology of China
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 Neijiang Next Generation Internet Data Processing Technology Research Institute, University of Electronic Science and Technology of China filed Critical Neijiang Next Generation Internet Data Processing Technology Research Institute
Priority to CN201810729619.4A priority Critical patent/CN109102565B/en
Publication of CN109102565A publication Critical patent/CN109102565A/en
Application granted granted Critical
Publication of CN109102565B publication Critical patent/CN109102565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of methods for automatically generating Virtual Terrain, carry out indicatrix extraction to sketch and sample DEM respectively, obtain sketch characteristic image and sample characteristics image;The sketch characteristic image is divided into sketch fritter, the sketch fritter corresponds to the original fritter of the sketch on sketch;It is sample fritter by the sample characteristics image segmentation, the sample fritter corresponds to the original fritter of sample on the sample DEM, carries out clustering to the sketch fritter and sample fritter, obtains cluster result;The matching relationship between the original fritter of the sketch and the original fritter of sample is obtained according to the cluster result;Utilize the matching relationship composite result terrain graph;The present invention realizes automatically generating for Virtual Terrain using the method for cluster, realizes that the primary traversal of sketch fritter can establish all matching relationships using the method for cluster, avoids searching for huge sample space repeatedly, to improve combined coefficient.

Description

A method of automatically generating Virtual Terrain
Technical field
The present invention relates to Virtual Terrain fields, and in particular to a method of automatically generate Virtual Terrain.
Background technique
Virtual outdoor scene game, film special efficacy, battlefield simulation, in terms of have a wide range of applications need It asks, and landform will greatly influence the actual experience effect of virtual scene as a crucial composition in virtual scene.Although Real terrain model can easily get that (such as U.S.Geological Survey is provided and can be freely downloaded from network Real terrain digital elevation model (Digital Elevation Model, DEM)), 3D can be directly appended to as needed In scene, but the diversity of landform is limited by very limited real terrain, and is unable to satisfy and is controlled to terrain generation The demand of system, therefore use computer or manually generated landform mostly in practical applications.The side of manually generated landform Method needs professional using 3D modeling tool manual creation dimensional topography or draws 2D gray level image (height map).With right The growth of bigger landform demand more true to nature, modeling manually becomes to become increasingly complex and time-consuming, also more next to the skill requirement of personnel Higher, this considerably increases the development costs of related application, find more inexpensive and have efficient acquisition target landform Method be a problem to be solved.Virtual Terrain is automatically generated using computer can solve these of manually generated generation ask Topic, and increasingly become the important link of building virtual scene.The building of virtual environment is primarily to realize immersion User experience, in order to reach this experience effect, it is desirable that landform has high presence;In the application scenarios of Virtual Terrain, The direct greatest problem using the real terrain being readily apparent is that the pattern of real terrain is limited, is realized to features of terrain Control recombination is the big problem that landform composite calulation needs to solve;Research and develop one of the main purpose that computer generates landform Higher efficiency is exactly pursued, the pursuit of this efficiency includes two aspects, and one is on time cost, it is desirable that landform synthesizes skill Art can be quickly obtained target landform, on the other hand, also require landform synthetic technology simple and convenient in use, to user Very high learning cost is not had.Therefore, landform synthetic technology is always truer with result, control it is more convenient be flexibly target, Process is more efficient to pursue a goal, this is also the standard for measuring a kind of landform synthetic technology advance.
Successively there is the landform synthetic method based on fractal model, the ground based on physical erosion model in landform synthetic technology Shape synthetic method and landform synthetic method based on sample.Wherein the landform synthetic method based on fractal model is using random raw At mode generate landform, this method generates the speed of landform quickly, but the physics that its result lacks in real terrain is invaded Effect is lost, is had a long way to go with the visual effect of real terrain, while the adjustment of this method synthetic parameters is to the shadow of composite result It rings without rule, it is difficult to control composite result.Landform synthetic method based on physical erosion model is in existing rough landform On the basis of the erosion effects such as water body, sunshine in simulating natural environment improve the authenticity of composite result, such as based on point On the basis of the landform method of shape model obtains a coarse landform, for the erosion effect in simulating natural environment.It is this Method has biggish promotion due to being added to the effect of physical erosion compared to the composite result with fractal model in authenticity, But this method calculates cost height, while user being required to be familiar with grasping a variety of physical erosion models, learning cost is higher.Base It is using the DEM of real terrain as sample in the landform synthetic method of sample, is that control generation meets user's grass with user's sketch Figure control while the result with sample landform style.This synthetic method both is from truly due to the fritter in composite result The DEM of shape, composite result has high presence, while user control interface is provided in a manner of sketch, it may be convenient to Control synthesis.Compared to preceding two classes method, synthetic effect and controlling party of the landform synthetic method based on sample in result landform There is very big improvement in face.This method just receives the favor of researcher from after proposing, mainly collects in existing research In flexibly synthesis is controlled more convenient so that obtained result landform is more in line with the expection of user;In feature It matches more accurately, mainly to the improvement in the calculation method of matching cost, is more bonded so that obtaining result landform The control of sketch.But this method is needed according to sketch search sample space to seek match block, since search space is huge, Process is very time-consuming.Also there is researcher to propose the promotion for carrying out combined coefficient by the way of hardware-accelerated in terms of efficiency, and And preferable effect is achieved, however its hardware-accelerated basis is still based on suitable to find to the search repeatedly of sample space Match block, do not carry out excessive improvement in algorithm design level.
Summary of the invention
It is an object of the invention to: a kind of method automatically generating Virtual Terrain is provided, is solved currently based on sample Since search space is huge, the technical problem more than the consuming time during terrain generation in landform synthetic method.
The technical solution adopted by the invention is as follows:
A method of automatically generating Virtual Terrain, comprising the following steps:
Step 1: indicatrix extraction being carried out to sketch and sample DEM respectively, obtains sketch characteristic image and sample characteristics Image;
Step 2: the sketch characteristic image being divided into sketch fritter, the sketch fritter corresponds to the original of the sketch on sketch Beginning fritter;It is sample fritter by the sample characteristics image segmentation, the sample fritter corresponds to the original of the sample on the sample DEM Beginning fritter carries out clustering to the sketch fritter and sample fritter, obtains cluster result;
Step 3: the matching between the original fritter of the sketch and the original fritter of sample being obtained according to the cluster result and is closed System;
Step 4: utilizing the matching relationship composite result terrain graph.
Further, sketch characteristic image is obtained in the step 1 and the specific steps of sample characteristics image are equal are as follows:
Step 11: carrying out the identification of candidate feature point on sketch (or sample DEM) respectively;
Step 12: the adjacent candidate feature point that will identify that carries out line, obtains characteristic curve;
Step 13: converting a figure for the candidate feature point and characteristic curve;
Step 14: minimum forest is extracted from the figure using Kruskal algorithm;
Step 15: utilizing minimum forest building sketch characteristic image (or sample characteristics image).
Further, in the step 11, by the sketch (or sample DEM) on regular length position height value office Portion's maximum value is as candidate feature value.
Further, in the step 12, if being determined using the height value at line segment both ends short when the short intersection of line segment when line Intersect the weight of line segment, weight high line segment is retained when extracting ridge line, weight low line segment is retained when extracting mountain valley.
Further, step 2 specifically:
Step 21: sketch characteristic image is divided into sketch fritter collection S { s1, s2..., sm, by sample characteristics image point It is segmented into sample fritter collection E { e1, e2..., en, wherein m indicates that sketch fritter concentrates the number of element, and n indicates sample fritter collection The number of middle element;
Step 22: the sketch fritter collection S and sample fritter collection E being merged, characteristic curve in all fritters is utilized Branch number B { 0,1 ..., k }, obtains k+1 cluster, and wherein k indicates the number of characteristic curve branch;
Step 23: traversing the k+1 cluster, the cluster without element in any sketch fritter collection S is rejected;It will be free of any The cluster of element is fused in the cluster smaller than current branch number in sample fritter collection E;Obtain new set M { m1, m2..., mjAnd Set C { c1, c2..., cj, wherein the element in set M contains simultaneously in sketch fritter collection S and sample fritter collection E Element, element of the element in sketch fritter collection S in set C, j indicate the number of element in set M and set C;
Step 24: set M being collected centered on set C and carries out clustering, each cluster centre is concentrated at the center of obtaining The corresponding cluster set of point.
Further, step 3 specifically:
Step 31: the sketch fritter a of non-matched sample fritter is searched in cluster result;
Step 32: obtaining the sample fritter of the g arest neighbors of sketch fritter a in cluster result, constitute Candidate Set c;
Step 33: obtaining sketch fritter a corresponding original fritter Ra of sketch in sketch;Obtain sample in Candidate Set c Fritter corresponding original fritter of sample in sample DEM forms set Rc;
Step 34: calculate separately in the original fritter Ra and set Rc at a distance from each original fritter of sample, selection away from Match block from the small original fritter of sample as the original fritter Ra of sketch, the wherein calculation formula of distance are as follows:
D=∑ (xi-yi)2, the height value of the x expression original fritter respective coordinates of sketch, the original fritter correspondence of y expression sample The height value of coordinate, the serial number of i indicates coordinate point.
Further, step 4 specifically:
Step 41: creation blank canvas Q identical with sketch size, and establish coordinate system identical with sketch;
Step 42: the original fritter of the sample matched is placed on the sky as the coordinate where the corresponding original fritter of sketch In white painting canvas Q;
Step 43: fusion treatment being carried out between the gap the original fritter of sample in blank canvas Q, with obtaining final result Shape image.
In conclusion by adopting the above-described technical solution, the beneficial effects of the present invention are:
The present invention realizes automatically generating for Virtual Terrain using the method for cluster, realizes that sketch is small using the method for cluster The primary traversal of block can establish all matching relationships, avoid searching for huge sample space repeatedly, to improve synthesis effect Rate.
Detailed description of the invention
Examples of the present invention will be described by way of reference to the accompanying drawings, in which:
Fig. 1 is overall flow figure of the invention;
Fig. 2 is the flow chart of indicatrix extraction algorithm in the present invention;
Fig. 3 is general frame figure of the invention.
Specific embodiment
All features disclosed in this specification or disclosed all methods or in the process the step of, in addition to mutually exclusive Feature and/or step other than, can combine in any way.
It elaborates below with reference to Fig. 1-3 couples of present invention.
A method of automatically generating Virtual Terrain, comprising the following steps:
Step 1: indicatrix extraction being carried out to sketch and sample DEM respectively, obtains sketch characteristic image and sample characteristics Image;
Step 2: the sketch characteristic image being divided into sketch fritter, the sketch fritter corresponds to the original of the sketch on sketch Beginning fritter;It is sample fritter by the sample characteristics image segmentation, the sample fritter corresponds to the original of the sample on the sample DEM Beginning fritter carries out clustering to the sketch fritter and sample fritter, obtains cluster result;
Step 3: the matching between the original fritter of the sketch and the original fritter of sample being obtained according to the cluster result and is closed System;
Step 4: utilizing the matching relationship composite result terrain graph.
Further, sketch characteristic image is obtained in the step 1 and the specific steps of sample characteristics image are equal are as follows:
Step 11: carrying out the identification of candidate feature point on sketch (or sample DEM) respectively;
Step 12: the adjacent candidate feature point that will identify that carries out line, obtains characteristic curve;
Step 13: converting a figure for the candidate feature point and characteristic curve;
Step 14: minimum forest is extracted from the figure using Kruskal algorithm;
Step 15: utilizing minimum forest building sketch characteristic image (or characteristic image).
Further, in the step 11, by the sketch (or sample DEM) on regular length position height value office Portion's maximum value is as candidate feature value.
Further, in the step 12, if being determined using the height value at line segment both ends short when the short intersection of line segment when line Intersect the weight of line segment, weight high line segment is retained when extracting ridge line, weight low line segment is retained when extracting mountain valley.
Further, step 2 specifically:
Step 21: sketch characteristic image is divided into sketch fritter collection S { s1, s2..., sm, by sample characteristics image point It is segmented into sample fritter collection E { e1, e2..., en, wherein m indicates that sketch fritter concentrates the number of element, and n indicates sample fritter collection The number of middle element;
Step 22: the sketch fritter collection S and sample fritter collection E being merged, characteristic curve in all fritters is utilized Branch number B { 0,1 ..., k }, obtains k+1 cluster, and wherein k indicates the number of characteristic curve branch;
Step 23: traversing the k+1 cluster, the cluster without element in any sketch fritter collection S is rejected;It will be free of any The cluster of element is fused in the cluster smaller than current branch number in sample fritter collection E;Obtain new set M { m1, m2..., mjAnd Set C { c1, c2..., cj, wherein the element in set M contains simultaneously in sketch fritter collection S and sample fritter collection E Element, element of the element in sketch fritter collection S in set C, j indicate the number of element in set M and set C;
Step 24: set M being collected centered on set C and carries out clustering, each cluster centre is concentrated at the center of obtaining The corresponding cluster set of point.
Further, step 3 specifically:
Step 31: the sketch fritter a of non-matched sample fritter is searched in cluster result;
Step 32: obtaining the sample fritter of the g arest neighbors of sketch fritter a in cluster result, constitute Candidate Set c;
Step 33: obtaining sketch fritter a corresponding original fritter Ra of sketch in sketch;Obtain sample in Candidate Set c Fritter corresponding original fritter of sample in sample DEM forms set Rc;
Step 34: calculate separately in the original fritter Ra and set Rc at a distance from each original fritter of sample, selection away from Match block from the small original fritter of sample as the original fritter Ra of sketch, the wherein calculation formula of distance are as follows:
D=∑ (xi-yi)2, the height value of the x expression original fritter respective coordinates of sketch, the original fritter correspondence of y expression sample The height value of coordinate, the serial number of i indicates coordinate point.
Further, step 4 specifically:
Step 41: creation blank canvas Q identical with sketch size, and establish coordinate system identical with sketch;
Step 42: the original fritter of the sample matched is placed on the sky as the coordinate where the corresponding original fritter of sketch In white painting canvas Q;
Step 43: fusion treatment being carried out between the gap the original fritter of sample in blank canvas Q, with obtaining final result Shape image.
Specific embodiment
The terrain generation method that the present invention uses uses the DEM of real terrain as sample, while providing sketch drafting function It can be used as user control interface, automatically generate the Virtual Terrain for meeting user's control sketch while keeping 0 sample landform style.Most Big feature is the search operaqtion repeatedly avoided by the method for cluster to sample database, helps to improve landform combined coefficient. The DEM of sketch and real terrain is to represent height above sea level angle value with pixel value in this method, and composite result is also in the form of same It indicates.In Virtual Terrain, large-scale indicatrix is the key factor for influencing visual experience, and user's sketch is mainly also pair As a result the distribution of features of terrain curve, trend and its height above sea level etc. are controlled, as a result in landform in indicatrix and user's sketch The degree of agreement of the indicatrix of drafting will directly affect the visual experience of synthetic effect, therefore should preferentially guarantee indicatrix Matching.In order to remove the influence of other factors, this method is before constructing matching relationship, first by the feature of sketch and sample graph Curve extracts to obtain respective indicatrix image, carries out clustering, structure by the fritter after dividing to characteristic image Build the matching relationship of sketch and sample graph.
The main reason for carrying out cutting cluster to characteristic image, on the one hand for priority match feature, indicatrix is ground The most significant factor that visual experience is influenced in shape ought to preferentially guarantee the matching of feature in synthesis;On the other hand, user provides Sketch it is often fairly simple, only carry out rough definition from the distribution of feature, tendency, for not feature region then very It may be blank, the original image of the original image and sample graph that lead to user's sketch in this way differs greatly, directly to sketch With carry out cluster after the cutting of the original image of sample graph and will lead to sketch belonging to completely in different clusters from sample graph, it is difficult to reality The matching relationship of existing sketch and sample graph constructs.But after feature extraction, sketch and sample graph all keeping characteristics curves, this Sample can guarantee that the otherness of the two reduces, and mixing cluster may be implemented.Due to the only characteristic image realized in cluster result Classification, the match block that this clustering relationships is only able to find the matching relationship between characteristic image, but needs in composite result Original image must be come from, and the matching of feature fritter corresponds on original image the influence factor it is possible that new, institute It is realized with the matching relationship of sketch and sample original image: being found and sketch characteristic block by the result clustered first in two steps Then the k sample characteristics block matched finds sketch characteristic block and sample characteristics candidate block set is respectively corresponding as candidate collection Original block, of sketch is determined with the matching degree of the original block of corresponding sample characteristics set of blocks by calculating sketch original block With original block.
After each fritter all establishes matching relationship with some fritter in sample in sketch, by these sample images The synthesis desired result landform of target can be obtained according to the positional relationship splicing of matching sketch fritter with fritter.But Sample matches block cannot only simply splice because being likely to occur gap between fritter, need by mixing operation by these Gap is handled, and to guarantee to have between fritter a reasonable smooth excessiveness, shadow does not occur apparent artificial trace and in guarantee Ring visual experience.
The present invention specific steps are as follows:
Step 1: indicatrix extraction being carried out to sketch and sample DEM respectively, obtains sketch characteristic image and sample characteristics Image;
The specific steps for obtaining sketch characteristic image and sample characteristics image are equal are as follows:
Step 11: the identification of candidate feature point is carried out on sketch (or sample DEM) respectively, by the sketch (or sample DEM in) on regular length position the local maximum of height value as candidate feature value, specifically: for sketch (or sample DEM position p), if the length specified around the p of position using user as radius, in its axis direction and axis angle Two sides can find the point lower than the height value of p point on bisector direction, then p point is determined as a feature candidate point;
Step 12: the adjacent candidate feature point that will identify that carries out line, obtains characteristic curve;If line segment short phase when line When friendship, the weight of short intersection line segment is determined using the height value at line segment both ends, weight high line segment is retained when extracting ridge line, is mentioned Retain weight low line segment when taking mountain valley.
Step 13: converting a figure for the candidate feature point and characteristic curve, feature is saved using the data structure of figure Information, subsequent operation are carried out mainly for this figure;
Step 14: minimum forest being extracted from the figure using Kruskal algorithm, this process connects also according to candidate point Occur weight used in line segment crossing instances when line to be calculated;
Step 15: using minimum forest building sketch characteristic image (or sample characteristics image), if characteristic point away from It is uneven from very, then intermediate position is chosen on its line, is optimized the structure of minimum forest, is made on final feature forest Characteristic point is evenly distributed.
Step 2: the sketch characteristic image being divided into sketch fritter, the sketch fritter corresponds to the original of the sketch on sketch Beginning fritter;It is sample fritter by the sample characteristics image segmentation, the sample fritter corresponds to the original of the sample on the sample DEM Beginning fritter carries out clustering to the sketch fritter and sample fritter, obtains cluster result;
Specifically:
Step 21: sketch characteristic image is divided into sketch fritter collection S { s1, s2..., sm, by sample characteristics image point It is segmented into sample fritter collection E { e1, e2..., en, wherein m indicates that sketch fritter concentrates the number of element, and n indicates sample fritter collection The number of middle element;
Step 22: the sketch fritter collection S and sample fritter collection E being merged, characteristic curve in all fritters is utilized Branch number B { 0,1 ..., k }, obtains k+1 cluster, and wherein k indicates the number of characteristic curve branch;
Step 23: traversing the k+1 cluster, the cluster without element in any sketch fritter collection S is rejected;It will be free of any The cluster of element is fused in the cluster smaller than current branch number in sample fritter collection E;Obtain new set M { m1, m2..., mjAnd Set C { c1, c2..., cj, wherein the element in set M contains simultaneously in sketch fritter collection S and sample fritter collection E Element, element of the element in sketch fritter collection S in set C, j indicate the number of element in set M and set C;
Step 24: set M being collected centered on set C and carries out clustering, each cluster centre is concentrated at the center of obtaining The corresponding cluster set of point;Specifically: it is primary to traverse in each of center collection C cluster for each of set M element Heart point determines that each element and cluster centre are concentrated apart from nearest cluster centre point, and each element point is divided into poly- Class center is concentrated in the nearest corresponding set of cluster centre point, and each of cluster centre collection cluster centre point is obtained Corresponding cluster set;
Step 3: the matching between the original fritter of the sketch and the original fritter of sample being obtained according to the cluster result and is closed System;
Specifically:
Step 31: the sketch fritter a of non-matched sample fritter is searched in cluster result;
Step 32: obtaining the sample fritter of the g arest neighbors of sketch fritter a in cluster result, constitute Candidate Set c;
Step 33: obtaining sketch fritter a corresponding original fritter Ra of sketch in sketch;Obtain sample in Candidate Set c Fritter corresponding original fritter of sample in sample DEM forms set Rc;
Step 34: calculate separately in the original fritter Ra and set Rc at a distance from each original fritter of sample, selection away from Match block from the small original fritter of sample as the original fritter Ra of sketch, the wherein calculation formula of distance are as follows:
D=∑ (xi-yi)2, the height value of the x expression original fritter respective coordinates of sketch, the original fritter correspondence of y expression sample The height value of coordinate, i are indicated.
Step 4: utilizing the matching relationship composite result terrain graph.
Specifically:
Step 41: creation blank canvas Q identical with sketch size, and establish coordinate system identical with sketch;Create phase With coordinate system refer to: for the certain point B on sketch on certain point A and painting canvas Q, it is assumed that A in sketch with the sketch upper left corner Relative position and B it is consistent with the relative position in the upper left corner of Q on Q if, then its coordinate under respective coordinate system Value should be consistent;
Step 42: the original fritter of the sample matched is placed on the sky as the coordinate where the corresponding original fritter of sketch In white painting canvas Q;Specifically: coordinate of the matched original fritter of sample in result images is exactly that matching sketch is original small The coordinate of block;Such as in sketch coordinate be (64,64) position on the original fritter of the corresponding matched sample of fritter be P64, then P64 is placed on (64,64) coordinate position of painting canvas Q, and so on, until painting canvas Q is filled end;It is matched with sketch The original fritter of sample both is from sample image, and the matching relationship constructed by preceding step realizes sketch to the spy of synthesis Sign control.
Step 43: fusion treatment being carried out between the gap the original fritter of sample in blank canvas Q, with obtaining final result Shape image;Specifically: in conjunction with two methods of Graph Cut, Shepard interpolation for being merged between block.For convenience, it is assumed that Two blocks of overlapping are respectively Pa and Pb, their overlapping region is known as O.First by execute Graph Cut Pa and Pb it Between find an optimal seam.In order to execute Graph Cut, needs to convert figure for overlapping region O and carry out operation.Side in figure Weight is determined by the height value and its directional derivative of two blocks corresponding in O.After O corresponding figure building in overlapping region is completed, need A division is found, the height value of which block should be retained by determining each pixel on earth according to the weight in figure.Find figure The method of minimal cut generallys use minimal cut or maximum-flow algorithm famous in figure theory to realize.After GraphCut is completed A cut-off rule can be found in the overlapping region of two fritters, retain two overlapping blocks respectively wherein in the two sides of cut-off rule The height value of one block, but still will appear artificial trace on cut-off rule, in order to eliminate this gap, subsequent processing is successive Carry out Shepard interpolation.Passing through interpolation, it is ensured that the height value in the two sides of cut-off rule is the same, so that gap is eliminated, Image is further merged.

Claims (7)

1. a kind of method for automatically generating Virtual Terrain, it is characterised in that: the following steps are included:
Step 1: indicatrix extraction being carried out to sketch and sample DEM respectively, obtains sketch characteristic image and sample characteristics image;
Step 2: the sketch characteristic image being divided into sketch fritter, it is original small that the sketch fritter corresponds to the sketch on sketch Block;It is sample fritter by the sample characteristics image segmentation, the sample that the sample fritter corresponds on the sample DEM is original small Block carries out clustering to the sketch fritter and sample fritter, obtains cluster result;
Step 3: the matching relationship between the original fritter of the sketch and the original fritter of sample is obtained according to the cluster result;
Step 4: utilizing the matching relationship composite result terrain graph.
2. a kind of method for automatically generating Virtual Terrain according to claim 1, it is characterised in that:
Sketch characteristic image is obtained in the step 1 and the specific steps of sample characteristics image are equal are as follows:
Step 11: carrying out the identification of candidate feature point on sketch (or sample DEM) respectively;
Step 12: the adjacent candidate feature point that will identify that carries out line, obtains characteristic curve;
Step 13: converting a figure for the candidate feature point and characteristic curve;
Step 14: minimum forest is extracted from the figure using Kruskal algorithm;
Step 15: utilizing minimum forest building sketch characteristic image (or sample characteristics image).
3. a kind of method for automatically generating Virtual Terrain according to claim 2, it is characterised in that: in the step 11, Using in the sketch (or sample DEM) on regular length position the local maximum of height value as candidate feature value.
4. a kind of method for automatically generating Virtual Terrain according to claim 2, it is characterised in that: in the step 12, If when line when the short intersection of line segment, the weight of short intersection line segment being determined using the height value at line segment both ends, is protected when extracting ridge line The line segment that weight is high is stayed, weight low line segment is retained when extracting mountain valley.
5. a kind of method for automatically generating Virtual Terrain according to claim 1, it is characterised in that: step 2 specifically:
Step 21: sketch characteristic image is divided into sketch fritter collection S { s1, s2..., sm, it is by sample characteristics image segmentation Sample fritter collection E { e1, e2..., en, wherein m indicates that sketch fritter concentrates the number of element, and n indicates that sample fritter concentrates member The number of element;
Step 22: the sketch fritter collection S and sample fritter collection E being merged, the branch of characteristic curve in all fritters is utilized Number B { 0,1 ..., k }, obtains k+1 cluster, and wherein k indicates the number of characteristic curve branch;
Step 23: traversing the k+1 cluster, the cluster without element in any sketch fritter collection S is rejected;Any sample will be free of The cluster of element is fused in the cluster smaller than current branch number in fritter collection E;Obtain new set M { m1, m2..., mjAnd set C {c1, c2..., cj, wherein the element in set M contains the element in sketch fritter collection S and sample fritter collection E simultaneously, Element of the element in sketch fritter collection S in set C, j indicate the number of element in set M and set C;
Step 24: set M being collected centered on set C and carries out clustering, each cluster centre point pair is concentrated at the center of obtaining The cluster set answered.
6. a kind of method for automatically generating Virtual Terrain according to claim 1, it is characterised in that: step 3 specifically:
Step 31: the sketch fritter a of non-matched sample fritter is searched in cluster result;
Step 32: obtaining the sample fritter of the g arest neighbors of sketch fritter a in cluster result, constitute Candidate Set c;
Step 33: obtaining sketch fritter a corresponding original fritter Ra of sketch in sketch;Obtain sample fritter in Candidate Set c The corresponding original fritter of sample in sample DEM forms set Rc;
Step 34: calculating separately in the original fritter Ra and set Rc at a distance from each original fritter of sample, select apart from small Match block of the original fritter of sample as the original fritter Ra of sketch, the wherein calculation formula of distance are as follows:
D=∑ (xi-yi)2, the height value of the x expression original fritter respective coordinates of sketch, the y expression original fritter respective coordinates of sample Height value, the serial number of i indicates coordinate point.
7. a kind of method for automatically generating Virtual Terrain stated according to claim 1, it is characterised in that: step 4 specifically:
Step 41: creation blank canvas Q identical with sketch size, and establish coordinate system identical with sketch;
Step 42: the original fritter of the sample matched being placed on the blank as the coordinate where the corresponding original fritter of sketch and is drawn In cloth Q;
Step 43: fusion treatment being carried out between the gap the original fritter of sample in blank canvas Q, obtains final result topographic map Picture.
CN201810729619.4A 2018-07-05 2018-07-05 Method for automatically generating virtual terrain Active CN109102565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810729619.4A CN109102565B (en) 2018-07-05 2018-07-05 Method for automatically generating virtual terrain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810729619.4A CN109102565B (en) 2018-07-05 2018-07-05 Method for automatically generating virtual terrain

Publications (2)

Publication Number Publication Date
CN109102565A true CN109102565A (en) 2018-12-28
CN109102565B CN109102565B (en) 2022-10-14

Family

ID=64845759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810729619.4A Active CN109102565B (en) 2018-07-05 2018-07-05 Method for automatically generating virtual terrain

Country Status (1)

Country Link
CN (1) CN109102565B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009035A (en) * 2019-04-03 2019-07-12 中南大学 A kind of air measuring station group space clustering method based on images match
CN112132213A (en) * 2020-09-23 2020-12-25 创新奇智(南京)科技有限公司 Sample image processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070014488A1 (en) * 2004-07-09 2007-01-18 Ching-Chien Chen Automatically and accurately conflating road vector data, street maps, and orthoimagery
US20120069051A1 (en) * 2008-09-11 2012-03-22 Netanel Hagbi Method and System for Compositing an Augmented Reality Scene
CN102707332A (en) * 2012-05-11 2012-10-03 北京科技大学 Interpretation and evaluation method for reservoir area engineering geological survey
US20140333616A1 (en) * 2013-05-13 2014-11-13 Electronics And Telecommunications Research Institute Method for representing terrain, method for creating terrain primitives, and apparatus using the methods
CN107633065A (en) * 2017-09-21 2018-01-26 天津大学 A kind of recognition methods based on cartographical sketching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070014488A1 (en) * 2004-07-09 2007-01-18 Ching-Chien Chen Automatically and accurately conflating road vector data, street maps, and orthoimagery
US20120069051A1 (en) * 2008-09-11 2012-03-22 Netanel Hagbi Method and System for Compositing an Augmented Reality Scene
CN102707332A (en) * 2012-05-11 2012-10-03 北京科技大学 Interpretation and evaluation method for reservoir area engineering geological survey
US20140333616A1 (en) * 2013-05-13 2014-11-13 Electronics And Telecommunications Research Institute Method for representing terrain, method for creating terrain primitives, and apparatus using the methods
CN107633065A (en) * 2017-09-21 2018-01-26 天津大学 A kind of recognition methods based on cartographical sketching

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
于健: "基于特征草图的地形生成方法研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *
李伟 等: "山脉图像轮廓线引导的三维虚拟地形合成", 《计算机辅助设计与图形学学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009035A (en) * 2019-04-03 2019-07-12 中南大学 A kind of air measuring station group space clustering method based on images match
CN110009035B (en) * 2019-04-03 2020-10-27 中南大学 Wind measuring station cluster space clustering method based on image matching
CN112132213A (en) * 2020-09-23 2020-12-25 创新奇智(南京)科技有限公司 Sample image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109102565B (en) 2022-10-14

Similar Documents

Publication Publication Date Title
CN109658445A (en) Network training method, increment build drawing method, localization method, device and equipment
CN108038906B (en) Three-dimensional quadrilateral mesh model reconstruction method based on image
CN109242862B (en) Real-time digital surface model generation method
CN110992473B (en) Tree branch modeling method and system based on vehicle-mounted laser scanning point cloud
CN103942838A (en) Point cloud data based single tree three-dimensional modeling and morphological parameter extracting method
CN111612896B (en) Method for reconstructing three-dimensional tree model based on airborne laser radar tree point cloud
CN105354883A (en) 3ds Max fast and precise three-dimensional modeling method and system based on point cloud
CN108053432A (en) The method for registering of indoor sparse cloud scene based on local I CP
CN110189399A (en) A kind of method and system that interior three-dimensional layout rebuilds
CN105261062B (en) A kind of personage's segmentation modeling method
CN109472390A (en) Programme intelligent generation method and system based on machine learning
CN111915726B (en) Construction method of three-dimensional scene of overhead transmission line
CN113487523B (en) Method and device for optimizing graph contour, computer equipment and storage medium
CN104268941A (en) Hot spot forming method and device for simulated three-dimensional map
CN116954233A (en) Automatic matching method for inspection task and route
CN109102565A (en) A method of automatically generating Virtual Terrain
Hu et al. Geometric feature enhanced line segment extraction from large-scale point clouds with hierarchical topological optimization
CN109164444A (en) A kind of natural landscape reconstructing method based on remotely-sensed data
CN111402415B (en) Object body elevation map generation method and device, storage medium and terminal equipment
Huang et al. A 3D individual tree modeling technique based on terrestrial LiDAR point cloud data
Williams et al. A time-line approach for the generation of simulated settlements
CN113838199B (en) Three-dimensional terrain generation method
CN109977190A (en) Area inquiry processing method and device towards scale vector map data
CN103164870A (en) Method for building grid surface by organism point clouds
CN113822914A (en) Method for unifying oblique photography measurement model, computer device, product and medium

Legal Events

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