CN109740227B - Miniature complex part modeling method based on feature recognition - Google Patents

Miniature complex part modeling method based on feature recognition Download PDF

Info

Publication number
CN109740227B
CN109740227B CN201811598808.9A CN201811598808A CN109740227B CN 109740227 B CN109740227 B CN 109740227B CN 201811598808 A CN201811598808 A CN 201811598808A CN 109740227 B CN109740227 B CN 109740227B
Authority
CN
China
Prior art keywords
point
points
sampling
max
curved surface
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
CN201811598808.9A
Other languages
Chinese (zh)
Other versions
CN109740227A (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.)
Jiangnan University
Original Assignee
Jiangnan 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 Jiangnan University filed Critical Jiangnan University
Priority to CN201811598808.9A priority Critical patent/CN109740227B/en
Publication of CN109740227A publication Critical patent/CN109740227A/en
Application granted granted Critical
Publication of CN109740227B publication Critical patent/CN109740227B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a miniature complex part modeling method based on feature recognition, namely a method for reconstructing a CAD model by a real object sample. Wherein, the step of establishing the point cloud topological relation is responsible for finding each sampling pointkNearest neighbors; the step of extracting feature points is responsible for extracting feature points of the point cloud model; the step of 'point cloud data blocking' is responsible for constructing characteristic lines and dividing point clouds belonging to the same curved surface; the model reconstruction step is responsible for generating a curved surface by utilizing the point cloud and the characteristic lines, and obtaining an entity by the projection of the curved surface. The modeling method can achieve the reconstruction of the complex curved surface part model with less human participation. The modeling method has simple steps and higher efficiency, and can be suitable for reverse modeling of parts with similar geometric characteristics.

Description

