CN112435342B - 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
CN112435342B
CN112435342B CN202011326103.9A CN202011326103A CN112435342B CN 112435342 B CN112435342 B CN 112435342B CN 202011326103 A CN202011326103 A CN 202011326103A CN 112435342 B CN112435342 B CN 112435342B
Authority
CN
China
Prior art keywords
curved surface
class
data
point cloud
data points
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.)
Active
Application number
CN202011326103.9A
Other languages
Chinese (zh)
Other versions
CN112435342A (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

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

Abstract

The invention provides a region dividing method and a region dividing system for a special-shaped curved surface, wherein the region dividing method comprises the following steps: acquiring a point cloud data set of a three-dimensional curved surface; clustering point cloud data in a 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 a maximum classification error according to the number of the inner data points of each class before and after reclassifying; judging classification stability according to the maximum classification error, and if the classification stability is unstable, re-clustering; and if so, outputting a classification result. The method adopts the conditional probability algorithm and the k-means algorithm to realize region division, solves the technical defect of unclear boundary in the k-means algorithm, ensures that the curved surface division is more stable, improves the stability of the abnormal curved surface division, ensures uniform division results, and further realizes high efficiency and high quality of abnormal 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 areas of special-shaped curved surfaces.
Background
In recent years, in processing materials such as metal, stone, wood, etc., the need for processing a special-shaped curved surface inevitably arises, and in the processing of a special-shaped curved surface material, the division of the area of the curved surface becomes a vital link. And the quality of the special-shaped curved surface area division can directly influence the processing quality and the processing efficiency of the curved surface. In addition, in the curved surface region dividing process, the types of algorithms for realizing the curved surface region dividing are various, and even curved surface dividing results obtained by using the same algorithm for multiple times are different, however, in most cases, the dividing results are required to be unique in the real-time region dividing process.
Disclosure of Invention
The invention aims to provide a region division method and a region division system for a special-shaped curved surface, which are used for improving the stability of the division of the special-shaped curved surface, ensuring the unification of division results and further realizing the high efficiency and high quality of the special-shaped curved surface processing.
In order to achieve the above object, the present invention provides the following solutions:
the regional division method of the special-shaped curved surface comprises the following steps:
acquiring a point cloud data set of a three-dimensional curved surface;
setting initial centroid data points of each type of curved surface;
according to the centroid data points, clustering operation is carried out on point cloud data in the point cloud data set by adopting a k-means algorithm, and initial intra-class data points and initial boundary data points of each class of curved surface are obtained;
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 data points in the initial class of each class of curved surface and the number of data points in the updated class;
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 indicates no, updating the centroid data point of each type of curved surface, and returning to the step of clustering the point cloud data in the point cloud data set by adopting 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 type of curved surface;
and if the first judgment result indicates yes, outputting updated intra-class data points of each class of curved surfaces.
Optionally, the acquiring the point cloud data set of the three-dimensional curved surface specifically includes:
acquiring point cloud data of a three-dimensional curved surface from an STL file;
and adopting a cyclic search algorithm to remove repeated data in the point cloud data of the three-dimensional curved surface, and establishing a point cloud data set of the three-dimensional curved surface.
Optionally, the clustering operation is performed 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 an initial intra-class data point and an initial boundary data point of each class of curved surface, which specifically includes:
calculating Euclidean distances between the j-th point cloud data and the centroid data points 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 judging result;
if the second judgment result shows that the cloud data is the data, setting the j-th point cloud data as the data point in the class corresponding to the shortest Euclidean distance;
if the second judgment result indicates no, setting the jth point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance;
and (3) increasing the value of j by 1, returning to the step of calculating Euclidean distances between the j-th point cloud data and the centroid data points of each type of curved surface to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data points and the initial boundary data points of each type of curved surface.
Optionally, reclassifying the initial boundary data points of each class of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each class of curved surface, which specifically includes:
when the ith point cloud data is an initial boundary data point of the kth type curved surface and an initial boundary data point of the mth type curved surface, 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 class of curved surface is larger than the probability that the ith point cloud data belongs to the mth class of curved surface or not, and obtaining a third judging result;
if the third judgment result shows that the data is yes, the ith point cloud data is used as an intra-class data point of the kth class of curved surface and is divided into the kth class of curved surface;
if the third judgment result indicates no, the ith point cloud data is used as an intra-class data point of the mth class curved surface and is divided into the mth class curved surface;
repeating the steps until the point cloud data of all the initial boundary data points are divided again, and obtaining updated intra-class data points of each class of curved surface.
Optionally, the calculating the maximum classification error according to the number of the data points in the initial class and the number of the data points in the updated class of each class of the curved surface specifically includes:
based on the number of data points in the initial class and the number of data points in the updated class of each class of curved surface, the formula is utilizedCalculating the maximum classification error;
wherein σ represents the maximum classification error, n k,new Representing the number of data points in the class after updating of the kth class curved surface, n k Represents the data points in the initial class of the kth class of curved surface, and K represents the number of clusters.
A region dividing system of a profiled surface, the region dividing 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 surface;
the clustering module is used for carrying out clustering operation on 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;
the reclassifying module is used for 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;
the maximum classification error calculation module is used for calculating the maximum classification error according to the number of the data points in the initial class of each class of curved surface and the number of the data points in the updated class;
the first judging module is used for judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judging result;
the centroid data point updating module is used for updating centroid data points of each type of curved surface if the first judging result indicates no, and returning to the step of clustering 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 type of curved surface;
and the in-class data point updating module is used for outputting updated in-class data points of each class of curved surfaces if the first judging result indicates yes.
Optionally, the point cloud data acquisition module specifically includes:
the point cloud data acquisition sub-module is used for acquiring the point cloud data of the three-dimensional curved surface from the STL file;
and the repeated data deleting sub-module 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 sub-module is used for calculating the Euclidean distance between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances;
the second judging submodule is used for 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 judging result;
the first clustering sub-module is used for setting the j-th point cloud data as the intra-class data point of the shortest Euclidean distance corresponding class if the second judging result shows that the j-th point cloud data is the shortest Euclidean distance corresponding class;
the second aggregation sub-module is used for setting the j-th point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance if the second judging result indicates no;
and the return sub-module is used for increasing the value of j by 1, and returning to the step of calculating the Euclidean distance between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed to obtain the initial intra-type data point and the initial boundary data point of each type of curved surface.
Optionally, the reclassifying module specifically includes:
the conditional probability calculation sub-module is used for 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 when the ith point cloud data is both 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 judging sub-module is used for judging whether the probability that the ith point cloud data belongs to the kth class of curved surface is larger than the probability that the ith point cloud data belongs to the mth class of curved surface or not, and obtaining a third judging result;
the first reclassifying sub-module is used for dividing the ith point cloud data into the kth type of curved surfaces as intra-class data points of the kth type of curved surfaces if the third judging result shows yes;
and the second reclassifying sub-module is used for dividing the ith point cloud data into the mth type curved surface as the intra-class data point of the mth type curved surface if the third judging result indicates no.
Optionally, the maximum classification error calculation module specifically includes:
a maximum classification error calculation sub-module for using a formula according to the number of data points in the initial class and the number of data points in the updated class of each class of curved surfaceCalculating the maximum classification error;
wherein σ represents the maximum classification error, n k,new Representing the number of data points in the class after updating of the kth class curved surface, n k Represents the data points in the initial class of the kth class of curved surface, 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 dividing method and a region dividing system for a special-shaped curved surface, wherein the region dividing method comprises the following steps: acquiring a point cloud data set of a three-dimensional curved surface; setting initial centroid data points of each type of curved surface; according to the centroid data points, clustering operation is carried out on point cloud data in the point cloud data set by adopting a k-means algorithm, and initial intra-class data points and initial boundary data points of each class of curved surface are obtained; 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 data points in the initial class of each class of curved surface and the number of data points in the updated class; 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 indicates no, updating mass center data points of each type of curved surface, and re-clustering; and if the first judgment result indicates yes, outputting updated intra-class data points of each class of curved surfaces. The method adopts the conditional probability algorithm and the k-means algorithm to realize region division, solves the technical defect of unclear boundary in the k-means algorithm, ensures that the curved surface division is more stable, improves the stability of the abnormal curved surface division, ensures uniform division results, and further realizes high efficiency and high quality of abnormal curved surface processing.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for dividing a region of a special-shaped curved surface;
FIG. 2 is a schematic diagram of a method for dividing a region of a profiled surface according to the invention;
FIG. 3 is a three-dimensional curved surface model diagram of a special-shaped curved surface provided by an embodiment of the invention;
fig. 4 is a schematic diagram of a result of dividing a special-shaped curved surface area according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a region division method and a region division system for a special-shaped curved surface, which are used for improving the stability of the division of the special-shaped curved surface, ensuring the unification of division results and further realizing the high efficiency and high quality of the special-shaped curved surface processing.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
As shown in fig. 1 and 2, the present invention provides a method for dividing a region of a special-shaped curved surface, the method comprising the steps of:
and step 101, acquiring a point cloud data set of the three-dimensional curved surface.
Step 101, acquiring a point cloud data set of a three-dimensional curved surface specifically includes: acquiring point cloud data of a three-dimensional curved surface from an STL file; and adopting a cyclic search algorithm to remove repeated data in the point cloud data of the three-dimensional curved surface, and establishing a point cloud data set of the three-dimensional curved surface.
Obtaining point cloud data of a three-dimensional curved surface graph surface from an STL file, wherein the point cloud data comprises three-dimensional coordinates of curved surface graph surface data points; because the data stored in the STL file in the form of triangular patches has repeated data points between adjacent patches, repeated data in the surface data points of the curved surface graph needs to be removed through cyclic search to finish data processing.
Step 102, setting initial centroid data points 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 carrying out clustering division, wherein the error threshold value of the number of data points of each divided region compared with the number of data points of the last divided region is sigma 0
And 103, carrying out clustering operation on 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 surface.
Step 103, performing clustering operation on 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, wherein the clustering operation specifically comprises the following steps: calculating Euclidean distances between the j-th point cloud data and the centroid data points 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 judging result; if the second judgment result shows that the cloud data is the data, setting the j-th point cloud data as the data point in the class corresponding to the shortest Euclidean distance; if the second judgment result indicates no, setting the jth point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance; and (3) increasing the value of j by 1, returning to the step of calculating Euclidean distances between the j-th point cloud data and the centroid data points of each type of curved surface to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed, and obtaining the initial intra-class data points and the initial boundary data points of each type of curved surface.
And randomly selecting K data points from the processed curved surface graph data points as centroids. Next, cluster centroid c 1 ,c 2 ,...,c k As the input of the k-means algorithm, all the remaining point data are distributed into the class closest to the cluster centroid according to the Euclidean distance formula. Finally, the Graham-Scan convex hull algorithm in the calculation geometry is utilized to store the data points of the kth class region boundary and the mth class region boundary together as kth class boundary data points according to the region division result (namely, point cloud data belonging to the kth class and the mth class are taken as the kth class boundary data points and the mth class boundary data points) and determine the number n of the data points in the kth class curved surface k
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 of reclassifying the initial boundary data points of each class of curved surface by using a conditional probability algorithm to obtain updated intra-class data points of each class of curved surface, which specifically comprises: when the ith point cloud data is an initial boundary data point of the kth type curved surface and an initial boundary data point of the mth type curved surface, 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 class of curved surface is larger than the probability that the ith point cloud data belongs to the mth class of curved surface or not, and obtaining a third judging result; if the third judgment result shows that the data is yes, the ith point cloud data is used as an intra-class data point of the kth class of curved surface and is divided into the kth class of curved surface; if the third judgment result indicates no, the ith point cloud data is used as an intra-class data point of the mth class curved surface and is divided into the mth class curved surface; repeating the steps until the point cloud data of all the initial boundary data points are divided again, and obtaining updated intra-class data points of each class of curved surface.
Namely, selecting data points one by one from the boundary data points according to a probability formula
(wherein P i (k) Representing the probability that the ith point cloud data in the boundary data points belongs to the kth class, wherein the calculation mode is P i (k)=1/n k ,n k The total number of the data points of the k-th curved surface; p (P) i (k+m|k) represents probability that the ith point cloud data in the boundary data points belongs to the kth class and is shared by the kth class and the mth class under the condition that the ith point cloud data belongs to the kth class, and the calculation mode is P i (k+m|k)=n k /(n k +n m ),n k And n m Respectively, the total number of the kth class and the mth class curved surface data points), and respectively calculating the probability gamma of the current data point which singly belongs to the kth class under the condition that the kth class and the mth class curved surface are shared i,k And the probability gamma that the point alone belongs to the m-th class in the case that the k-th class and the m-th class are common i,m . Second, according to gamma i,k And gamma i,m And (3) judging the size of the product, if the product is gamma i,k Greater than gamma i,m Dividing the current data point in the boundary data points into the kth class; otherwise, dividing the current data point into the m-th class.
Step 105, calculating the maximum classification error according to the number of data points in the initial class of each class of curved surface and the number of data points in the updated class.
Step 105, calculating the maximum classification error according to the number of data points in the initial class and the number of data points in the updated class of each class of the curved surface specifically includes: based on the number of data points in the initial class and the number of data points in the updated class of each class of curved surface, the formula is utilizedCalculating the maximum classification error; wherein σ represents the maximum classification error, n k,new Representing the number of data points in the class after updating of the kth class curved surface, n k Represents the data points in the initial class of the kth class of curved surface, and K represents the number of clusters.
And 106, judging whether the maximum classification error is smaller than an error threshold value, and obtaining a first judgment result.
Step 107, if the first judgment result indicates no, updating the centroid data point of each type of curved surface, and returning to the step of clustering cloud data in the point cloud data set by adopting 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 type of curved surface;
and step 108, if the first judgment result indicates yes, outputting updated intra-class data points of each class of curved surfaces.
Namely, the current maximum classification error sigma and the preset error threshold sigma 0 If the current maximum classification error sigma is greater than the error threshold sigma 0 Then the intra-class centroid point data c of each region is updated 1 ,c 2 ,...,c k The special-shaped curved surface is used as the input of a k-means algorithm to be re-divided; otherwise, all data points among the classes are saved, the judging process is ended, and the curved surface area tends to be stable.
A region dividing system of a profiled surface, the region dividing 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 the point cloud data of the three-dimensional curved surface from the STL file; and the repeated data deleting sub-module 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 surface;
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 intra-class data points and initial boundary data points of each class of curved surface.
The clustering module specifically comprises: the Euclidean distance calculation sub-module is used for calculating the Euclidean distance between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances; the second judging submodule is used for 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 judging result; the first clustering sub-module is used for setting the j-th point cloud data as the intra-class data point of the shortest Euclidean distance corresponding class if the second judging result shows that the j-th point cloud data is the shortest Euclidean distance corresponding class; the second aggregation sub-module is used for setting the j-th point cloud data as boundary data points of a plurality of classes corresponding to the shortest Euclidean distance if the second judging result indicates no; and the return sub-module is used for increasing the value of j by 1, and returning to the step of calculating the Euclidean distance between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed to obtain the initial intra-type data point and the initial boundary data point of each type of curved surface.
And the reclassifying module is used for 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.
The reclassifying module specifically comprises: the conditional probability calculation sub-module is used for 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 when the ith point cloud data is both 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 judging sub-module is used for judging whether the probability that the ith point cloud data belongs to the kth class of curved surface is larger than the probability that the ith point cloud data belongs to the mth class of curved surface or not, and obtaining a third judging result; the first reclassifying sub-module is used for dividing the ith point cloud data into the kth type of curved surfaces as intra-class data points of the kth type of curved surfaces if the third judging result shows yes; and the second reclassifying sub-module is used for dividing the ith point cloud data into the mth type curved surface as the intra-class data point of the mth type curved surface if the third judging result indicates no.
And the maximum classification error calculation module is used for calculating the maximum classification error according to the number of the data points in the initial class of each class of curved surface and the number of the data points in the updated class.
The maximum classification error calculation module specifically comprises: a maximum classification error calculation sub-module for using a formula according to the number of data points in the initial class and the number of data points in the updated class of each class of curved surfaceCalculating the maximum classification error; wherein σ represents the maximum classification error, n k,new Representing the number of data points in the class after updating of the kth class curved surface, n k Represents the data points in the initial class of the kth class of curved surface, and K represents the number of clusters.
The first judging module is used for judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judging result;
the centroid data point updating module is used for updating centroid data points of each type of curved surface if the first judging result indicates no, and returning to the step of clustering 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 type of curved surface;
and the in-class data point updating module is used for outputting updated in-class data points of each class of curved surfaces if the first judging result indicates yes.
In order to illustrate the technical effects of the present invention, the present invention provides the following embodiments:
the target graph (special-shaped curved surface) adopted by the invention is a mouse-shaped graph, the target graph is input into software in the form of an STL file, and a three-dimensional curved surface model picture is constructed in a triangular patch mode, as shown in figure 3. The region division is carried out on the target graph by using the k-means algorithm and the conditional probability algorithm for multiple times, the results are all of the same division type, as shown in fig. 4, the condition that multiple results of curved surface division coexist does not exist, and the uniformity of the region division result is fully shown.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides a region dividing method and a system for a special-shaped curved surface, wherein the region dividing method for the special-shaped curved surface is provided by the invention, on the basis of adopting a k-means clustering algorithm to divide the special-shaped curved surface into regions, the probability calculation of region boundary data points is utilized to re-divide the boundary data points of the curved surface, so as to obtain clear updated boundaries, and meanwhile, the intra-class centroid points of each region are updated, so that the curved surface division is easier to be stable, the unique division result is realized as much as possible, and the high efficiency and high quality of special-shaped curved surface processing can be realized by combining a cutter conveniently.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (6)

1. The regional division method 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 initial centroid data points of each type of curved surface;
according to the centroid data points, clustering operation is carried out on point cloud data in the point cloud data set by adopting a k-means algorithm, and initial intra-class data points and initial boundary data points of each class of curved surface are obtained;
and clustering 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, wherein the clustering method specifically comprises the following steps:
calculating Euclidean distances between the j-th point cloud data and the centroid data points 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 judging result;
if the second judgment result shows that the data of the j-th point cloud is the data point in the initial class of the class corresponding to the shortest Euclidean distance;
if the second judgment result indicates no, setting the jth point cloud data as initial boundary data points of a plurality of classes corresponding to the shortest Euclidean distance;
increasing the value of j by 1, and returning to the step of calculating Euclidean distances between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed to obtain the initial intra-class data point and the initial boundary data point of each type of curved surface;
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;
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, wherein the reclassifying comprises the following steps:
when the ith point cloud data is an initial boundary data point of the kth type curved surface and an initial boundary data point of the mth type curved surface, 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 class of curved surface is larger than the probability that the ith point cloud data belongs to the mth class of curved surface or not, and obtaining a third judging result;
if the third judgment result shows that the data is yes, the ith point cloud data is used as an intra-class data point of the kth class of curved surface and is divided into the kth class of curved surface;
if the third judgment result indicates no, the ith point cloud data is used as an intra-class data point of the mth class curved surface and is divided into the mth class curved surface;
repeating the steps until the point cloud data of all the initial boundary data points are divided again, and obtaining updated intra-class data points of each class of curved surface;
calculating the maximum classification error according to the number of data points in the initial class of each class of curved surface and the number of data points in the updated class;
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 indicates no, updating the centroid data point of each type of curved surface, and returning to the step of clustering the point cloud data in the point cloud data set by adopting 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 type of curved surface;
and if the first judgment result indicates yes, outputting updated intra-class data points of each class of curved surfaces.
2. The method for dividing the area of the special-shaped curved surface according to claim 1, wherein the step of obtaining the point cloud data set of the three-dimensional curved surface specifically comprises the following steps:
acquiring point cloud data of a three-dimensional curved surface from an STL file;
and adopting a cyclic search algorithm to remove repeated data in the point cloud data of the three-dimensional curved surface, and establishing a point cloud data set of the three-dimensional curved surface.
3. The method for partitioning a region of a profiled surface as claimed in claim 1, wherein said calculating a maximum classification error based on the number of data points in an initial class and the number of data points in an updated class for each class of the profiled surface comprises:
based on the number of data points in the initial class and the number of data points in the updated class of each class of curved surface, the formula is utilizedCalculating the maximum classification error;
wherein σ represents the maximum classification error, n k,new Representing the number of data points in the class after updating of the kth class curved surface, n k Represents the data points in the initial class of the kth class of curved surface, and K represents the number of clusters.
4. A region dividing system for a profiled surface, the region dividing 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 surface;
the clustering module is used for carrying out clustering operation on 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;
the clustering module specifically comprises:
the Euclidean distance calculation sub-module is used for calculating the Euclidean distance between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances;
the second judging submodule is used for 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 judging result;
the first clustering sub-module is used for setting the j-th point cloud data as the initial intra-class data point of the class corresponding to the shortest Euclidean distance if the second judging result shows that the j-th point cloud data is the data point;
the second aggregation sub-module is used for setting the j-th point cloud data as initial boundary data points of a plurality of classes corresponding to the shortest Euclidean distance if the second judging result indicates no;
the return sub-module is used for increasing the value of j by 1, and returning to the step of calculating the Euclidean distance between the j-th point cloud data and the centroid data point of each type of curved surface to obtain K Euclidean distances until the clustering operation of all the point cloud data is completed to obtain the initial intra-type data point and the initial boundary data point of each type of curved surface;
the reclassifying module is used for 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;
the reclassifying module specifically comprises:
the conditional probability calculation sub-module is used for 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 when the ith point cloud data is both 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 judging sub-module is used for judging whether the probability that the ith point cloud data belongs to the kth class of curved surface is larger than the probability that the ith point cloud data belongs to the mth class of curved surface or not, and obtaining a third judging result;
the first reclassifying sub-module is used for dividing the ith point cloud data into the kth type of curved surfaces as intra-class data points of the kth type of curved surfaces if the third judging result shows yes;
the second reclassifying sub-module is used for dividing the ith point cloud data into the mth class curved surface as the intra-class data point of the mth class curved surface if the third judging result indicates no;
repeatedly calling the sub-modules until the point cloud data of all the initial boundary data points are repartitioned, and obtaining updated intra-class data points of each class of curved surface;
the maximum classification error calculation module is used for calculating the maximum classification error according to the number of the data points in the initial class of each class of curved surface and the number of the data points in the updated class;
the first judging module is used for judging whether the maximum classification error is smaller than an error threshold value or not, and obtaining a first judging result;
the centroid data point updating module is used for updating centroid data points of each type of curved surface if the first judging result indicates no, and returning to the step of clustering 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 type of curved surface;
and the in-class data point updating module is used for outputting updated in-class data points of each class of curved surfaces if the first judging result indicates yes.
5. The system for regional division of a profiled surface as set forth in claim 4, wherein the point cloud data acquisition module specifically includes:
the point cloud data acquisition sub-module is used for acquiring the point cloud data of the three-dimensional curved surface from the STL file;
and the repeated data deleting sub-module 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.
6. The system for dividing the area of the special-shaped curved surface according to claim 4, wherein the maximum classification error calculation module specifically comprises:
a maximum classification error calculation sub-module for using a formula according to the number of data points in the initial class and the number of data points in the updated class of each class of curved surfaceCalculation ofMaximum classification error;
wherein σ represents the maximum classification error, n k,new Representing the number of data points in the class after updating of the kth class curved surface, n k Represents the data points in the initial class of the kth class of curved surface, 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 CN112435342A (en) 2021-03-02
CN112435342B true 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)

