CN112435342A - Region division method and system for special-shaped curved surface - Google Patents

Region division method and system for special-shaped curved surface Download PDF

Info

Publication number
CN112435342A
CN112435342A CN202011326103.9A CN202011326103A CN112435342A CN 112435342 A CN112435342 A CN 112435342A CN 202011326103 A CN202011326103 A CN 202011326103A CN 112435342 A CN112435342 A CN 112435342A
Authority
CN
China
Prior art keywords
class
curved surface
data
point cloud
point
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
CN202011326103.9A
Other languages
Chinese (zh)
Other versions
CN112435342B (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.)
Huaqiao University
Original Assignee
Huaqiao University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaqiao University filed Critical Huaqiao University
Priority to CN202011326103.9A priority Critical patent/CN112435342B/en
Publication of CN112435342A publication Critical patent/CN112435342A/en
Application granted granted Critical
Publication of CN112435342B publication Critical patent/CN112435342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • 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
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

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

Abstract

The invention provides a region division method and a region division system for a special-shaped curved surface, wherein the region division method comprises the following steps: acquiring a point cloud data set of a three-dimensional curved surface; performing clustering operation on point cloud data in the point cloud data set by adopting a k-means algorithm to obtain initial intra-class data points and initial boundary data points of each class of curved surfaces; reclassifying the initial boundary data points of each type of curved surface by using a conditional probability algorithm; calculating the maximum classification error according to the number of the inner data points of each class before and after reclassification; judging the classification stability according to the maximum classification error, and re-clustering if the classification stability is unstable; and if the classification result is stable, outputting the classification result. The invention adopts the conditional probability algorithm and the k-means algorithm to realize the area division, solves the technical defect of unclear boundary in the k-means algorithm, ensures that the curved surface division is more easily stable, improves the stability of the special-shaped curved surface division, ensures the unity of the division results, and further realizes the high efficiency and high quality of the special-shaped curved surface processing.

Description