Miniature complex part modeling method based on feature recognition
Technical Field
The invention relates to a miniature complex part modeling method based on feature recognition, and belongs to the technical field of reverse engineering.
Background
The miniature complex curved surface is widely used in handicraft articles, medical products, such as jade carving, earphone hearing aids, and the like. The forward modeling of the model with small volume and multiple complex features is generally not realized, the entity is required to be scanned into point cloud data, and the reconstruction of the model is completed through a reverse engineering technology.
At present, methods for reconstructing CAD models by using reverse modeling techniques are mainly divided into two main categories: a reverse modeling method based on curved surface reconstruction and a reverse modeling method based on real reconstruction. The reverse modeling method based on the entity feature reconstruction is suitable for the parts formed by combining the basic features, and the reverse modeling based on the curved surface is suitable for the parts with complex curved surfaces.
Modeling methods based on surface reconstruction can be categorized into two main categories: and reconstructing a segmented continuous curved surface model and reconstructing the curved surface model based on functional decomposition. The continuous patches are usually not considered in constructing the N-edge domain, so that the design of the model is not considered, and the surface features are decomposed into a large number of patches when the model is designed, and the reconstructed surface model cannot truly restore the design condition of the surface.
The curved surface model reconstruction based on functional decomposition firstly divides the measured data according to the characteristics and the functions through an automatic data blocking algorithm or manual interaction, and each divided area corresponds to a basic shape on the model. Using existing commercial software such as CATIA, imageware, a user needs to manually select a part of data points to define smooth curves, the curves form boundary lines, section lines and grid lines required by curved surface modeling methods such as sweeping, lofting, covering, filling and the like, then the curved surfaces are fitted, on the other hand, different types of curved surfaces (such as quadric surfaces and freeform surfaces) can be used for directly fitting each data set, and then the extracted boundary curves are used for cutting the obtained fitted curved surfaces; finally, after the reconstruction of the main curved surface is completed, the curved surface sheet is solidified into a complete part model by means of projection, offset and the like.
The point cloud data segmentation is a difficult point in reverse modeling, and the existing intelligent segmentation algorithm mainly comprises an edge-based segmentation method, a surface-based segmentation method and a clustering segmentation method.
In 2002, shaafman et al propose a three-dimensional model segmentation method based on k-means clustering. And determining the distance between the patches by comprehensively considering the space distance and the included angle between the patches. 2004. In 2009, zhang Lining and Wei Yideng, region segmentation in reverse engineering was achieved using fuzzy neural networks and self-organizing mapped neural networks, respectively. In 2010, kalograkis, E, et al proposed a three-dimensional model segmentation method based on geometric classification. According to the three-dimensional model segmentation method, a classifier is constructed by learning some geometric features, and then the three-dimensional model is segmented through man-machine interaction. In 2012, angelina et al improved the region growing method with region merging and genetic algorithm, and the segmentation efficiency was higher but the boundary retention was poor. In 2015, hu Wenqing and other features of the point cloud data, namely coordinates and reflectivity, are selected as a data set, similarity among objects is utilized for clustering, and an objective function of fuzzy C-means clustering is optimized through an iteration method to achieve effective division of the data. In 2017, chen Xiangyang and the like classify small distances into one class by calculating Euclidean distance between each point and k nearest neighbors, and complete data segmentation when the distance between classes is larger than the threshold value, and the method is suitable for models with obvious characteristics and longer distances between different characteristics.
The segmentation method based on the surface and the segmentation method based on the clustering have good robustness to noise, but the accurate region boundary is difficult to determine, and the situation of over segmentation or insufficient segmentation is easy to occur; the quality of the segmentation result is greatly affected by the constraint condition or the compatibility threshold. For complex models, a segmentation method based on edges is generally adopted, and region segmentation is carried out by extracting characteristic points, then constructing characteristic lines and using the characteristic lines.
In 1999, yang et al calculated principal curvature and principal direction by fitting a local quadric to achieve feature line extraction, but the method was not applicable to noise point clouds or sparse point clouds. In 2002, wo considers that the place where the normal vector or curvature of the target point suddenly changes is the boundary between two adjacent areas, and takes the abrupt point of the normal vector or curvature as a characteristic point, and the method is suitable for a point cloud model with obvious characteristics. In 2001, huang estimated the normal vector and curvature of each measurement point on the basis of the data point triangle gridding, and the curvature extreme point was used as the boundary feature point. In 2003, lv Zhen estimated the normal vector at each point according to the orthographic-Cross-Section model, fitted a quadric surface using the normal vector and the adjacent points, calculated the principal curvature and principal direction of the quadric surface, and the extreme point of the principal curvature in the principal direction was determined as the feature point. In 2008, ma and the like propose a method for searching curvature extreme points without requiring curvature values of all points, thereby improving calculation efficiency. In 2014, wu Lushen and the like project a point cloud to a fitting local micro-tangential plane, and judge whether the point cloud is a characteristic point according to the sum of the field force of a neighborhood point set at the point. In 2016, the method is suitable for a simple model with fewer features by extracting feature points by utilizing reflection points on the surface of an object and directly fitting a feature curved surface by using point clouds.
The method for extracting the characteristic points according to the normal vector, the curvature extremum, the field force and the reflection point is better for extracting the sharp characteristic points, but a plurality of curved surfaces with extremely small curvature exist on the miniature complex curved surface part, and the fillet angles between the intersecting surfaces are different. Characteristic points at smoother positions are easy to leak due to the fact that the threshold value is too small, the bandwidth of the characteristic points extracted from sharp positions with the too large threshold value is large, and accuracy of characteristic line reconstruction is affected.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the method for modeling the miniature complex part based on feature recognition is provided, a feature point extraction and feature line reconstruction algorithm is optimized on the basis of a traditional automatic modeling method, complete segmentation of miniature complex part point cloud data is achieved, then a curved surface is generated by utilizing curved surface points and feature lines, and finally the curved surface is projected to the bottom surface to complete reconstruction of a solid model.
The invention adopts the following technical scheme for solving the technical problems:
the miniature complex part modeling method based on feature recognition comprises the following steps:
step 1, acquiring point cloud data of a part, dividing the point cloud data into a plurality of grids by utilizing a space block strategy, taking single point cloud data as sampling points, and searching k nearest neighbors of each sampling point as neighborhoods of the sampling points; when the grid where the sampling point is located searches for less than k nearest neighbors, taking the sampling point as the center of a circle, and taking the maximum distance d from the sampling point to six faces of the grid where the sampling point is located v Calculating an expansion grid for the radius building dynamic sphere, and searching k nearest neighbors in the expansion grid again;
step 2, calculating the average curvature absolute value of the sampling point according to the sampling point and the corresponding neighborhood thereof; carrying out principal component analysis on the sampling points and the neighborhood corresponding to the sampling points to obtain characteristic values corresponding to third principal components of the sampling points; setting a first threshold value Q for the absolute value of the average curvature max Second threshold value Q min Wherein Q is max >Q min Setting a third threshold F for the characteristic value max Fourth threshold F min Wherein F max >F min The method comprises the steps of carrying out a first treatment on the surface of the Absolute value of average curvature is larger than Q max And features(s)A value greater than F min Is greater than F max And an average curvature absolute value greater than Q min The sampling points of the (a) are taken as characteristic points for extraction;
step 3, constructing characteristic lines for the extracted characteristic points corresponding to each curved surface, and dividing the point cloud data in the curved surface;
and 4, reconstructing the curved surface by adopting a reverse engineering method for the characteristic line and the point cloud data in the curved surface obtained in the step 3, and projecting the reconstructed curved surface in an interactive computer aided design and computer aided manufacturing system to obtain a solid model.
As a preferable scheme of the invention, the specific process of the step 1 is as follows:
1) Scanning and acquiring point cloud data of a part, and setting extremum values along x, y and z directions of a coordinate axis as x respectively min 、x max ,y min 、y max ,z min 、z max The method comprises the steps of carrying out a first treatment on the surface of the Will be represented by points (x max y max z max ) Sum point (x) min y min z min ) As a space bounding box of point cloud data, dividing the space bounding box into space regular hexahedral grids with equal spacing L along the coordinate axis direction, wherein the space bounding box is a space hexahedron with diagonal points and parallel to the coordinate plane;
2) Establishing a corresponding relation between each grid and point cloud data in the grids to obtain a grid-point cloud relation;
3) Calculating the distances from the sampling point to the six faces of the grid, searching k nearest neighbors on the grid of the sampling point, wherein the distance from the nearest neighbors to the sampling point is smaller than the minimum distance from the sampling point to the six faces of the grid, repeating 3) on the next sampling point if the distance from the nearest neighbors to the sampling point is searched, otherwise, turning to 4);
4) Taking the sampling point as the center of a circle, and taking the maximum distance d from the sampling point to six faces of the grid v Establishing a dynamic sphere calculation expansion grid for the radius, finding point cloud data in the expansion grid according to the grid-point cloud relation established in 2), and obtaining the distance to a sampling point<d v And the nearest k points are taken from it.
As a preferable scheme of the invention, the specific process of the step 2 is as follows:
1) Randomly selecting 20 sampling points and corresponding neighborhoods thereof, and fitting by using a rapid fitting tool to obtain m curved surface fitting models; when the average curvature absolute value of a certain sampling point is solved, fitting the neighborhood of the sampling point with the m curve fitting models respectively, solving a curve coefficient, calculating the fitting effect of the m curve fitting models respectively, taking the best fitting curve with the smallest deviation, solving the average curvature of the best fitting curve, and taking the absolute value;
2) Carrying out principal component analysis on the sampling points and the neighborhood thereof to obtain characteristic values corresponding to third principal components of the sampling points;
3) Setting a first threshold value Q for the absolute value of the average curvature max Second threshold value Q min Wherein Q is max >Q min Setting a third threshold F for the characteristic value max Fourth threshold F min Wherein F max >F min The method comprises the steps of carrying out a first treatment on the surface of the Absolute value of average curvature is larger than Q max And the characteristic value is greater than F min Is greater than F max And an average curvature absolute value greater than Q min Is extracted as a feature point.
As a preferable scheme of the invention, the specific process of the step 3 is as follows:
1) Calculating the sum of the distances from a certain point to K points around and averaging the distances, and taking the point with the distance larger than the average distance as a boundary point for the extracted feature point corresponding to a certain curved surface; according to the section geometric relationship of the model, taking the outer boundary points of the extracted feature points as points for constructing feature lines;
2) Finding out a starting point of an outer boundary line through a geometric relation, taking two points closest to the starting point as a second point and a third point, fitting a straight line by the three points, judging a point closest to the straight line in 2 to 3 points closest to a third point, taking the point closest to the straight line as a next point, and sequentially extracting points on the outer boundary line;
3) Extracting a model value point on an outer boundary line by adopting a DP algorithm;
4) Interpolating the model value points on the outer boundary line by adopting a B spline curve interpolation method to obtain a characteristic line of the curved surface, and dispersing the characteristic line into curve points;
5) Determining points in a curved surface according to boundary conditions and geometric relations, judging whether the minimum distance from 3 to 5 points nearest to the point to all the curve points obtained in 4) is greater than a certain threshold value, taking the points greater than the threshold value as the points in the curved surface, and repeating the process until no new points are selected as the points in the curved surface.
As a preferable scheme of the invention, the specific process of extracting the model value points on each boundary line by adopting the DP algorithm is as follows:
and (3) sequencing the outer boundary points, constructing a straight line by the first point and the last point, calculating the maximum distance from other points to the straight line, taking the point corresponding to the maximum distance as a model value point if the maximum distance is larger than a set threshold, adding the model value point into the first point and the last point, constructing the straight line of two adjacent points, performing the same operation, and obtaining all the model value points through multiple iterations.
Compared with the prior art, the technical scheme provided by the invention has the following technical effects:
1. the invention solves the defects of the existing data segmentation algorithm, realizes the complete segmentation of the point cloud data of the miniature complex curved surface part, reduces personnel participation in the modeling process, improves the efficiency and the precision of data segmentation, and lays a foundation for high-quality reverse engineering.
2. The invention optimizes the calculation model and the generation flow of the miniature complex part modeling based on feature recognition, establishes a point cloud topological structure, estimates differential geometric quantity, solves covariance matrix eigenvalue, extracts an algorithm by a cross threshold value, and builds an algorithm by a characteristic line; the invention provides a discrete surface characteristic data blocking algorithm and other steps which are buckled all around and unified in the whole modeling process.
3. The feature point extraction method provided by the invention can realize complete extraction of the feature points of the transition surface point cloud data containing various different bending degrees.
Drawings
FIG. 1 is a flow chart of the method for modeling miniature complex parts based on feature recognition of the present invention.
Fig. 2 is a schematic diagram of an expanded grid, in which (a) is a grid where sampling points are located and 26 grids are expanded in a conventional spatial block algorithm, and (b) is a shaded grid which is an expanded grid of the improved algorithm.
Fig. 3 is a point cloud coordinate system transformation schematic.
Fig. 4 is a cross threshold setting diagram.
FIG. 5 is a representative part of an embodiment of the present invention with miniature complex features-a belt head.
Fig. 6 is 1/4 point cloud data of a belt head.
Fig. 7 is a feature point extracted from 1/4 point cloud data.
Fig. 8 is a view showing the selection of feature points around a curved surface.
Fig. 9 is a feature line fitted by feature points.
Fig. 10 shows the curved surface interior points obtained by the segmentation.
Fig. 11 is a curved surface constructed from curved surface points and feature lines.
Fig. 12 is a solid generated from a curved surface.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings. The embodiments described below by referring to the drawings are exemplary only for explaining the present invention and are not to be construed as limiting the present invention.
As shown in FIG. 1, the modeling method of the miniature complex part based on feature recognition mainly comprises four steps: establishing a scattered point cloud topological relation, extracting characteristic points, partitioning point cloud data, and reconstructing a model. The step of establishing the scattered point cloud topological relation is responsible for finding k nearest neighbors of each sampling point; the step of extracting feature points is responsible for extracting feature points of the point cloud model; the step of 'point cloud data blocking' is responsible for constructing characteristic lines and dividing point clouds belonging to the same curved surface; the model reconstruction step is responsible for generating a curved surface by utilizing the point cloud and the characteristic lines, and obtaining an entity by the projection of the curved surface.
1. Scattered point cloud topological relation establishment
Reading in point cloud data, rasterizing the point cloud to reduce the range of searching nearest neighbors, and putting the searched nearest neighbors into a cell array cell neighborhood, wherein the specific steps are as follows:
(1) Determining a space bounding box, namely a grid:
setting extremum values along x, y and z directions of coordinate axes as x respectively min 、x max ,y min 、y max ,z min 、z max The method comprises the steps of carrying out a first treatment on the surface of the Is defined by a point (x max y max z max ) Sum point (x) min y min z min ) The spatial hexahedron, which is a diagonal point and parallel to the coordinate plane, becomes a spatial bounding box of the point cloud. Dividing the space bounding box into space regular hexahedral grids with equal spacing L along the coordinate axis direction, namely dividing the space bounding box into the grids with the equal spacing L along the coordinate axis direction:
grid number divided along x-axis direction
M x =ceil((x max -x min )÷L) (1)
Grid number divided along y-axis direction
M y =ceil((y max -y min )÷L) (2)
Grid number divided along z-axis direction
M z =ceil((z max -z min )÷L) (3)
Determination of the grid width L: randomly selecting N points from the measured point cloud data, and calculating the distance d from the sampling point to the nearest point by using a violence search algorithm u And taking the average value of all the nearest distances as a distribution density function rho, generally selecting 10-20 points according to the uniform distribution condition N of the point cloud data, and selecting the multiple of the distribution density rho as the grid width.
Figure BDA0001921935830000071
(2) Point cloud data rasterization
Set C m For an n×3 point cloud matrix, an i-th point cloud (C m (i,1)C m (i,2)C m (i,3) Number ysg of grid to which x, y, z directions belong x ,ysg y ,ysg z And storing the point clouds belonging to the same grid, and establishing a grid-point cloud corresponding relation.
ysg l (i)=ceil((C m (i,1)-x min )÷L) (4)
ysg m (i)=ceil((C m (i,2)-y min )÷L) (5)
ysg n (i)=ceil((C m (i,3)-z min )÷L) (6)
(3) Calculating the distance from the sampling point to the 6 surfaces of the grid
a=x min +L*ysg l -C m (i,1) (7)
b=C m (i,1)-(x min +L*ysg l -1) (8)
c=y min +L*ysg m -C m (i,2) (9)
d=C m (i,2)-(y min +L*ysg m -1) (10)
e=z min +L*ysg n -C m (i,3) (11)
f=C m (i,3)-(z min +L*ysg n -1) (12)
Searching k nearest neighbors on the grid where the point cloud is located, and repeating (3) for the next point if the nearest neighbors can be searched; if the search is not found, the process goes to (4).
(4) Expanding a new grid centered on a sampling point
As shown in fig. 2 (a) and (b), the sampling point i is used as the center of a circle, and d is used as the center v Establishing a dynamic sphere for the radius, taking a grid contacted by the dynamic sphere as an expansion grid, finding a point cloud j in the expansion grid according to the grid-point cloud relation established in (2), and obtaining d ij <d v The nearest k points are taken.
The invention writes the following function functions in the matlab platform to realize grid expansion:
(1)extend;
the function processes grid sequence matrix grid obtained by a space partitioning strategy, calculates extended grid matrix extension, finds k nearest neighbors of each sampling point, and stores the result in a nearest neighbor cell array cell neighbourhood;
2. feature extraction and boundary extraction
2.1 curvature information estimation
The average curvature is a measure of the degree of curvature of a curved surface, with a greater degree of curvature between intersecting surfaces. Therefore, the curvature may be used as an index for determining the feature point, a reasonable threshold may be set, and a point larger than a certain threshold may be regarded as the feature point.
The curved surface formed by the sampling point and its k-nearest neighbor can approximately reflect the curvature at that point. By least squares fitting, the local area can be characterized by a curved surface z=r (x, y), and the average curvature at each point is calculated. The traditional method for fitting each neighborhood by using the quadric surface has larger error and is not suitable for curvature estimation of the miniature complex surface.
In order to fit different curved surfaces accurately, a neighborhood of 20 points is randomly selected, and m representative curved surface fitting models are obtained by using a quick fitting tool in 1st opt. Fitting the sampling points and the neighborhood thereof with the m models respectively, solving the surface coefficients, then calculating the fitting effect of the m models respectively, taking the best fitting surface with the smallest deviation, solving the average curvature of the surface, and taking the absolute value of the curvature as the curvature of the sampling points.
2.2 application of principal component analysis in Normal vector estimation
Principal Component Analysis (PCA) is a data dimension reduction method commonly used in statistics to extract several variables that are uncorrelated from a number of variables. PCA is essentially a linear transformation that changes the samples to a new coordinate system, the first being the eigenvector corresponding to the maximum eigenvalue of the covariance matrix, the second being the eigenvector corresponding to the second eigenvalue, and so on. The feature vector corresponding to the minimum feature value is the straight line where the normal vector of the sampling point is located, and the direction of the normal vector needs to be further adjusted.
Further theoretical analysis of principal component analysis coordinate transformations may be found: principal component analysis of the sampled points and their neighborhoods corresponds to moving the xy plane of the original system coordinate system to the plane fitted by these points (as shown in fig. 3). The x and y axes correspond to the first principal component and the z axis corresponds to the third principal component. The smaller the projection variance of the point on the z axis is, the smaller the error of plane fitting is, the sampling point is the inner point of the curved surface, otherwise, the sampling point is the boundary point, namely the feature point to be extracted is indicated.
It can be shown that the eigenvalues of the covariance matrix are the variances projected in each coordinate system. Therefore, the threshold value is directly set for the characteristic value corresponding to the third main component to extract the characteristic point, which is much simpler and more efficient than the method of using the included angle in the normal direction as the judging index.
The method comprises the following specific steps:
1) Data normalization. The average of x, y, z is calculated separately, and then the corresponding average is subtracted for all points in the neighborhood.
2) The normalized covariance matrix is found.
Figure BDA0001921935830000091
3) And solving eigenvalues and eigenvectors of the covariance matrix, and sequencing the eigenvalues from small to large.
4) And setting a threshold value, and considering that the minimum characteristic value is larger than the threshold value as a characteristic point.
2.3 setting Cross threshold extraction feature points
The bending degree of the transition surface of the miniature complex curved surface part is different, and the characteristic points cannot be accurately and completely extracted by using a single extraction criterion. The curvature and normal angle reflect the membership degree of the neighborhood to the curved surface, and the larger the curvature and normal angle is, the larger the bending degree is; the covariance matrix eigenvalue reflects the membership of the neighborhood to the plane, and the smaller the third principal component, the smaller the error of the plane fitting. The feature points extracted by the two judging criteria are the same in most cases, but the feature points can be mutually complemented and simplified for special positions, so that the feature points are extracted by setting a cross threshold value on the curvature and covariance matrix feature values, and the cross threshold value setting method is shown in fig. 4.
2.4 feature Point extraction function
On the basis of a feature point extraction algorithm, the method comprises the following steps of writing the following functional functions in a Matlab platform to realize scattered point cloud feature point extraction:
(1)curvature;
the function processes the nearest neighbor cell array cell neighbourhood, determines the best curved surface fitted by the sampling point and the nearest neighbor thereof, calculates a first basic quantity and a second basic quantity of the curved surface to estimate the average curvature of the sampling point, and puts the result into a curvature matrix curvature;
(2)characteristic value;
the function processes the nearest neighbor cell array cell neighbourhood, calculates the eigenvalues and eigenvectors of the covariance matrix formed by the sampling points and the nearest neighbors thereof, and puts the minimum eigenvalues into the eigenvalue matrix matrix characteristic value;
(3)cross threshold;
the function processes a curvature matrix curve and a feature value matrix matrix characteristic value, respectively compares the curvature and the feature value of the sampling points with a cross threshold value, extracts feature points, and places the feature points into a feature point matrix matrix characteristic points;
3. point cloud data partitioning
3.1 feature line construction Algorithm
And taking the external boundary points of the extracted feature points as points for constructing feature lines according to the cross-section geometric relationship of the model. And (3) the construction of the characteristic line is required to identify boundary points, separate points on the inner boundary line and the outer boundary line, calculate model value points on the boundary line, fit a B spline curve and the like.
(1) Identifying boundary points
Only one side of the boundary point is provided with a point cloud, and the periphery of the internal point is provided with a point cloud, so that the point with a distance larger than the average distance can be regarded as the boundary point by calculating the sum of the distances from a certain point to K points around.
(2) Separating points on the inner and outer boundary lines
Finding out the starting point of the outer boundary line through the geometric relationship, taking two points closest to the point as a second point and three points, fitting a straight line by the three points, judging the point closest to the straight line in 2 to 3 points closest to a third point, taking the point as the next point, and sequentially extracting the points belonging to the same curve.
(3) Calculating a model value point on a boundary line
The points on the boundary line are relatively dense, the method is not suitable for directly interpolating the B spline curve, and the main information in the boundary point can be extracted by using a DP algorithm. Sequencing the boundary points obtained in the step (2), constructing a straight line by using the first and last points, calculating the maximum distance from other points to the straight line, and if the distance is greater than a threshold value, taking the point as a model value point, changing the straight line from one to two, and sequentially extracting all the model value points.
(4) B spline curve interpolation
After the model value points are obtained, the node vectors are calculated by utilizing the principle of accumulated chord length, and the control points are reversely calculated. And then calculating a curve equation from the control points and the B-spline basis function. And taking the equidistant interval variable, and dispersing the curve into dense curve points.
3.2 partitioning the internal Point cloud of the curved surface
And (3) determining a curved surface inner point according to the boundary conditions and the geometric relations, judging the minimum distance from 3 to 5 closest points of the point to the curve points obtained in all (4), and regarding the point with the minimum distance larger than the threshold value as the curved surface inner point, and sequentially judging.
3.3 on the basis of a point cloud data partitioning algorithm, the invention realizes the complete partitioning of the point cloud data by writing the following functional functions in Matlab:
(1)outline;
the function processes a characteristic point matrix matrix characteristic points, calculates the sum of distances from each point to the nearest K points, considers the points with the distances larger than the average distance as boundary points, adopts a least square method to fit a space straight line to sequentially find the characteristic points to be fitted belonging to the outer boundary, and stores the result in a characteristic point matrix to be fitted;
(2)DP;
the function processes matrix of characteristic points to be fitted, sequences characteristic points according to the trend of the curve, calculates the furthest point of other points from a straight line formed by the first point and the last point, takes the furthest point as a segmentation point, iteratively calculates the model value point of the curve to be fitted, and puts the result into a model value point matrix matrix data points;
(3)control point;
the function processing type value point matrix matrix data points calculates the node vector of the non-uniform B spline according to the accumulated chord length principle, and reversely solves the control points, and the result is put into the control point matrix matrix control point;
(4)cmplot;
the function is used for calculating an equation of a B spline curve according to the control points and a basis function, a node vector is calculated by a subprogram jdsl, the basis function is calculated by a subprogram wavelet, and coefficients of a piecewise equation are stored in a coefficient matrix matrix coefficient;
(5)concentrated;
the function is used for processing a coefficient matrix matrix coefficient, interpolating M points of each piecewise function, wherein the distance between the points is larger than the average density rho of the point cloud, and putting all boundary interpolation points into a boundary point matrix boundary;
(6)region growing;
the function is used for calculating point cloud data in the curved surface according to the boundary point matrix, determining a curved surface internal point according to boundary conditions and geometric relations, judging the minimum distance from 3 to 5 nearest points of the point to all boundary points, regarding the point with the minimum distance being larger than a threshold value as the curved surface internal point, and putting the result into the curved surface internal point matrix.
4. CAD model reconstruction
And (3) importing the curved surface points and the characteristic lines obtained in the steps into Imageware (reverse engineering software), reconstructing the curved surface by utilizing the steps of constructing the curved surface, fitting the curved surface according to the point cloud and the curve, and projecting the reconstructed curved surface in a CATIA (computer aided design/computer aided manufacturing) system to obtain a solid model.
5. Miniature complex part modeling example based on feature recognition
The correctness and effectiveness of the proposed method are now verified by modeling a certain portion of a miniature complex curved surface part (belt head pattern, as shown in fig. 5).
The point cloud data of the belt head is obtained through laser scanning, and the point cloud data is subjected to simplified denoising, cavity filling and bottom surface deleting to obtain the point cloud shown in fig. 6, wherein the total point cloud data is 27000 data points. After extracting the feature points, 6200 feature points are obtained as shown in fig. 7. Selecting a feature point around a curved surface is shown in fig. 8, and it can be seen that part of the feature points have larger curvature and are not suitable for fitting by a spline curve, so that the feature points are divided into four sections according to u and v directions of curved surface reconstruction, and B spline curves are respectively fitted, as shown in fig. 9. Fig. 10 shows the point cloud data of the same curved surface after division, fig. 11 shows the curved surface reconstructed from the point cloud and the feature line, and fig. 12 shows the entity obtained by projection on the curved surface.
The above embodiments are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereto, and any modification made on the basis of the technical scheme according to the technical idea of the present invention falls within the protection scope of the present invention.