Families Citing this family (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聚类算法划分曲面及实验验证;吴明阳;《哈尔滨理工大学学报》;20170228;第22卷(第1期);54-59 *

Also Published As

Publication number Publication date
CN112435342A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN110119811B (en) Convolution kernel cutting method based on entropy importance criterion model
JP2002319024A (en) Image retrieval method based on combination of color and material feeling
CN111145188B (en) Image segmentation method based on ResNet and UNet models
WO2012044686A1 (en) Entropy based image separation
CN104143186B (en) A kind of SLIC super-pixel piecemeal optimization method
KR20080021592A (en) Image comparison by metric embeddings
CN109416749B (en) Image gray scale classification method and device and readable storage medium
CN113658150A (en) Chromosome automatic segmentation and classification method based on deep learning
CN111652855B (en) Point cloud simplification method based on survival probability
CN112435342B (en) Region division method and system for special-shaped curved surface
US20210248729A1 (en) Superpixel merging
Abbas et al. Cmune: A clustering using mutual nearest neighbors algorithm
WO2017201605A1 (en) Large scale social graph segmentation
CN112270405A (en) Filter pruning method and system of convolution neural network model based on norm
CN113674425B (en) Point cloud sampling method, device, equipment and computer readable storage medium
CN109214671B (en) Personnel grouping method, device, electronic device and computer readable storage medium
CN114417095A (en) Data set partitioning method and device
CN106683105A (en) Image segmentation method and image segmentation device
CN108510010A (en) A kind of density peaks clustering method and system based on prescreening
KR20160113826A (en) A Method on Initial Seeds Selection of K-Means for Big Data Clustering
CN107169466B (en) Palm print image quality comprehensive evaluation method based on rank-sum ratio method
Kumar et al. GridShift: A Faster Mode-seeking Algorithm for Image Segmentation and Object Tracking
CN115984671A (en) Model online updating method and device, electronic equipment and readable storage medium
CN115757896A (en) Vector retrieval method, device, equipment and readable storage medium
EP3835976A1 (en) Method and device for data retrieval

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