Region division method and system for special-shaped curved surface
Technical Field
The invention relates to the technical field of special-shaped curved surface processing, in particular to a method and a system for dividing a special-shaped curved surface area.
Background
In recent years, in processing of materials such as metal, stone, wood, and the like, a demand for processing a deformed curved surface inevitably arises, and in the processing of the deformed curved surface material, division of a curved surface region is a crucial link. And the processing quality and the processing efficiency of the curved surface can be directly influenced by the quality of the special-shaped curved surface area division. In addition, in the curved surface area division process, the types of algorithms for realizing the curved surface area division are various, even the curved surface division results obtained by using the same algorithm for multiple times are different, however, in most cases, the division result is only needed in the real-time area division process.
Disclosure of Invention
The invention aims to provide a method and a system for dividing an area of a special-shaped curved surface, which are used for improving the dividing stability of the special-shaped curved surface and ensuring the uniform dividing result, thereby realizing high efficiency and high quality of processing the special-shaped curved surface.
In order to achieve the purpose, the invention provides the following scheme:
a region division method for a special-shaped curved surface comprises the following steps:
acquiring a point cloud data set of a three-dimensional curved surface;
setting an initial centroid data point of each type of curved surface;
performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial intra-class data points and initial boundary data points of each class of curved surfaces;
reclassifying the initial boundary data points of each type of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surface;
calculating the maximum classification error according to the number of the initial intra-class data points of each class of curved surfaces and the number of the updated intra-class data points;
judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judgment result;
if the first judgment result shows that the point cloud data is not the same as the initial point data of the curved surface, updating the centroid data point of each type of curved surface, and returning to the step of performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data point to obtain the initial in-class data point and the initial boundary data point of each type of curved surface;
and if the first judgment result shows that the curve surface is the same as the curve surface, outputting the updated in-class data point of each class of curve surface.
Optionally, the acquiring a point cloud data set of a three-dimensional curved surface specifically includes:
acquiring point cloud data of the three-dimensional curved surface from the STL file;
and removing repeated data in the point cloud data of the three-dimensional curved surface by adopting a cyclic search algorithm, and establishing a point cloud data set of the three-dimensional curved surface.
Optionally, the performing clustering operation on the point cloud data in the point cloud data set by using a k-means algorithm according to the centroid data point to obtain an initial intra-class data point and an initial boundary data point of each class of curved surface specifically includes:
calculating Euclidean distances between the j point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances;
judging whether the number of classes corresponding to the shortest Euclidean distance in the K Euclidean distances is 1 or not, and obtaining a second judgment result;
if the second judgment result shows that the data is in the class, setting the jth point cloud data as the shortest intra-class data point of the class corresponding to the Euclidean distance;
if the second judgment result shows that the data is not the same as the data of the first point cloud data, setting the j-th point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance;
and increasing the value of j by 1, returning to the step of calculating the Euclidean distance between the j point cloud data and the centroid data point of each class of curved surfaces to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data point and the initial boundary data point of each class of curved surfaces.
Optionally, the re-classifying the initial boundary data point of each type of curved surface by using a conditional probability algorithm to obtain an updated intra-class data point of each type of curved surface specifically includes:
when the ith point cloud data is the initial boundary data point of the kth type curved surface and the initial boundary data point of the mth type curved surface at the same time, respectively calculating the probability that the ith point cloud data belongs to the kth type curved surface and the probability that the ith point cloud data belongs to the mth type curved surface by using a conditional probability algorithm;
judging whether the probability that the ith point cloud data belongs to the kth type curved surface is greater than the probability that the ith point cloud data belongs to the mth type curved surface or not, and obtaining a third judgment result;
if the third judgment result shows that the curve is positive, dividing the ith point cloud data into the kth class curved surface as the in-class data point of the kth class curved surface;
if the third judgment result shows that the data is not the same as the data point in the class of the mth curved surface, dividing the ith point cloud data into the mth curved surface as the data point in the class of the mth curved surface;
and repeating the steps until the point cloud data of all the initial boundary data points are divided again, and obtaining the updated in-class data points of each class of curved surfaces.
Optionally, the calculating the maximum classification error according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surface specifically includes:
according to the number of the initial class data points and the updated class data points of each class of curved surface, a formula is utilized
Figure BDA0002794328690000031
Calculating a maximum classification error;
where σ denotes the maximum classification error, nk,newRepresenting the number of updated intra-class data points, n, for the kth class surfacekRepresents the initial intra-class data points of the kth class of surfaces, and K represents the number of clusters.
A zone division system for a contoured surface, the zone division system comprising:
the point cloud data acquisition module is used for acquiring a point cloud data set of the three-dimensional curved surface;
the centroid data point initialization module is used for setting initial centroid data points of each type of curved surfaces;
the clustering module is used for carrying out clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial in-class data points and initial boundary data points of each class of curved surfaces;
the reclassification module is used for reclassifying the initial boundary data points of each type of curved surfaces by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surfaces;
the maximum classification error calculation module is used for calculating the maximum classification error according to the number of the initial intra-class data points of each class of curved surfaces and the number of the updated intra-class data points;
the first judgment module is used for judging whether the maximum classification error is smaller than an error threshold value or not and obtaining a first judgment result;
a centroid data point updating module, configured to update a centroid data point of each type of curved surface if the first determination result indicates no, and return to the step of "performing clustering operation on the point cloud data in the point cloud data set by using a k-means algorithm according to the centroid data point to obtain an initial in-class data point and an initial boundary data point of each type of curved surface";
and the in-class data point updating module is used for outputting the updated in-class data point of each class of curved surface if the first judgment result shows that the data point is true.
Optionally, the point cloud data obtaining module specifically includes:
the point cloud data acquisition sub-module is used for acquiring point cloud data of the three-dimensional curved surface from the STL file;
and the repeated data deleting submodule is used for removing repeated data in the point cloud data of the three-dimensional curved surface by adopting a cyclic search algorithm and establishing a point cloud data set of the three-dimensional curved surface.
Optionally, the clustering module specifically includes:
the Euclidean distance calculation submodule is used for calculating the Euclidean distance between the j point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances;
the second judgment submodule is used for judging whether the number of the classes corresponding to the shortest Euclidean distance in the K Euclidean distances is 1 or not and obtaining a second judgment result;
the first clustering submodule is used for setting the jth point cloud data as the data point in the class corresponding to the shortest Euclidean distance if the second judgment result shows that the jth point cloud data is the same as the data point in the class corresponding to the shortest Euclidean distance;
the second clustering submodule is used for setting the jth point cloud data as the boundary data points of a plurality of classes corresponding to the shortest Euclidean distance if the second judgment result shows that the data points are not the same;
and the returning submodule is used for increasing the value of j by 1, returning to the step of calculating the Euclidean distance between the j point cloud data and the centroid data point of each class of curved surfaces to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data point and the initial boundary data point of each class of curved surfaces.
Optionally, the reclassification module specifically includes:
the conditional probability calculation submodule is used for calculating the probability that the ith point cloud data belongs to the kth type curved surface and the probability that the ith point cloud data belongs to the mth type curved surface respectively by using a conditional probability algorithm when the ith point cloud data is simultaneously the initial boundary data point of the kth type curved surface and the initial boundary data point of the mth type curved surface;
the third judgment submodule is used for judging whether the probability that the ith point cloud data belongs to the kth type curved surface is greater than the probability that the ith point cloud data belongs to the mth type curved surface or not, and obtaining a third judgment result;
the first reclassification submodule is used for dividing the ith point cloud data into the kth class curved surface as the in-class data point of the kth class curved surface if the third judgment result shows that the ith point cloud data is the in-class data point of the kth class curved surface;
and the second reclassification submodule is used for dividing the ith point cloud data into the mth class curved surface as the in-class data point of the mth class curved surface if the third judgment result shows that the ith point cloud data is not the in-class data point of the mth class curved surface.
Optionally, the maximum classification error calculation module specifically includes:
a maximum classification error calculation submodule for utilizing a formula according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surfaces
Figure BDA0002794328690000051
Calculating a maximum classification error;
where σ denotes the maximum classification error, nk,newRepresenting the number of updated intra-class data points, n, for the kth class surfacekRepresents the initial intra-class data points of the kth class of surfaces, and K represents the number of clusters.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides a region division method and a region division system for a special-shaped curved surface, wherein the region division method comprises the following steps: acquiring a point cloud data set of a three-dimensional curved surface; setting an initial centroid data point of each type of curved surface; performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial intra-class data points and initial boundary data points of each class of curved surfaces; reclassifying the initial boundary data points of each type of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surface; calculating the maximum classification error according to the number of the initial intra-class data points of each class of curved surfaces and the number of the updated intra-class data points; judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judgment result; if the first judgment result shows that the curved surfaces are not clustered, updating the centroid data points of each type of curved surfaces and clustering again; and if the first judgment result shows that the curve surface is the same as the curve surface, outputting the updated in-class data point of each class of curve surface. The invention adopts the conditional probability algorithm and the k-means algorithm to realize the area division, solves the technical defect of unclear boundary in the k-means algorithm, ensures that the curved surface division is more easily stable, improves the stability of the special-shaped curved surface division, ensures the unity of the division results, and further realizes the high efficiency and high quality of the special-shaped curved surface processing.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a method for dividing an area of a deformed curved surface according to the present invention;
FIG. 2 is a schematic diagram of a method for dividing the area of the irregular curved surface according to the present invention;
FIG. 3 is a three-dimensional surface model diagram of the irregular shaped surface provided by the embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a result of dividing the irregular curved surface area according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a method and a system for dividing an area of a special-shaped curved surface, which are used for improving the dividing stability of the special-shaped curved surface and ensuring the uniform dividing result, thereby realizing high efficiency and high quality of processing the special-shaped curved surface.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As shown in fig. 1 and 2, the present invention provides a region division method for a special-shaped curved surface, including the following steps:
step 101, acquiring a point cloud data set of a three-dimensional curved surface.
The step 101 of acquiring a point cloud data set of a three-dimensional curved surface specifically includes: acquiring point cloud data of the three-dimensional curved surface from the STL file; and removing repeated data in the point cloud data of the three-dimensional curved surface by adopting a cyclic search algorithm, and establishing a point cloud data set of the three-dimensional curved surface.
Acquiring point cloud data of the surface of the three-dimensional curved surface graph from the STL file, wherein the point cloud data comprises three-dimensional coordinates of data points of the surface of the curved surface graph; because repeated data points exist between adjacent patches in the data stored in the STL file in the form of a triangular patch, repeated data in the surface data points of the surface graph needs to be removed through cyclic search, and data processing is completed.
Step 102, setting an initial centroid data point of each type of curved surface.
Determining the classification number K of the curved surface according to the curved surface shape of the target graph, and performing cluster division, wherein the error threshold value of each divided region data point compared with the number of the last divided region data points is sigma0
And 103, performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial intra-class data points and initial boundary data points of each class of curved surfaces.
103, according to the centroid data points, performing clustering operation on the point cloud data in the point cloud data set by using a k-means algorithm to obtain initial intra-class data points and initial boundary data points of each class of curved surfaces, specifically comprising: calculating Euclidean distances between the j point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances; judging whether the number of classes corresponding to the shortest Euclidean distance in the K Euclidean distances is 1 or not, and obtaining a second judgment result; if the second judgment result shows that the data is in the class, setting the jth point cloud data as the shortest intra-class data point of the class corresponding to the Euclidean distance; if the second judgment result shows that the data is not the same as the data of the first point cloud data, setting the j-th point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance; and increasing the value of j by 1, returning to the step of calculating the Euclidean distance between the j point cloud data and the centroid data point of each class of curved surfaces to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data point and the initial boundary data point of each class of curved surfaces.
And randomly selecting K data points from the processed curved surface graph data points as a mass center. Secondly, cluster centroid c1,c2,...,ckAnd as the input of the k-means algorithm, distributing all the remaining point data to the class closest to the clustering centroid according to the Euclidean distance formula. And finally, storing the data points of the k-type region boundary and the m-type region boundary as the k-type boundary data points together according to the region division result by utilizing a Graham-Scan convex hull algorithm in the computational geometry (namely, taking the point cloud data belonging to the k-type and the m-type simultaneously as the k-type boundary data points and the m-type boundary data points), and determining the number n of the data points in the class of the k-type curved surfacek
And 104, reclassifying the initial boundary data points of each type of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surface.
Step 104, reclassifying the initial boundary data points of each type of curved surface by using the conditional probability algorithm to obtain updated intra-class data points of each type of curved surface, specifically including: when the ith point cloud data is the initial boundary data point of the kth type curved surface and the initial boundary data point of the mth type curved surface at the same time, respectively calculating the probability that the ith point cloud data belongs to the kth type curved surface and the probability that the ith point cloud data belongs to the mth type curved surface by using a conditional probability algorithm; judging whether the probability that the ith point cloud data belongs to the kth type curved surface is greater than the probability that the ith point cloud data belongs to the mth type curved surface or not, and obtaining a third judgment result; if the third judgment result shows that the curve is positive, dividing the ith point cloud data into the kth class curved surface as the in-class data point of the kth class curved surface; if the third judgment result shows that the data is not the same as the data point in the class of the mth curved surface, dividing the ith point cloud data into the mth curved surface as the data point in the class of the mth curved surface; and repeating the steps until the point cloud data of all the initial boundary data points are divided again, and obtaining the updated in-class data points of each class of curved surfaces.
That is, selecting data points one by one from the boundary data points according to the probability formula
Figure BDA0002794328690000071
(wherein, Pi(k) Representing the probability that the ith point cloud data in the boundary data points belongs to the kth class in a computing mode of Pi(k)=1/nk,nkThe total number of the kth type curved surface data points; pi(k + m | k) represents the probability that the ith point cloud data in the boundary data points belong to the kth class and the kth class in common when the ith point cloud data belong to the kth class, and the calculation mode is Pi(k+m|k)=nk/(nk+nm),nkAnd nmTotal number of data points of kth and mth curved surfaces respectively), and calculating the probability gamma of the current data point independently belonging to the kth curved surface under the condition that the current data point is shared by the kth and mth curved surfacesi,kAnd the probability γ of the point belonging to the m-th class alone in the case where the k-th class and the m-th class are commoni,m. Second, according to γi,kAnd gammai,mIf it is gamma, the value of (2) is judgedi,kGreater than gammai,mDividing the current data point in the boundary data point into the kth class; otherwise, the current data point is classified into the mth class.
And 105, calculating the maximum classification error according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surfaces.
Step 105, calculating the maximum classification error according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surfaces, specifically including: according to the number of the initial class data points and the updated class data points of each class of curved surface, a formula is utilized
Figure BDA0002794328690000081
Calculating a maximum classification error; where σ denotes the maximum classification error, nk,newRepresenting the number of updated intra-class data points, n, for the kth class surfacekRepresents the initial intra-class data points of the kth class of surfaces, and K represents the number of clusters.
And step 106, judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judgment result.
Step 107, if the first judgment result shows that the data point is not the same as the initial in-class data point and the initial boundary data point of each class of curved surfaces, updating the centroid data point of each class of curved surfaces, and returning to the step of performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data point to obtain the initial in-class data point and the initial boundary data point of each class of curved surfaces;
and 108, if the first judgment result shows that the data point is true, outputting the updated in-class data point of each class of curved surface.
I.e. the current maximum classification error sigma and a preset error threshold sigma0If the current maximum classification error sigma is larger than the error threshold sigma0Then, the intra-class centroid point data c of each region is updated1,c2,...,ckTaking the special-shaped curved surface as the input of a k-means algorithm, and subdividing the special-shaped curved surface; otherwise, storing data points among all classes, and ending the judging process, wherein the curved surface area tends to be stable.
A zone division system for a contoured surface, the zone division system comprising:
and the point cloud data acquisition module is used for acquiring a point cloud data set of the three-dimensional curved surface.
The point cloud data acquisition module specifically comprises: the point cloud data acquisition sub-module is used for acquiring point cloud data of the three-dimensional curved surface from the STL file; and the repeated data deleting submodule is used for removing repeated data in the point cloud data of the three-dimensional curved surface by adopting a cyclic search algorithm and establishing a point cloud data set of the three-dimensional curved surface.
The centroid data point initialization module is used for setting initial centroid data points of each type of curved surfaces;
and the clustering module is used for carrying out clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial in-class data points and initial boundary data points of each class of curved surfaces.
The clustering module specifically comprises: the Euclidean distance calculation submodule is used for calculating the Euclidean distance between the j point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances; the second judgment submodule is used for judging whether the number of the classes corresponding to the shortest Euclidean distance in the K Euclidean distances is 1 or not and obtaining a second judgment result; the first clustering submodule is used for setting the jth point cloud data as the data point in the class corresponding to the shortest Euclidean distance if the second judgment result shows that the jth point cloud data is the same as the data point in the class corresponding to the shortest Euclidean distance; the second clustering submodule is used for setting the jth point cloud data as the boundary data points of a plurality of classes corresponding to the shortest Euclidean distance if the second judgment result shows that the data points are not the same; and the returning submodule is used for increasing the value of j by 1, returning to the step of calculating the Euclidean distance between the j point cloud data and the centroid data point of each class of curved surfaces to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data point and the initial boundary data point of each class of curved surfaces.
And the reclassification module is used for reclassifying the initial boundary data points of each type of curved surfaces by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surfaces.
The reclassification module specifically comprises: the conditional probability calculation submodule is used for calculating the probability that the ith point cloud data belongs to the kth type curved surface and the probability that the ith point cloud data belongs to the mth type curved surface respectively by using a conditional probability algorithm when the ith point cloud data is simultaneously the initial boundary data point of the kth type curved surface and the initial boundary data point of the mth type curved surface; the third judgment submodule is used for judging whether the probability that the ith point cloud data belongs to the kth type curved surface is greater than the probability that the ith point cloud data belongs to the mth type curved surface or not, and obtaining a third judgment result; the first reclassification submodule is used for dividing the ith point cloud data into the kth class curved surface as the in-class data point of the kth class curved surface if the third judgment result shows that the ith point cloud data is the in-class data point of the kth class curved surface; and the second reclassification submodule is used for dividing the ith point cloud data into the mth class curved surface as the in-class data point of the mth class curved surface if the third judgment result shows that the ith point cloud data is not the in-class data point of the mth class curved surface.
And the maximum classification error calculation module is used for calculating the maximum classification error according to the number of the initial intra-class data points of each class of curved surfaces and the updated number of the intra-class data points.
The maximum classification error calculation module specifically includes: a maximum classification error calculation submodule for utilizing a formula according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surfaces
Figure BDA0002794328690000101
Calculating a maximum classification error; where σ denotes the maximum classification error, nk,newRepresenting the number of updated intra-class data points, n, for the kth class surfacekRepresents the initial intra-class data points of the kth class of surfaces, and K represents the number of clusters.
The first judgment module is used for judging whether the maximum classification error is smaller than an error threshold value or not and obtaining a first judgment result;
a centroid data point updating module, configured to update a centroid data point of each type of curved surface if the first determination result indicates no, and return to the step of "performing clustering operation on the point cloud data in the point cloud data set by using a k-means algorithm according to the centroid data point to obtain an initial in-class data point and an initial boundary data point of each type of curved surface";
and the in-class data point updating module is used for outputting the updated in-class data point of each class of curved surface if the first judgment result shows that the data point is true.
In order to illustrate the technical effects of the present invention, the present invention provides the following embodiments:
the target graph (the special-shaped curved surface) adopted by the invention is a mouse-shaped graph, the target graph is input into software in an STL file form, and a three-dimensional curved surface model picture is constructed in a triangular patch mode, as shown in figure 3. The target graph is subjected to region division by using a k-means algorithm and a conditional probability algorithm for multiple times, the results are the same division type, as shown in fig. 4, the condition that multiple results of curved surface division coexist does not exist, and the unity of the region division results is fully shown.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides a method and a system for dividing a special-shaped curved surface region, which are provided by the invention.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (10)