Claims (3)

1. The miniature complex part modeling method based on feature recognition is characterized by comprising the following steps of:
step 1, acquiring point cloud data of a part, dividing the point cloud data into a plurality of grids by utilizing a space block strategy, taking single point cloud data as sampling points, and searching k nearest neighbors of each sampling point as neighborhoods of the sampling points; when the grid where the sampling point is located searches for less than k nearest neighbors, taking the sampling point as the center of a circle, and taking the maximum distance d from the sampling point to six faces of the grid where the sampling point is located v Calculating an expansion grid for the radius building dynamic sphere, and searching k nearest neighbors in the expansion grid again; the specific process is as follows:
1) Scanning and acquiring point cloud data of a part, and setting extremum values along x, y and z directions of a coordinate axis as x respectively min 、x max ,y min 、y max ,z min 、z max The method comprises the steps of carrying out a first treatment on the surface of the Will be represented by points (x max ,y max ,z max ) Sum point (x) min ,y min ,z min ) Spatial bounding box for point cloud data, which is a spatial hexahedron with diagonal points and parallel to coordinate planesDividing the space bounding box into space regular hexahedral grids with equal spacing L along the coordinate axis direction;
2) Establishing a corresponding relation between each grid and point cloud data in the grids to obtain a grid-point cloud relation;
3) Calculating the distances from the sampling point to the six faces of the grid, searching k nearest neighbors on the grid of the sampling point, wherein the distance from the nearest neighbors to the sampling point is smaller than the minimum distance from the sampling point to the six faces of the grid, repeating 3) on the next sampling point if the distance from the nearest neighbors to the sampling point is searched, otherwise, turning to 4);
4) Taking the sampling point as the center of a circle, and taking the maximum distance d from the sampling point to six faces of the grid v Establishing a dynamic sphere calculation expansion grid for the radius, finding point cloud data in the expansion grid according to the grid-point cloud relation established in 2), and enabling the distance from the sampling point to be smaller than d v The point cloud of (2) is reserved, and k points closest to the point cloud are taken from the point cloud;
step 2, calculating the average curvature absolute value of the sampling point according to the sampling point and the corresponding neighborhood thereof; carrying out principal component analysis on the sampling points and the neighborhood corresponding to the sampling points to obtain characteristic values corresponding to third principal components of the sampling points; setting a first threshold value Q for the absolute value of the average curvature max Second threshold value Q min Wherein Q is max >Q min Setting a third threshold F for the characteristic value max Fourth threshold F min Wherein F max >F min The method comprises the steps of carrying out a first treatment on the surface of the Absolute value of average curvature is larger than Q max And the characteristic value is greater than F min Is greater than F max And an average curvature absolute value greater than Q min The sampling points of the (a) are taken as characteristic points for extraction;
the specific process is as follows:
1) Randomly selecting 20 sampling points and corresponding neighborhoods thereof, and fitting by using a rapid fitting tool to obtain m curved surface fitting models; when the average curvature absolute value of a certain sampling point is solved, fitting the neighborhood of the sampling point with the m curve fitting models respectively, solving a curve coefficient, calculating the fitting effect of the m curve fitting models respectively, taking the best fitting curve with the smallest deviation, solving the average curvature of the best fitting curve, and taking the absolute value;
2) Carrying out principal component analysis on the sampling points and the neighborhood thereof to obtain characteristic values corresponding to third principal components of the sampling points;
3) Setting a first threshold value Q for the absolute value of the average curvature max Second threshold value Q min Wherein Q is max >Q min Setting a third threshold F for the characteristic value max Fourth threshold F min Wherein F max >F min The method comprises the steps of carrying out a first treatment on the surface of the Absolute value of average curvature is larger than Q max And the characteristic value is greater than F min Is greater than F max And an average curvature absolute value greater than Q min The sampling points of the (a) are taken as characteristic points for extraction;
step 3, constructing characteristic lines for the extracted characteristic points corresponding to each curved surface on the miniature complex part, and dividing the point cloud data in the curved surface;
and 4, reconstructing the curved surface by adopting a reverse engineering method for the characteristic line and the point cloud data in the curved surface obtained in the step 3, and projecting the reconstructed curved surface in an interactive computer aided design and computer aided manufacturing system to obtain a solid model.
2. The modeling method of the miniature complex part based on the feature recognition according to claim 1, wherein the specific process of the step 3 is as follows:
1) Calculating the sum of the distances from each feature point to K surrounding feature points, averaging the distances, and taking the point with the distance larger than the average distance as a boundary point for the feature points correspondingly extracted from any curved surface; according to the cross-section geometric relationship of the model, taking the boundary points of the extracted feature points as points for constructing feature lines;
2) Finding out a starting point of a characteristic line through a geometric relation, taking a point closest to the starting point as a second point, taking a point next closest to the starting point as a third point, fitting a straight line by the three points, judging a point closest to the straight line in 2 to 3 points closest to the third point, taking the point closest to the straight line as a next point, and sequentially extracting the points on the characteristic line;
3) Extracting a model value point on the characteristic line by adopting a DP algorithm;
4) Interpolating the model value points on the characteristic line by adopting a B spline curve interpolation method to obtain the characteristic line of the curved surface, and dispersing the characteristic line into curve points;
5) Determining points in a curved surface according to boundary conditions and geometric relations, judging whether the minimum distance from 3 to 5 points nearest to the point to all the curve points obtained in 4) is greater than a certain threshold value, taking the points greater than the threshold value as the points in the curved surface, and repeating the process until no new points are selected as the points in the curved surface.
3. The modeling method of the miniature complex part based on the feature recognition according to claim 2, wherein the specific process of extracting the model value points on the feature line by adopting the DP algorithm is as follows:
and sequencing the boundary points, constructing a straight line by the first point and the last point, calculating the maximum distance from other boundary points except the first point and the last point in the boundary points to the straight line, taking the boundary point corresponding to the maximum distance as a model value point if the maximum distance is larger than a set threshold, adding the model value point into the first point and the last point, arranging the model value point, constructing the straight line of two adjacent points, performing the same operation, and obtaining all the model value points through multiple iterations.
CN201811598808.9A 2018-12-26 2018-12-26 Miniature complex part modeling method based on feature recognition Active CN109740227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811598808.9A CN109740227B (en) 2018-12-26 2018-12-26 Miniature complex part modeling method based on feature recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811598808.9A CN109740227B (en) 2018-12-26 2018-12-26 Miniature complex part modeling method based on feature recognition

