Surface sampled data in kind boundary spot identification method
Technical field
The present invention provides a kind of surface in kind sampled data boundary spot identification method, belongs to product reverse Engineering Technology neck
Domain.
Background technology
Curve reestablishing technology has obtained in fields such as reverse-engineering, Medical Image Processing, machine vision and virtual realities
Extensive use, since surface boundary is the key that geometric properties in curve surface definition, during curve reestablishing, boundary sampling point
Identification is not only the core technology of sampled data pretreatment stage in surface in kind, and influences curve reestablishing correctness and precision
Key factor.
For judging whether the either objective sampling point in the sampled data of surface in kind is boundary sampling point, existing recognition methods
It is based primarily upon the adjacent region data measured with Euclidean distance around the sampling point and is judged in conjunction with curved surface local flat characteristic,
I.e.:Plane surface approximation is carried out to target sampling point adjacent region data, then by target sampling point and its adjacent region data to the plane projection, if after
The subpoint of person is located at the former subpoint side, then target sampling point is judged as boundary sampling point.Such methods are primarily present two
A problem:(1) the local flat characteristic of curved surface is only limited to effective to smooth surface, therefore can not be to being located at Sharp edge on curved surface
Or the boundary sampling point in the larger transitional region of Curvature varying is identified;(2) for the sampled data of non-uniform Distribution, although
Many target sampling points are not boundary sampling point, but are very likely located at target based on the neighborhood reference data acquired in Euclidean distance
Sampling point side, to cause to judge by accident.Sun Dianzhu etc. is in academic journal《Agricultural mechanical journal》2013,44 (12), P275-279,
In the scientific paper " the dispersion point cloud Boundary characteristic extraction based on Density Estimator " delivered on 268, it is based on Density Estimator side
Method obtains the mode point that curved surface local shape refers to point set, using its Euclidean distance between target sampling point as according to progress side
The judgement of boundary's sampling point is the failure to solve non-homogeneous adopt although the surface sampling data of Non-smooth surface can be handled to a certain extent
The adaptability problem of sample data.
In conclusion there are boundary spot identification is endless for current surface sampled data in kind boundary spot identification method
The problems such as surface sampled data in kind that is whole, being difficult to adapt to non-uniform Distribution, therefore it provides a kind of recognition capability and adaptability compared with
Strong surface sampled data in kind boundary spot identification method has become those skilled in the art's technical problem urgently to be resolved hurrily.
Invention content
The technical problem to be solved by the present invention is to:Overcome the deficiencies of the prior art and provide a kind of surface in kind sampled data
Boundary spot identification method, boundary sampling point that is quick, accurately identifying surface sampled data in kind.
In order to solve the above technical problems, the technical solution adopted in the present invention is a kind of surface in kind sampled data boundary sample
Point recognition methods, which is characterized in that step is followed successively by:(1) it is based on the calculating acquisition of Density Estimator method and waits for that boundary characteristic identifies
Target sampling point adjacent region data mode point, boundary sampling point is established according to the departure degree of the corresponding mode point of target sampling point and is known
Other criterion, specially:If λ (p) is the good curved surface fractional sample of the corresponding positions on surface in kind p, then estimated based on cuclear density
The mode point calculation formula of meter method is:
Wherein, n is the quantity of sampling point in λ (p), qi∈ λ (p), h are bandwidth, and G (x) is kernel function, target sampling point p and mould
The departure degree of formula point M (λ (p)) can be quantified based on the standard deviation of λ (p), if p meets:
D (p, M (λ (p))) > ε s (2)
P can be judged for boundary sampling point, wherein Euclidean distances of the d () between sampling point;ε is sensitive factor, for adjusting
The sensitivity of boundary spot identification, p is judged as the probability of boundary sampling point and ε values are inversely proportional;S is the standard deviation of λ (p):
The big target sampling point of departure degree is determined as boundary sampling point;(2) it sets surface sampled data set in kind and is combined into S,
Sampling point data dynamically spatial-data index is built to S using KD trees;(3) KD trees index is based on to inquire using dynamic hollow ball expansion algorithm
K neighbour's data of target sampling point p are obtained, and as the initial surface part sample of target sampling point position on surface in kind
This;(4) keep curved surface fractional sample sparse to the neighbouring sampled data of target sampling point to a certain extent based on K mean cluster algorithm
Region extends, and realizes that the extension to curved surface fractional sample optimizes, step is specifically:1) i=0 enables λi(p) it is target sampling point p
K neighbour's point sets;2) λ is determined based on K mean cluster algorithmi(p) probability density maximum point Q (λi(p)), the specific steps are:
1. rightIts k neighbour's point set { x is inquired successively1,x2,...,xk, ηeThe calculating of the Multilayer networks value at place is public
Formula is:
Wherein, it is η that h, which is bandwidth value,eTo its k neighbour's point set { x1,x2,...,xkIn each point distance maximum value, G (x)
For gaussian kernel function;2. K=2 is enabled, to λi(p) its probability density size is respectively pressed in and carries out K mean cluster, from classification results
It chooses cluster centre and corresponds to the maximum cluster C of probability density(max);3. taking C(max)In sampling point define λi(p) probability density pole
Big value point, calculation formula are:
Wherein ω=| C(max)| it is C(max)In sampling point number;3) Q (λ are calculatedi(p)) symmetric points about target sampling point p
Q′(λi(p));4) Q ' (λ are inquired in surface sampled data in kindi(p)) k neighbour's point sets λ 'i(p);5) from λ 'i(p) choosing in
λ can be reduced by selectingi(p) the subset T of neighborhood information missing;6) 9) if T=Φ go to step;7)λi+1(p)=λi(p) ∪ T, i
=i+1;8) step 2) is repeated to 7);9 λ (p)=λi(p)), expansion process terminates, and λ (p) is approximately at target sampling point p at this time
Topological neighborhood;In the step 5) of the above process, from λ 'i(p) selection can reduce λ ini(p) the subset T of neighborhood information missing,
Specific method is:1. to λ 'i(p) sampling point in makes ordered set { q according to its distance progress ascending order arrangement to p1,
q2,...,qk};2. j=1, T=Φ, d (x, y) are the Euclidean distance of point x to point y;3. T=T ∪ { qj};4. according to λ is calculatedi
(p) mode point M (λi(p)) method λ similarly, can be calculated accordinglyi(p) the mode point M (λ of ∪ Ti(p)∪T);If 5. d (p, M (λi
(p) ∪ T)) > d (p, M (λi(p)) q), is then deleted from Tj, go to step 8.;6. j=j+1;7. repeating step 3. to 6.;
8. returning to T;(5) the curved surface fractional sample after optimizing to extension carries out Multilayer networks based on Density Estimator method, obtains
It can reflect the mode point of sampling point distribution characteristics, and boundary characteristic judgement is carried out to target sampling point using boundary spot identification criterion;
(6) it carries out above-mentioned boundary characteristic to all sampling points in S to judge, you can the boundary sampling point for completing surface in kind sampled data is known
Not.
Compared with prior art, the present invention haing the following advantages:
(1) adjacent region data for the target sampling point that the curved surface fractional sample extension optimization algorithm based on K mean cluster obtains exists
The influence that sampled data distribution in surface in kind can be reduced to a certain extent, can effectively improve sampled data boundary spot identification knot
The correctness of fruit, and enhance the adaptability to arbitrarily complicated sampled data;
(2) present invention can effectively be combined with existing more mature dynamically spatial-data index and space querying technology, quickly real
The initialization of existing curved surface fractional sample and extension optimization process, the practicality and efficiency are better than analogous algorithms;
(3) present invention is relatively low to the dependence of parameter, it is only necessary to set k NN Queries points and sensitive factor, and can basis
Demand adjusts relevant parameter, realizes the controllability of boundary spot identification quantity and precision.
Description of the drawings
Fig. 1 is the program implementation flow chart of surface in kind sampled data boundary of the invention spot identification method;
Fig. 2 is surface sampled data in kind and its boundary sampling point schematic diagram;
Fig. 3~Fig. 7 is the building process schematic diagram of surface sampled data dynamically spatial-data index KD trees in kind;
Fig. 8 is target sampling point initial surface fractional sample query process schematic diagram;
Fig. 9 is the initial surface fractional sample schematic diagram of non-boundary sampling point p in non-homogeneous sampled data at random;
Figure 10 is to carry out two mean clusters to curved surface fractional sample shown in Fig. 9 and calculate local probability density maximum point Q;
Figure 11 is that k neighbours are inquired at symmetric points in Figure 10 required points Q about target sampling point p;
Figure 12 is that the result after optimization is extended to the initial surface fractional sample of sampling point p shown in Fig. 9;
Figure 13 is the distribution schematic diagram of mode point corresponding to non-boundary sampling point;
Figure 14 is the distribution schematic diagram of mode point corresponding to the sampling point of boundary;
Figure 15 is the subjects switch base sampled data in embodiment one;
Figure 16 is the switch base sampled data boundary spot identification result in embodiment one;
Figure 17 is the subjects fan disk sampled data in embodiment two;
Figure 18 is the fan disk sampled data boundary spot identification result in embodiment two.
Specific implementation mode
The invention will be further described with reference to the accompanying drawings and embodiments.
Fig. 1 is the program implementation flow chart of surface in kind sampled data boundary of the invention spot identification method, using c program
Design language realizes that surface sampled data in kind boundary spot identification method program includes mainly surface in kind sampled data dynamic
The structure of spatial index KD trees, the acquisition of target sampling point initial surface fractional sample, the extension of curved surface fractional sample optimization and
Boundary characteristic judgement is carried out to target sampling point according to Boundary Recognition criterion.
Fig. 2 is surface sampled data in kind and its boundary sampling point schematic diagram, it can be seen that surface boundary sampling point is broadly divided into
Surface trimming boundary sampling point ΓoThe adjacent dough sheet public boundary sampling point Γ with geometry continuumt, steady material object surface sampled data
Boundary spot identification algorithm should have the ability that accurately identifies to this two classes sampling point, while to the sampling of this kind of non-uniform Distribution
Data have a degree of adaptability.It is maximum between non-boundary sampling point and boundary sampling point that difference lies in points of its adjacent region data
There are significant differences for cloth, and the adjacent region data of non-boundary sampling point is typically distributed about around target sampling point, and the neighbour of boundary sampling point
Numeric field data generally has serious skewed popularity, can reflect neighborhood in view of the mode point being calculated based on Density Estimator method
The distribution character of data can establish boundary spot identification criterion according to departure degree between the corresponding mode point of target sampling point,
Finally establish boundary spot identification discriminate (2).
Fig. 3~Fig. 7 is the building process schematic diagram of surface in kind sampled data dynamically spatial-data index KD trees, empty in view of dynamic
Between index KD trees adopt for multidimensional data have good spatial index performance, and can preferably support sampled data move
State is safeguarded, therefore can effectively improve efficiency data query using KD trees as the index of sampled data.Fig. 3 is surface in kind hits
According to the root node that, Fig. 4 is KD trees, Fig. 5~Fig. 7 is KD trees second to layer 5 node.
Fig. 8 is target sampling point initial surface fractional sample query process schematic diagram, hollow using dynamic expansion based on KD trees
Ball algorithm quick search obtains the k neighbours of target sampling point, and as the initial surface fractional sample of sampling point, specific method is:
KD trees are searched using depth-first traversal algorithm and include the node of target sampling point p, using p as the centre of sphere, with p to its adjacent child node or
The minimum value r1 of father node distance is radius, determines hollow ball region, obtains the data point in the hollow ball region, if it is counted
More than k, then therefrom search with p apart from k nearest sampling point, otherwise using the current radius of a ball as internal diameter,(m is
Acquired neighbour's number of samples) be outer diameter, dynamic expansion hollow ball region, until include in ball points be more than or equal to k, therefrom
It searches with p apart from k nearest point, the final k neighbour's data for obtaining p, the suggestion value range of k is the integer in [8,25],
Generally take 15.
Fig. 9 be non-homogeneous sampled data at random in non-boundary sampling point p initial surface fractional sample schematic diagram, due to by
The limitation of Euclidean distance, the k neighbours sampling point of p are distributed in the side of p mostly, cause the corresponding mode points of p apart from each other, at this time
If being judged according to boundary spot identification criterion, very likely formula (2) is set up, and causes p that will be mistaken for boundary sampling point,
Therefore it needs to be extended optimization to curved surface fractional sample, more have so that the sparse sampling region near target sampling point obtains
The reference sample of effect.
Figure 10~Figure 11, which is described, is extended in optimization process the initial surface fractional sample of sampling point p shown in Fig. 9
Two means clustering process, Figure 12 be extension optimization after curved surface fractional sample, at this time adjacent region data be distributed in around p, p with
The distance of its associative mode point is obviously reduced, and the specific optimization process that extends is:(1) i=0 enables λi(p) k for being target sampling point p
Neighbour's point set;(2) λ is determined based on K mean cluster algorithmi(p) probability density maximum point Q (λi(p)), the specific steps are:①
It is rightIts k neighbour's point set { x is inquired successively1,x2,...,xk, η is calculated according to formula (3)eThe probability density at place is estimated
Evaluation;2. K=2 is enabled, to λi(p) its probability density size is respectively pressed in and carries out K mean cluster, and cluster is chosen from classification results
Center corresponds to the maximum cluster C of probability density(max);3. determining C(max)The number of middle sampling point, the probability density calculated according to formula
Maximum point Q (λi(p));(3) Q (λ are calculatedi(p)) about the symmetric points Q ' (λ of target sampling point pi(p));(4) it is adopted on surface in kind
Q ' (λ are inquired in sample datai(p)) k neighbour's point sets λ 'i(p);(5) from λ 'i(p) selection can reduce λ ini(p) neighborhood information
The subset T of missing;(6) it if T=Φ, gos to step (9);(7)λi+1(p)=λi(p) ∪ T, i=i+1;(8) step is repeated
(2) to (7);(9) λ (p)=λi(p), expansion process terminates, and λ (p) is approximately the topological neighborhood at target sampling point p at this time;On
In the step of stating process (5), from λ 'i(p) selection can reduce λ ini(p) the subset T of neighborhood information missing, specific method are:①
To λ 'i(p) sampling point in makes ordered set { q according to its distance progress ascending order arrangement to p1,q2,...,qk};2. j=1, T
=Φ, d (x, y) are the Euclidean distance of point x to point y;3. T=T ∪ { qj};4. according to the mode point M (λ of calculatingi(p)), similarly may be used
Method calculates λ accordinglyi(p) the mode point M (λ of ∪ Ti(p)∪T);If 5. d (p, M (λi(p) ∪ T)) > d (p, M (λi(p))), then
Q is deleted from Tj, go to step 8.;6. j=j+1;7. repeating step 3. to 6.;8. returning to T.
Figure 13 and Figure 14 is respectively the distribution schematic diagram of non-boundary sampling point and mode point corresponding to the sampling point of boundary, by extension
Curved surface fractional sample after optimization can preferably reflect the local profile feature on original surface near target sampling point, therefore be based on
Density Estimator method calculates the mode point of the good curved surface fractional sample, non-boundary sampling point piCorresponding mode point MiDeviate
Degree is smaller, and boundary sampling point poCorresponding mode point MoDeparture degree it is larger, according to previously described boundary spot identification
The boundary characteristic that criterion can carry out target sampling point judges that carrying out aforesaid operations to all sampling points in sampled data can be realized
The identification and extraction of sampled data all boundary sampling point in surface in kind.
Embodiment one:To switch base sampled data shown in figure 15 into row bound spot identification, which is packet
The uniform sampling data of the hole containing wedge angle, sampling point quantity are 20055, k NN Queries points k=12, sensitive factor ε=1.1, structure
The time for building KD trees is 1.0729s, and the recognition time of all boundary sampling points is 1.1257s, and recognition result is as shown in figure 16.
Embodiment two:To fan disk sampled data shown in Figure 17 into row bound spot identification, which is non-equal
Even sampled data, includes not only Surface clip boundary sampling point, and the also public boundary comprising geometry continuum and Curvature varying is larger
Fillet surface on boundary sampling point, sampling point quantity be 26861, k NN Queries count k=18, sensitive factor ε=0.9, structure
The time of KD trees is 1.4785s, and the recognition time of all boundary sampling points is 1.5377s, and recognition result is as shown in figure 18.
It can be obtained by embodiment, the present invention is applicable not only to the boundary spot identification of uniform sampling data, for non-
Uniform sampling data equally have preferable boundary spot identification effect;It can effectively identify Surface clip boundary sampling point and geometry
Continuous public boundary.
The above described is only a preferred embodiment of the present invention, being not that the invention has other forms of limitations, appoint
What those skilled in the art changed or be modified as possibly also with the technology contents of the disclosure above equivalent variations etc.
Imitate embodiment.But it is every without departing from technical solution of the present invention content, according to the technical essence of the invention to above example institute
Any simple modification, equivalent variations and the remodeling made, still fall within the protection domain of technical solution of the present invention.