1. The method for dividing the area of the special-shaped curved surface is characterized by comprising the following steps of:
acquiring a point cloud data set of a three-dimensional curved surface;
setting an initial centroid data point of each type of curved surface;
performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial intra-class data points and initial boundary data points of each class of curved surfaces;
reclassifying the initial boundary data points of each type of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surface;
calculating the maximum classification error according to the number of the initial intra-class data points of each class of curved surfaces and the number of the updated intra-class data points;
judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judgment result;
if the first judgment result shows that the point cloud data is not the same as the initial point data of the curved surface, updating the centroid data point of each type of curved surface, and returning to the step of performing clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data point to obtain the initial in-class data point and the initial boundary data point of each type of curved surface;
and if the first judgment result shows that the curve surface is the same as the curve surface, outputting the updated in-class data point of each class of curve surface.
2. The method for partitioning an area of a profiled curved surface according to claim 1, wherein the acquiring a point cloud data set of a three-dimensional curved surface specifically includes:
acquiring point cloud data of the three-dimensional curved surface from the STL file;
and removing repeated data in the point cloud data of the three-dimensional curved surface by adopting a cyclic search algorithm, and establishing a point cloud data set of the three-dimensional curved surface.
3. The method for partitioning an area of a special-shaped curved surface according to claim 1, wherein the step of performing clustering operation on the point cloud data in the point cloud data set by using a k-means algorithm according to the centroid data point to obtain an initial intra-class data point and an initial boundary data point of each class of curved surface specifically comprises the steps of:
calculating Euclidean distances between the j point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances;
judging whether the number of classes corresponding to the shortest Euclidean distance in the K Euclidean distances is 1 or not, and obtaining a second judgment result;
if the second judgment result shows that the data is in the class, setting the jth point cloud data as the shortest intra-class data point of the class corresponding to the Euclidean distance;
if the second judgment result shows that the data is not the same as the data of the first point cloud data, setting the j-th point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance;
and increasing the value of j by 1, returning to the step of calculating the Euclidean distance between the j point cloud data and the centroid data point of each class of curved surfaces to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data point and the initial boundary data point of each class of curved surfaces.
4. The method for partitioning an area of a special-shaped curved surface according to claim 1, wherein the step of reclassifying the initial boundary data points of each type of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surface specifically comprises:
when the ith point cloud data is the initial boundary data point of the kth type curved surface and the initial boundary data point of the mth type curved surface at the same time, respectively calculating the probability that the ith point cloud data belongs to the kth type curved surface and the probability that the ith point cloud data belongs to the mth type curved surface by using a conditional probability algorithm;
judging whether the probability that the ith point cloud data belongs to the kth type curved surface is greater than the probability that the ith point cloud data belongs to the mth type curved surface or not, and obtaining a third judgment result;
if the third judgment result shows that the curve is positive, dividing the ith point cloud data into the kth class curved surface as the in-class data point of the kth class curved surface;
if the third judgment result shows that the data is not the same as the data point in the class of the mth curved surface, dividing the ith point cloud data into the mth curved surface as the data point in the class of the mth curved surface;
and repeating the steps until the point cloud data of all the initial boundary data points are divided again, and obtaining the updated in-class data points of each class of curved surfaces.
5. The method for partitioning an area of a profiled curved surface according to claim 1, wherein the calculating the maximum classification error according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surface specifically comprises:
according to the number of the initial class data points and the updated class data points of each class of curved surface, a formula is utilized
Figure FDA0002794328680000031
Calculating a maximum classification error;
where σ denotes the maximum classification error, nk,newRepresenting the number of updated intra-class data points, n, for the kth class surfacekRepresenting the kth class of musicThe initial intra-class data point of the face, K represents the number of clusters.
6. A zone partitioning system for a contoured surface, said zone partitioning system comprising:
the point cloud data acquisition module is used for acquiring a point cloud data set of the three-dimensional curved surface;
the centroid data point initialization module is used for setting initial centroid data points of each type of curved surfaces;
the clustering module is used for carrying out clustering operation on the point cloud data in the point cloud data set by adopting a k-means algorithm according to the centroid data points to obtain initial in-class data points and initial boundary data points of each class of curved surfaces;
the reclassification module is used for reclassifying the initial boundary data points of each type of curved surfaces by using a conditional probability algorithm to obtain updated intra-class data points of each type of curved surfaces;
the maximum classification error calculation module is used for calculating the maximum classification error according to the number of the initial intra-class data points of each class of curved surfaces and the number of the updated intra-class data points;
the first judgment module is used for judging whether the maximum classification error is smaller than an error threshold value or not and obtaining a first judgment result;
a centroid data point updating module, configured to update a centroid data point of each type of curved surface if the first determination result indicates no, and return to the step of "performing clustering operation on the point cloud data in the point cloud data set by using a k-means algorithm according to the centroid data point to obtain an initial in-class data point and an initial boundary data point of each type of curved surface";
and the in-class data point updating module is used for outputting the updated in-class data point of each class of curved surface if the first judgment result shows that the data point is true.
7. The system for partitioning an area of a profiled curved surface according to claim 6, wherein the point cloud data obtaining module specifically comprises:
the point cloud data acquisition sub-module is used for acquiring point cloud data of the three-dimensional curved surface from the STL file;
and the repeated data deleting submodule is used for removing repeated data in the point cloud data of the three-dimensional curved surface by adopting a cyclic search algorithm and establishing a point cloud data set of the three-dimensional curved surface.
8. The system for partitioning an area of a profiled curved surface according to claim 6, wherein the clustering module specifically comprises:
the Euclidean distance calculation submodule is used for calculating the Euclidean distance between the j point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances;
the second judgment submodule is used for judging whether the number of the classes corresponding to the shortest Euclidean distance in the K Euclidean distances is 1 or not and obtaining a second judgment result;
the first clustering submodule is used for setting the jth point cloud data as the data point in the class corresponding to the shortest Euclidean distance if the second judgment result shows that the jth point cloud data is the same as the data point in the class corresponding to the shortest Euclidean distance;
the second clustering submodule is used for setting the jth point cloud data as the boundary data points of a plurality of classes corresponding to the shortest Euclidean distance if the second judgment result shows that the data points are not the same;
and the returning submodule is used for increasing the value of j by 1, returning to the step of calculating the Euclidean distance between the j point cloud data and the centroid data point of each class of curved surfaces to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data point and the initial boundary data point of each class of curved surfaces.
9. The system for partitioning an area of a profiled curved surface according to claim 6, wherein the reclassification module specifically comprises:
the conditional probability calculation submodule is used for calculating the probability that the ith point cloud data belongs to the kth type curved surface and the probability that the ith point cloud data belongs to the mth type curved surface respectively by using a conditional probability algorithm when the ith point cloud data is simultaneously the initial boundary data point of the kth type curved surface and the initial boundary data point of the mth type curved surface;
the third judgment submodule is used for judging whether the probability that the ith point cloud data belongs to the kth type curved surface is greater than the probability that the ith point cloud data belongs to the mth type curved surface or not, and obtaining a third judgment result;
the first reclassification submodule is used for dividing the ith point cloud data into the kth class curved surface as the in-class data point of the kth class curved surface if the third judgment result shows that the ith point cloud data is the in-class data point of the kth class curved surface;
and the second reclassification submodule is used for dividing the ith point cloud data into the mth class curved surface as the in-class data point of the mth class curved surface if the third judgment result shows that the ith point cloud data is not the in-class data point of the mth class curved surface.
10. The system for partitioning an area of a profiled curved surface according to claim 6, wherein the maximum classification error calculation module specifically comprises:
a maximum classification error calculation submodule for utilizing a formula according to the number of the initial intra-class data points and the updated intra-class data points of each class of curved surfaces
Figure FDA0002794328680000051
Calculating a maximum classification error;
where σ denotes the maximum classification error, nk,newRepresenting the number of updated intra-class data points, n, for the kth class surfacekRepresents the initial intra-class data points of the kth class of surfaces, and K represents the number of clusters.
CN202011326103.9A 2020-11-24 2020-11-24 Region division method and system for special-shaped curved surface Active CN112435342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011326103.9A CN112435342B (en) 2020-11-24 2020-11-24 Region division method and system for special-shaped curved surface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011326103.9A CN112435342B (en) 2020-11-24 2020-11-24 Region division method and system for special-shaped curved surface