Publications (2)

Publication Number Publication Date
CN109740227A CN109740227A (en) 2019-05-10
CN109740227B true CN109740227B (en) 2023-07-11

Family

ID=66359948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811598808.9A Active CN109740227B (en) 2018-12-26 2018-12-26 Miniature complex part modeling method based on feature recognition

Country Status (1)

Country Link
CN (1) CN109740227B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110340738B (en) * 2019-06-21 2020-05-22 武汉理工大学 PCA-based accurate calibration method for robot wire-drawing high-speed rail body-in-white workpiece
CN110349252B (en) * 2019-06-30 2020-12-08 华中科技大学 Method for constructing actual machining curve of small-curvature part based on point cloud boundary
CN110488752B (en) * 2019-08-23 2020-08-18 武汉数字化设计与制造创新中心有限公司 Automatic surface processing autonomous slicing method for large-scale complex curved surface robot
CN111583309B (en) * 2020-04-14 2023-02-28 西北工业大学 Method for realizing Z-pin implantation on complex curved surface
CN112102178A (en) * 2020-07-29 2020-12-18 深圳市菲森科技有限公司 Point cloud feature-preserving denoising method and device, electronic equipment and storage medium
CN112784450B (en) * 2020-10-27 2022-07-15 成都飞机工业(集团)有限责任公司 Method for extracting outer edge line of maximum part of die based on finite element theory
CN113111548B (en) * 2021-03-27 2023-07-21 西北工业大学 Product three-dimensional feature point extraction method based on peripheral angle difference value
CN113689329B (en) * 2021-07-02 2023-06-02 上海工程技术大学 Shortest path interpolation method for sparse point cloud enhancement
CN113744389B (en) * 2021-08-24 2023-10-10 武汉理工大学 Point cloud simplifying method for complex part curved surface feature preservation
CN114119628B (en) * 2021-10-25 2022-10-11 南京航空航天大学 Point cloud accurate segmentation method based on feature template
CN114355841B (en) * 2022-01-07 2024-01-16 宁波大学 Complex curved surface regional measuring point planning method
CN116738621B (en) * 2023-08-09 2023-11-17 武汉华锋惠众科技有限公司 Method, system, electronic equipment and storage medium for constructing derivative curved surface

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701466A (en) * 2012-09-28 2014-04-02 上海市政工程设计研究总院(集团)有限公司 Scattered point cloud compression algorithm based on feature reservation
CN104616349A (en) * 2015-01-30 2015-05-13 天津大学 Local curved surface change factor based scattered point cloud data compaction processing method
CN105354880A (en) * 2015-10-15 2016-02-24 东南大学 Line laser scanning-based sand blasting robot automatic path generation method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701466A (en) * 2012-09-28 2014-04-02 上海市政工程设计研究总院(集团)有限公司 Scattered point cloud compression algorithm based on feature reservation
CN104616349A (en) * 2015-01-30 2015-05-13 天津大学 Local curved surface change factor based scattered point cloud data compaction processing method
CN105354880A (en) * 2015-10-15 2016-02-24 东南大学 Line laser scanning-based sand blasting robot automatic path generation method