Publications (2)

Publication Number Publication Date
CN112435342A true CN112435342A (en) 2021-03-02
CN112435342B CN112435342B (en) 2023-08-01

Family

ID=74693895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011326103.9A Active CN112435342B (en) 2020-11-24 2020-11-24 Region division method and system for special-shaped curved surface

Country Status (1)

Country Link
CN (1) CN112435342B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113103226A (en) * 2021-03-08 2021-07-13 同济大学 Visual guide robot system for ceramic biscuit processing and manufacturing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809187A (en) * 2015-04-20 2015-07-29 南京邮电大学 Indoor scene semantic annotation method based on RGB-D data
KR20160115284A (en) * 2015-03-26 2016-10-06 이소현 3-dimensional shape processing method
CN110110802A (en) * 2019-05-14 2019-08-09 南京林业大学 Airborne laser point cloud classification method based on high-order condition random field
CN111027585A (en) * 2019-10-25 2020-04-17 南京大学 K-means algorithm hardware realization method and system based on k-means + + centroid initialization
CN111950589A (en) * 2020-07-02 2020-11-17 东华理工大学 Point cloud region growing optimization segmentation method combined with K-means clustering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160115284A (en) * 2015-03-26 2016-10-06 이소현 3-dimensional shape processing method
CN104809187A (en) * 2015-04-20 2015-07-29 南京邮电大学 Indoor scene semantic annotation method based on RGB-D data
CN110110802A (en) * 2019-05-14 2019-08-09 南京林业大学 Airborne laser point cloud classification method based on high-order condition random field
CN111027585A (en) * 2019-10-25 2020-04-17 南京大学 K-means algorithm hardware realization method and system based on k-means + + centroid initialization
CN111950589A (en) * 2020-07-02 2020-11-17 东华理工大学 Point cloud region growing optimization segmentation method combined with K-means clustering

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴明阳: "应用K-means聚类算法划分曲面及实验验证", 《哈尔滨理工大学学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113103226A (en) * 2021-03-08 2021-07-13 同济大学 Visual guide robot system for ceramic biscuit processing and manufacturing