Also Published As

Publication number Publication date
CN109740227A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN109740227B (en) Miniature complex part modeling method based on feature recognition
CN107123164B (en) Three-dimensional reconstruction method and system for keeping sharp features
CN108830931B (en) Laser point cloud simplification method based on dynamic grid k neighborhood search
US7995055B1 (en) Classifying objects in a scene
Ke et al. Feature-based reverse modeling strategies
CN100559398C (en) Automatic deepness image registration method
CN110136072B (en) Point cloud noise removing method, denoising system, computer device and storage medium
CN111986115A (en) Accurate elimination method for laser point cloud noise and redundant data
CN110599506B (en) Point cloud segmentation method for three-dimensional measurement of complex special-shaped curved surface robot
CN112233249B (en) B spline surface fitting method and device based on dense point cloud
JP4568843B2 (en) Analytical curved surface segmentation device, method, program, and recording medium
CN110176071B (en) Three-dimensional point cloud reconstruction method based on feature template
CN111581776B (en) Iso-geometric analysis method based on geometric reconstruction model
CN110807781A (en) Point cloud simplification method capable of retaining details and boundary features
Min A new approach of composite surface reconstruction based on reverse engineering
CN113963138A (en) Complete and accurate extraction method of three-dimensional laser point cloud characteristic point line
CN112634457A (en) Point cloud simplification method based on local entropy of Hausdorff distance and average projection distance
CN117132630A (en) Point cloud registration method based on second-order spatial compatibility measurement
CN113343328B (en) Efficient closest point projection method based on improved Newton iteration
CN114677388A (en) Room layout dividing method based on unit decomposition and space division
Nieser et al. Patch layout from feature graphs
CN107356968B (en) Three-dimensional level set fault curved surface automatic extraction method based on crop
Ji et al. Point cloud segmentation for complex microsurfaces based on feature line fitting
Andre Sorensen et al. A RANSAC based CAD mesh reconstruction method using point clustering for mesh connectivity
Lee et al. Optimizing B-spline surface reconstruction for sharp feature preservation

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