Also Published As

Publication number Publication date
CN112435342B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
CN109241903B (en) Sample data cleaning method, device, computer equipment and storage medium
CN108830931B (en) Laser point cloud simplification method based on dynamic grid k neighborhood search
Wang et al. Exploring linear relationship in feature map subspace for convnets compression
WO2022042123A1 (en) Image recognition model generation method and apparatus, computer device and storage medium
CN108021908B (en) Face age group identification method and device, computer device and readable storage medium
CN112328715A (en) Visual positioning method, training method of related model, related device and equipment
CN107358172B (en) Human face feature point initialization method based on human face orientation classification
CN113283473B (en) CNN feature mapping pruning-based rapid underwater target identification method
CN104318271B (en) Image classification method based on adaptability coding and geometrical smooth convergence
CN112270405A (en) Filter pruning method and system of convolution neural network model based on norm
US7809726B2 (en) Mechanism for unsupervised clustering
CN105931236B (en) Fuzzy C-Means Clustering initial cluster center automatically selecting method towards image segmentation
CN112435342A (en) Region division method and system for special-shaped curved surface
CN114417095A (en) Data set partitioning method and device
CN110136164B (en) Method for removing dynamic background based on online transmission transformation and low-rank sparse matrix decomposition
CN116433690A (en) Otsu threshold segmentation method based on gray wolf and particle swarm collaborative optimization algorithm
CN116227574A (en) Model pruning method based on deep learning
CN107203916B (en) User credit model establishing method and device
CN113850811A (en) Three-dimensional point cloud example segmentation method based on multi-scale clustering and mask scoring
CN110288604B (en) Image segmentation method and device based on K-means
CN111814618A (en) Pedestrian re-identification method, gait identification network training method and related device
CN108614889B (en) Moving object continuous k nearest neighbor query method and system based on Gaussian mixture model
CN112906724A (en) Image processing device, method, medium and system
CN111160397A (en) Multi-scale visual dictionary generation method and system
CN111627033A (en) Hard sample instance segmentation method and device and computer readable storage 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