Rapid paperless quality inspection method and system
Through the three-dimensional model, the quality inspection plan is automatically generated and the three-coordinate measuring machine is used for automated measurement, which solves the problems of low efficiency of traditional quality inspection methods and difficult data management, and achieves rapid and accurate paperless quality inspection and electronic report generation.
Patent Information
- Application Number
- CN202410889763.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Traditional quality inspection methods rely on manual operations and paper documents, and have problems such as low efficiency, high error rate and difficulty in data management, especially in the writing of measurement programs, measurement path design and data analysis management.
By obtaining the three-dimensional model of the workpiece to be inspected, combining preset quality inspection rules, the measurement path, measurement point position and measurement tolerance are automatically generated, and the three-coordinate measuring machine is used for automatic measurement, and the data processing unit compares to generate electronic quality inspection. Report.
It realizes fast paperless quality inspection, reduces manual writing and measurement errors, improves inspection efficiency and accuracy, and generates electronic reports with quality traceability functions.
Smart Images

Figure CN118424179B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to quality inspection technology, and in particular to a rapid paperless quality inspection method and system. Background Art
[0002] With the rapid development of modern manufacturing, product quality inspection has become a key link in ensuring product quality and improving corporate competitiveness. Traditional quality inspection methods mainly rely on manual operations and paper document records, which have problems such as low efficiency, high error rate, and difficult data management. In order to meet the development needs of modern manufacturing, a fast, efficient, and paperless quality inspection method is urgently needed.
[0003] At present, three-dimensional coordinate measuring machines have been widely used in the industrial field, which can realize high-precision, automated dimensional measurement and shape and position detection. However, in practical applications, there are still many problems in the writing of measurement programs, the optimization of measurement strategies, and the analysis and management of measurement data. For example, manual writing of measurement programs is time-consuming and labor-intensive, and it is difficult to achieve rapid detection; unreasonable design of measurement paths will lead to low measurement efficiency and increased measurement errors; manual recording and organization of measurement data are prone to errors, and electronic management and traceability of data also face challenges. Summary of the invention
[0004] The embodiments of the present invention provide a rapid paperless quality inspection method and system, which can solve the problems in the prior art.
[0005] According to a first aspect of the embodiments of the present invention,
[0006] Provides a fast and paperless quality inspection method, including:
[0007] Acquire a three-dimensional model of the workpiece to be inspected, and automatically generate a quality inspection plan for inspecting the workpiece to be inspected based on the geometric features of the three-dimensional model and in combination with preset quality inspection rules, wherein the quality inspection plan includes a measurement path, measurement point positions, measurement items, and measurement tolerances;
[0008] The quality inspection scheme is sent to a three-dimensional coordinate measuring machine, and the three-dimensional coordinate measuring machine is controlled to measure the inspected workpiece according to the measurement path and the measurement point position to obtain the measurement data of the inspected workpiece, wherein the measurement data includes the coordinate information of the measurement point and the corresponding measurement value; the measurement data is transmitted to a data processing unit, and the measurement data is compared with the design size of the three-dimensional model through the data processing unit, and according to the preset tolerance requirements, it is determined whether the measurement value of each measurement point is within the tolerance range to obtain the quality inspection result of the inspected workpiece;
[0009] If the quality inspection result is unqualified, a quality problem report is generated by the data processing unit, and the quality problem report includes the location of the unqualified measurement point, the measurement value and the degree of deviation from the tolerance; the quality inspection result is stored in the form of an electronic document, and the quality inspection result and the quality problem report are sent to the human-computer interaction interface for output and display, thereby generating an electronic quality inspection report with quality traceability function.
[0010] In an optional embodiment,
[0011] Obtain a three-dimensional model of the workpiece to be inspected, and automatically generate a quality inspection plan for inspecting the workpiece to be inspected based on the geometric features of the three-dimensional model and the preset quality inspection rules. The quality inspection plan includes a measurement path, measurement point positions, measurement items, and measurement tolerances, including:
[0012] Obtaining a three-dimensional model of the inspected workpiece, including scanning the inspected workpiece with a three-dimensional scanner to obtain the workpiece's point cloud data; performing denoising, filtering, and point cloud density adjustment on the point cloud data; converting the point cloud data into a triangular face mesh model through a point cloud data reconstruction algorithm; performing hole filling, mesh simplification, and mesh optimization on the triangular face mesh model to obtain a high-quality three-dimensional model of the inspected workpiece;
[0013] Extracting features from the three-dimensional model of the workpiece under inspection, including segmenting the three-dimensional model of the workpiece under inspection into a plurality of geometric feature regions of a plane, a cylindrical surface, and a spherical surface through a surface segmentation algorithm; calculating feature parameters of each geometric feature region to obtain a normal vector of the plane, an axis direction and a radius of the cylindrical surface, and a center coordinate and a radius of the spherical surface;
[0014] Constructing a point feature histogram or a fast point feature histogram to characterize the geometric features of a 3D model;
[0015] A quality inspection plan is automatically generated according to the geometric features of the inspected workpiece and preset quality inspection rules.
[0016] In an optional embodiment,
[0017] The three-dimensional model of the inspected workpiece is segmented into multiple geometric feature areas of a plane, a cylindrical surface and a spherical surface by a surface segmentation algorithm, wherein the surface segmentation algorithm includes:
[0018] Calculate the Gaussian curvature of each vertex on the three-dimensional model of the inspected workpiece, divide the vertices into plane points, cylindrical points and spherical points according to the Gaussian curvature value, and merge adjacent vertices of the same type into a geometric feature region through the region growing algorithm;
[0019] Calculate the principal curvature direction of each vertex on the three-dimensional model of the inspected workpiece, divide the vertices into plane points, cylindrical points and spherical points according to the distribution characteristics of the principal curvature direction, and merge adjacent vertices of the same type into a geometric feature region through the region growing algorithm;
[0020] The characteristic parameters of each geometric feature area obtained by segmentation are calculated, including:
[0021] For the plane feature area, the normal vector of the plane is calculated by principal component analysis;
[0022] For the cylindrical feature area, the axis direction and radius of the cylindrical surface are calculated by a fitting algorithm, wherein the fitting algorithm includes constructing a least squares optimization problem, solving the axis equation parameters and the cylindrical surface radius, so that the sum of the distances from the vertices on the cylindrical surface to the axis is minimized;
[0023] For the spherical feature area, the coordinates of the center of the sphere and the radius are calculated by a least squares fitting algorithm. The least squares fitting algorithm includes constructing a least squares optimization problem to solve the coordinates of the center of the sphere and the radius so that the sum of the squares of the difference between the distance from the vertex on the sphere to the center of the sphere and the radius is minimized.
[0024] In an optional embodiment,
[0025] The method further comprises:
[0026] A geometric feature descriptor is constructed to characterize the local geometric features of the three-dimensional model of the inspected workpiece. The geometric feature descriptor includes a point feature histogram, which is obtained by calculating the four-tuple features between each point on the three-dimensional model of the inspected workpiece and the point pairs in its neighborhood, and counting the four-tuple features in the histogram.
[0027] In an optional embodiment,
[0028] Controlling the three-dimensional coordinate measuring machine to measure the workpiece according to the measurement path and measurement point position includes:
[0029] Encoding the measurement path as a solution to the optimization problem, wherein the encoding method includes integer encoding and real number encoding, wherein the integer encoding represents the access sequence of the measurement points as an integer sequence, and the real number encoding uses the coordinates of each measurement point as an optimization variable;
[0030] According to the goal of measuring path optimization, constructing an objective function of the optimization problem, wherein the objective function includes minimizing the measuring path length and minimizing the measuring error;
[0031] According to the goal of measuring path optimization, corresponding constraints are set, wherein the constraints include measuring point access order constraint, measuring point spacing constraint and measuring path smoothness constraint. The measuring point access order constraint ensures that each measuring point is visited only once, the measuring point spacing constraint ensures that the distance between adjacent measuring points is greater than the safety distance of the measuring head, and the measuring path smoothness constraint ensures that there is no sharp turn in the measuring path.
[0032] The objective function and constraint conditions of the optimization problem are solved by a multi-objective optimization algorithm, and the optimized measurement path is applied to the quality inspection plan to guide the three-dimensional coordinate measuring machine to automatically measure the inspected workpiece according to the optimal path, wherein the multi-objective optimization algorithm includes a genetic algorithm.
[0033] In an optional embodiment,
[0034] The first objective function to minimize the measurement path length includes:
[0035] ;
[0036] in, n、m Indicates the number of measurement points. The two values are different. ( x i ,y i ,z i ) indicates the measuring point i The spatial coordinates of , λ represents the smoothness weight coefficient, δ ij Indicator variable representing the smoothness constraint of the measurement path. i and j The value is 1 when an acute angle is formed between them, otherwise it is 0. d ij Indicates the measuring point i and j Distance between
[0037] The second objective function to minimize the measurement error includes:
[0038] ;
[0039] in, w i Indicates i The weight value of each measurement point, k i Indicates i The number of repeated measurements for each measurement point, ( x ib , y ib,z ib ) indicates the i The measurement point is b The spatial coordinates of the measurement, Indicates i The target space coordinates of the measurement points, μ represents the measurement uncertainty weight coefficient, θ ij Indicates the measuring point i and j The correlation coefficient of measurement uncertainty between e ij Indicates the measuring point i and j The measurement uncertainty between.
[0040] In the second aspect of the embodiments of the present application,
[0041] Provide a fast and paperless quality inspection system, including:
[0042] The first unit is used to obtain a three-dimensional model of the inspected workpiece, and automatically generate a quality inspection plan for inspecting the inspected workpiece according to the geometric features of the three-dimensional model and in combination with preset quality inspection rules, wherein the quality inspection plan includes a measurement path, a measurement point position, a measurement item, and a measurement tolerance;
[0043] The second unit is used to send the quality inspection plan to the three-dimensional coordinate measuring machine, control the three-dimensional coordinate measuring machine to measure the inspected workpiece according to the measurement path and the measurement point position, and obtain the measurement data of the inspected workpiece, wherein the measurement data includes the coordinate information of the measurement point and the corresponding measurement value; transmit the measurement data to the data processing unit, compare the measurement data with the design size of the three-dimensional model through the data processing unit, and judge whether the measurement value of each measurement point is within the tolerance range according to the preset tolerance requirement, so as to obtain the quality inspection result of the inspected workpiece;
[0044] The third unit is used to generate a quality problem report through the data processing unit if the quality inspection result is unqualified, and the quality problem report includes the location, measurement value and degree of deviation from tolerance of the unqualified measurement point; store the quality inspection result in the form of an electronic document, and send the quality inspection result and the quality problem report to the human-computer interaction interface for output and display, so as to generate an electronic quality inspection report with quality traceability function.
[0045] According to a third aspect of the embodiments of the present invention,
[0046] An electronic device is provided, comprising:
[0047] processor;
[0048] a memory for storing processor-executable instructions;
[0049] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0050] According to a fourth aspect of the embodiments of the present invention,
[0051] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0052] By acquiring the three-dimensional model of the inspected workpiece and combining it with preset quality inspection rules, a quality inspection plan including measurement path, measurement point location, measurement items and measurement tolerance is automatically generated, avoiding the tedious steps of manually writing measurement programs and shortening the inspection preparation time.
[0053] The measurement data is transmitted to the data processing unit, which compares it with the design dimensions of the 3D model and determines in real time whether the measurement value of each measurement point is within the tolerance range according to the preset tolerance requirements, so as to quickly obtain the quality inspection results of the inspected workpiece. The real-time data analysis and quality judgment functions avoid the manual calculation and judgment links in the traditional inspection method and shorten the inspection cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of a process flow of a rapid paperless quality inspection method according to an embodiment of the present invention;
[0055] Figure 2 It is a schematic diagram of the structure of a rapid paperless quality inspection system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0058] Figure 1 FIG. 1 is a flow chart of a rapid paperless quality inspection method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0059] S101. Obtain a three-dimensional model of the inspected workpiece, and automatically generate a quality inspection plan for inspecting the inspected workpiece according to the geometric features of the three-dimensional model and the preset quality inspection rules, wherein the quality inspection plan includes a measurement path, a measurement point position, a measurement item, and a measurement tolerance;
[0060] In an optional embodiment,
[0061] Obtain a three-dimensional model of the workpiece to be inspected, and automatically generate a quality inspection plan for inspecting the workpiece to be inspected based on the geometric features of the three-dimensional model and the preset quality inspection rules. The quality inspection plan includes a measurement path, measurement point positions, measurement items, and measurement tolerances, including:
[0062] Obtaining a three-dimensional model of the inspected workpiece, including scanning the inspected workpiece with a three-dimensional scanner to obtain the workpiece's point cloud data; performing denoising, filtering, and point cloud density adjustment on the point cloud data; converting the point cloud data into a triangular face mesh model through a point cloud data reconstruction algorithm; performing hole filling, mesh simplification, and mesh optimization on the triangular face mesh model to obtain a high-quality three-dimensional model of the inspected workpiece;
[0063] Extracting features from the three-dimensional model of the workpiece under inspection, including segmenting the three-dimensional model of the workpiece under inspection into a plurality of geometric feature regions of a plane, a cylindrical surface, and a spherical surface through a surface segmentation algorithm; calculating feature parameters of each geometric feature region to obtain a normal vector of the plane, an axis direction and a radius of the cylindrical surface, and a center coordinate and a radius of the spherical surface;
[0064] Constructing a point feature histogram or a fast point feature histogram to characterize the geometric features of a 3D model;
[0065] A quality inspection plan is automatically generated according to the geometric features of the inspected workpiece and preset quality inspection rules.
[0066] For example,
[0067] Obtain the 3D model of the inspected workpiece; first, use a 3D scanner to scan the inspected workpiece to obtain the point cloud data of the workpiece. Preprocess the point cloud data, including denoising, filtering, and point cloud density adjustment, to improve the quality of the point cloud data. Then, through point cloud data reconstruction algorithms, such as Poisson reconstruction and saddle surface reconstruction, the point cloud data is converted into a triangular patch mesh model. Post-process the triangular patch mesh model, including hole filling, mesh simplification, and mesh optimization, to obtain a high-quality 3D model of the inspected workpiece.
[0068] Extract the geometric features of the 3D model; perform feature extraction on the obtained 3D model of the inspected workpiece. First, the 3D model is segmented into different geometric feature regions, such as planes, cylinders, spheres, etc., through surface segmentation algorithms, such as segmentation based on Gaussian curvature and segmentation based on the direction of the principal curvature. Then, the feature parameters of each geometric feature region are calculated, such as the normal vector of the plane, the axis direction and radius of the cylinder, the center coordinates and radius of the sphere, etc. Finally, geometric feature descriptors are constructed, such as point feature histograms (PFHs) and fast point feature histograms (FPFHs), which are used to characterize the geometric features of the 3D model.
[0069] Generate a quality inspection plan based on the preset quality inspection rules; automatically generate a quality inspection plan based on the geometric features of the inspected workpiece and the preset quality inspection rules. Quality inspection rules include measurement items, measurement point location selection principles, measurement path planning principles, and measurement tolerance setting principles.
[0070] Determination of measurement items: According to the geometric features of the workpiece to be inspected, such as plane, cylinder, sphere, etc., determine the items that need to be measured, such as flatness, cylindricity, sphericity, etc.
[0071] Selection of measuring point positions: For different measurement items, according to the preset measurement point position selection principles, such as uniform distribution principle, feature sensitive area encryption principle, etc., select the appropriate measurement point position on the 3D model of the inspected workpiece.
[0072] Measurement path planning: Based on the location distribution of the measurement points, combined with preset measurement path planning principles, such as the shortest path principle and the interference avoidance principle, intelligent optimization algorithms such as genetic algorithms and particle swarm optimization algorithms are used to generate the optimal measurement path.
[0073] Measurement tolerance setting: According to the functional requirements and processing technology level of the inspected workpiece, select the appropriate measurement tolerance from the preset measurement tolerance library, and set the corresponding tolerance requirements for each measurement item.
[0074] Finally, a complete quality inspection plan is generated, including information such as measurement path, measurement point location, measurement items and measurement tolerance, which is used to guide the three-dimensional coordinate measuring machine to perform automated measurement of the inspected workpiece.
[0075] This application uses a surface segmentation algorithm to extract features from the three-dimensional model of the inspected workpiece, automatically identifies typical geometric features such as planes, cylinders and spheres, and calculates the corresponding feature parameters, realizing intelligent analysis and feature description of the three-dimensional model, and reducing the workload of manual processing. Constructing a point feature histogram or a fast point feature histogram to characterize the geometric features of the three-dimensional model provides a compact and efficient feature representation method that facilitates subsequent feature matching and similarity measurement. According to the geometric features of the inspected workpiece and the preset quality inspection rules, a complete quality inspection plan including the measurement path, measurement point location, measurement items and measurement tolerances is automatically generated, realizing the automation and intelligence of the quality inspection process, reducing the time and error rate of manually generating inspection plans, and improving inspection efficiency and accuracy.
[0076] In an optional embodiment,
[0077] The three-dimensional model of the inspected workpiece is segmented into multiple geometric feature areas of a plane, a cylindrical surface and a spherical surface by a surface segmentation algorithm, wherein the surface segmentation algorithm includes:
[0078] Calculate the Gaussian curvature of each vertex on the three-dimensional model of the inspected workpiece, divide the vertices into plane points, cylindrical points and spherical points according to the Gaussian curvature value, and merge adjacent vertices of the same type into a geometric feature region through the region growing algorithm;
[0079] Calculate the principal curvature direction of each vertex on the three-dimensional model of the inspected workpiece, divide the vertices into plane points, cylindrical points and spherical points according to the distribution characteristics of the principal curvature direction, and merge adjacent vertices of the same type into a geometric feature region through the region growing algorithm;
[0080] The characteristic parameters of each geometric feature area obtained by segmentation are calculated, including:
[0081] For the plane feature area, the normal vector of the plane is calculated by principal component analysis;
[0082] For the cylindrical feature area, the axis direction and radius of the cylindrical surface are calculated by a fitting algorithm, wherein the fitting algorithm includes constructing a least squares optimization problem, solving the axis equation parameters and the cylindrical surface radius, so that the sum of the distances from the vertices on the cylindrical surface to the axis is minimized;
[0083] For the spherical feature area, the coordinates of the center of the sphere and the radius are calculated by a least squares fitting algorithm. The least squares fitting algorithm includes constructing a least squares optimization problem to solve the coordinates of the center of the sphere and the radius so that the sum of the squares of the difference between the distance from the vertex on the sphere to the center of the sphere and the radius is minimized.
[0084] In an optional embodiment,
[0085] The method further comprises:
[0086] A geometric feature descriptor is constructed to characterize the local geometric features of the three-dimensional model of the inspected workpiece. The geometric feature descriptor includes a point feature histogram, which is obtained by calculating the four-tuple features between each point on the three-dimensional model of the inspected workpiece and the point pairs in its neighborhood, and counting the four-tuple features in the histogram.
[0087] Exemplarily, a point feature histogram or a fast point feature histogram is constructed to characterize the geometric features of the three-dimensional model.
[0088] Point Feature Histogram (PFH) and Fast Point Feature Histogram (FPFH) are commonly used 3D feature descriptors that can effectively characterize the local geometric features of 3D models.
[0089] The process of constructing PFH is as follows: for each point on the 3D model, determine all the point pairs in its neighborhood, calculate the three angles between each pair of points (the angle between the normal vectors, the angle between the line from the first point to the second point and the normal vector, and the angle between the line from the second point to the first point and the normal vector) and the Euclidean distance between the two points, and use these four values as the features of the point pair. Perform feature calculations on all point pairs in the neighborhood to obtain the PFH feature vector of the point. Repeat the above process for all points on the 3D model to obtain the PFH feature description of the entire model.
[0090] The process of constructing FPFH is as follows: First, for each point on the 3D model, the simplified point feature histogram (SPFH) of all points in its neighborhood is calculated. SPFH only considers the three angle features between each point and the points in its neighborhood, and does not consider the distance features, so the calculation is more efficient. Then, the SPFH features of each point are weighted averaged to obtain the FPFH feature vector of the point, with the weight being the inverse of the distance between the neighborhood point and the current point. Repeat the above process for all points on the 3D model to obtain the FPFH feature description of the entire model.
[0091] Exemplarily, the quality inspection rules include the following:
[0092] For plane features, check whether their flatness meets the tolerance requirements and generate the measurement path and measurement point positions for flatness inspection.
[0093] For cylindrical surface features, check whether their roundness, cylindricity and coaxiality meet the tolerance requirements, and generate the measurement path and measurement point positions for roundness, cylindricity and coaxiality inspection.
[0094] For spherical features, check whether their sphericity meets the tolerance requirements and generate the measurement path and measurement point positions for sphericity inspection.
[0095] For the positional relationship between different features, such as parallelism, perpendicularity and distance, check whether they meet the tolerance requirements and generate the corresponding measurement path and measurement point position.
[0096] According to the local geometric features extracted by point feature histogram or fast point feature histogram, the quality of complex surfaces is inspected, and the measurement path and measurement point positions of the surface inspection are generated.
[0097] For example,
[0098] The surface segmentation algorithm is used to segment the 3D model of the inspected workpiece into multiple geometric feature areas such as planes, cylinders, and spheres. The surface segmentation algorithm includes the following two methods:
[0099] Method 1: Region growing segmentation based on Gaussian curvature;
[0100] Calculate the Gaussian curvature of each vertex on the three-dimensional model of the inspected workpiece. Gaussian curvature is a measure of the change in local curvature of a surface and can be obtained by calculating the product of the two principal curvatures at the vertex.
[0101] Vertices are divided into plane points, cylindrical points, and spherical points according to the Gaussian curvature value. The Gaussian curvature of plane points is close to 0, the Gaussian curvature of cylindrical points is close to 0, but one of the principal curvatures is 0, and the Gaussian curvature of spherical points is greater than 0. Vertices are classified by setting the Gaussian curvature threshold.
[0102] The adjacent vertices of the same type are merged into a geometric feature region through the region growing algorithm. Start with an unclassified vertex, mark it as the current region, and then traverse the vertices in its neighborhood. If the neighboring vertex is of the same type as the current vertex, merge it into the current region and recursively grow the neighboring vertices until the current region no longer expands. Repeat this process until all vertices are classified.
[0103] Method 2: Region growing segmentation based on the direction of the principal curvature;
[0104] Calculate the principal curvature direction of each vertex on the three-dimensional model of the inspected workpiece. The principal curvature direction is a unit vector representing the maximum and minimum curvature directions of the surface at the vertex, which can be obtained by calculating the first and second basic forms at the vertex.
[0105] According to the distribution characteristics of the principal curvature direction, vertices are divided into plane points, cylindrical points and spherical points. The two principal curvature directions of a plane point are perpendicular to each other, and one of the principal curvatures is 0; one of the two principal curvature directions of a cylindrical point is parallel to the cylinder axis, and the other is perpendicular to the cylinder axis; the two principal curvature directions of a spherical point are perpendicular to each other, and the two principal curvatures are equal. Vertices are classified by setting the angle threshold of the principal curvature direction.
[0106] Adjacent vertices of the same type are merged into a geometric feature region through the region growing algorithm. The specific process is similar to method one.
[0107] The feature parameters are calculated for each geometric feature area obtained by segmentation.
[0108] For planar feature regions:
[0109] The normal vector of the plane is calculated by principal component analysis (PCA). The coordinates of all vertices in the plane feature area form a matrix, and the matrix is subjected to principal component analysis to obtain three principal component vectors, among which the principal component vector with the smallest eigenvalue is the normal vector of the plane.
[0110] Based on the normal vector and the coordinates of any point on the plane, the plane equation is constructed to represent the characteristics of the plane.
[0111] For cylindrical feature regions:
[0112] The axis direction and radius of the cylinder are calculated by fitting algorithm. A least squares optimization problem is constructed to solve the axis equation parameters and the cylinder radius so that the sum of the distances from the vertices on the cylinder to the axis is minimized. Based on the axis equation and radius, the cylinder equation is constructed to represent the characteristics of the cylinder.
[0113] For spherical feature areas:
[0114] The coordinates of the center of the sphere and the radius are calculated by the least squares fitting algorithm. A least squares optimization problem is constructed to solve the coordinates of the center of the sphere and the radius so that the sum of the squares of the difference between the distance from the vertex to the center of the sphere and the radius is minimized. Based on the coordinates of the center of the sphere and the radius, a spherical equation is constructed to represent the characteristics of the sphere.
[0115] This application adopts a surface segmentation algorithm based on Gaussian curvature and the direction of principal curvature, which can accurately segment the three-dimensional model of the inspected workpiece into typical geometric feature areas such as planes, cylinders and spheres, realizes the automatic recognition and extraction of complex workpiece surfaces, and reduces the workload of manual processing. By calculating the Gaussian curvature value of each vertex, it is possible to effectively distinguish between plane points, cylindrical points and spherical points, providing a reliable classification basis for subsequent regional growth and feature parameter calculation, and improving the accuracy and efficiency of surface segmentation. Using the distribution characteristics of the principal curvature direction for vertex classification and regional growth can effectively deal with the influence of noise and local irregularities, improve the robustness and adaptability of surface segmentation, and is suitable for three-dimensional models of different types and qualities.
[0116] For the cylindrical feature area obtained by segmentation, the least squares fitting algorithm is used to calculate the axis direction and radius of the cylindrical surface. By constructing an optimization problem that minimizes the sum of the distances from the vertex to the axis, the influence of measurement errors and uneven distribution of discrete points can be effectively overcome, and the accuracy and reliability of cylindrical surface parameter calculation can be improved. For the spherical feature area obtained by segmentation, the least squares fitting algorithm is used to calculate the center coordinates and radius of the sphere. By constructing an optimization problem that minimizes the sum of the squares of the difference between the distance from the vertex to the center and the radius, the influence of measurement errors and uneven distribution of discrete points can be effectively overcome, and the accuracy and reliability of spherical surface parameter calculation can be improved. By calculating the parameters of different types of geometric feature areas, the key dimensions and form and position tolerance information of the inspected workpiece can be obtained, providing a quantitative basis for the subsequent generation of quality inspection plans and evaluation of measurement results.
[0117] S102. Send the quality inspection plan to a three-dimensional coordinate measuring machine, control the three-dimensional coordinate measuring machine to measure the inspected workpiece according to the measurement path and the measurement point position, and obtain the measurement data of the inspected workpiece, wherein the measurement data includes the coordinate information of the measurement point and the corresponding measurement value; transmit the measurement data to a data processing unit, compare the measurement data with the design dimensions of the three-dimensional model through the data processing unit, and determine whether the measurement value of each measurement point is within the tolerance range according to the preset tolerance requirements, so as to obtain the quality inspection result of the inspected workpiece;
[0118] In an optional embodiment,
[0119] Controlling the three-dimensional coordinate measuring machine to measure the workpiece according to the measurement path and measurement point position includes:
[0120] Encoding the measurement path as a solution to the optimization problem, wherein the encoding method includes integer encoding and real number encoding, wherein the integer encoding represents the access sequence of the measurement points as an integer sequence, and the real number encoding uses the coordinates of each measurement point as an optimization variable;
[0121] According to the goal of measuring path optimization, constructing an objective function of the optimization problem, wherein the objective function includes minimizing the measuring path length and minimizing the measuring error;
[0122] According to the goal of measuring path optimization, corresponding constraints are set, wherein the constraints include measuring point access order constraint, measuring point spacing constraint and measuring path smoothness constraint. The measuring point access order constraint ensures that each measuring point is visited only once, the measuring point spacing constraint ensures that the distance between adjacent measuring points is greater than the safety distance of the measuring head, and the measuring path smoothness constraint ensures that there is no sharp turn in the measuring path.
[0123] The objective function and constraint conditions of the optimization problem are solved by a multi-objective optimization algorithm, and the optimized measurement path is applied to the quality inspection plan to guide the three-dimensional coordinate measuring machine to automatically measure the inspected workpiece according to the optimal path, wherein the multi-objective optimization algorithm includes a genetic algorithm.
[0124] In an optional embodiment,
[0125] The first objective function to minimize the measurement path length includes:
[0126] ;
[0127] in, n、m Indicates the number of measurement points. The two values are different. ( x i ,y i ,z i ) indicates the measuring point i The spatial coordinates of , λ represents the smoothness weight coefficient, δ ij Indicator variable representing the smoothness constraint of the measurement path. i and j The value is 1 when an acute angle is formed between them, otherwise it is 0. d ij Indicates the measuring point i and j Distance between
[0128] The second objective function to minimize the measurement error includes:
[0129] ;
[0130] in, w i Indicates i The weight value of each measurement point, k i Indicates iThe number of repeated measurements for each measurement point, ( x ib , y ib ,z ib ) indicates the i The measurement point is b The spatial coordinates of the measurement, Indicates i The target space coordinates of the measurement points, μ represents the measurement uncertainty weight coefficient, θ ij Indicates the measuring point i and j The correlation coefficient of measurement uncertainty between e ij Indicates the measuring point i and j The measurement uncertainty between.
[0131] Exemplarily, the encoding methods of the measurement path include integer encoding and real number encoding.
[0132] Integer encoding: The order of accessing measurement points is represented as an integer sequence. For example, for 5 measurement points, a possible access order is {2, 4, 1, 5, 3}, which means accessing measurement points 2, 4, 1, 5, and 3 in sequence. The advantage of integer encoding is that it is intuitive and concise, and it is easy to implement crossover and mutation operations in optimization algorithms such as genetic algorithms.
[0133] Real number coding: The coordinates of each measurement point are used as optimization variables. For example, for 5 measurement points, the optimization variables are {(x1, y1, z1), (x2, y2, z2), ..., (x5, y5, z5)}, where (xi, yi, zi) represents the coordinates of the ith measurement point. The advantage of real number coding is that the coordinates of the measurement points can be directly optimized to obtain a more accurate measurement path.
[0134] The goals of measurement path optimization usually include minimizing the measurement path length and minimizing the measurement error.
[0135] Minimize the measurement path length: The objective function can be expressed as the sum of the distances between adjacent measurement points on the measurement path. Minimize the measurement error: The objective function can be expressed as the sum of the measurement errors at the measurement points.
[0136] The measurement path optimization needs to meet some constraints to ensure the feasibility and safety of the measurement path. The constraints include:
[0137] Measurement point access order constraint: Ensure that each measurement point is visited only once, without repeated or missed visits. This constraint can be implemented by using permutation type encoding in integer encoding.
[0138] Measuring point spacing constraint: Ensure that the distance between adjacent measuring points is greater than the safety distance of the measuring head to avoid collision between the measuring head and the workpiece.
[0139] Smooth measurement path constraint: Ensure that there are no sharp turns in the measurement path, avoid sudden acceleration or deceleration of the measuring head, and improve measurement efficiency and accuracy. This constraint can be achieved by limiting the angle between adjacent measurement points.
[0140] Since the measurement path optimization problem involves multiple objective functions and constraints, a multi-objective optimization algorithm is needed to solve it. Commonly used multi-objective optimization algorithms include genetic algorithm, particle swarm optimization algorithm, ant colony algorithm, etc.
[0141] Taking genetic algorithm as an example, its main steps are as follows:
[0142] Initialize the population. Randomly generate a certain number of measurement paths as the initial population, and each measurement path corresponds to an individual. Evaluate the fitness of the individual. According to the objective function and constraints, calculate the fitness value of each individual. For problems with constraints, the constraints can be added to the fitness function as penalty terms. Select operation. According to the fitness value of the individual, a certain number of individuals are selected as parents by roulette or tournament. Crossover operation. Perform crossover operation on the selected parent individuals to generate new offspring individuals. Common crossover operations include single-point crossover, multi-point crossover, uniform crossover, etc. Mutation operation. Perform mutation operation on offspring individuals with a certain probability to introduce new genetic information. Common mutation operations include bit flipping, exchange mutation, insertion mutation, etc. Update the population. Add offspring individuals to the population, and eliminate some individuals according to the fitness value to keep the population size unchanged. Termination condition judgment. If the preset evolutionary generation is reached or a satisfactory solution is found, the algorithm is terminated.
[0143] Through iterative optimization of genetic algorithms, a set of approximately optimal measurement paths is finally obtained. The optimized measurement paths are applied to the quality inspection plan to guide the three-dimensional coordinate measuring machine to automatically measure the inspected workpiece according to the optimal path, thereby improving the measurement efficiency and accuracy.
[0144] S103. If the quality inspection result is unqualified, a quality problem report is generated through the data processing unit, and the quality problem report includes the location, measurement value and degree of deviation from tolerance of the unqualified measurement point; the quality inspection result is stored in the form of an electronic document, and the quality inspection result and the quality problem report are sent to the human-computer interaction interface for output and display, so as to generate an electronic quality inspection report with quality traceability function.
[0145] Exemplarily, when the quality inspection result is unqualified, the data processing unit automatically generates a quality problem report, and the report content includes:
[0146] Location of unqualified measurement points: The coordinate data of the measurement points collected by the three-dimensional coordinate measuring machine are used to determine the specific location of the unqualified measurement points on the inspected workpiece, such as in a certain feature area or on a certain cross section.
[0147] Measurement values of unqualified measurement points: record the actual measurement values of unqualified measurement points, such as dimensional parameters such as length, diameter, angle, or geometric tolerance parameters.
[0148] The degree of deviation of the unqualified measurement point from the tolerance: Calculate the deviation between the measured value of the unqualified measurement point and the design tolerance, and express the degree of deviation in the form of absolute value or percentage, for example, exceeding the upper limit of the tolerance by 0.1mm or deviating from the center value of the tolerance by 5%.
[0149] The data processing unit automatically fills in the above content according to the preset quality problem report template to generate a complete quality problem report.
[0150] The quality inspection results are stored in the form of electronic documents.
[0151] The data processing unit stores the complete results of the quality inspection, including qualified and unqualified measurement point data, measurement values, tolerances and other information, in the form of electronic documents. Common electronic document formats include PDF, HTML, XML, etc.
[0152] The storage method of electronic documents can be determined according to the actual needs of the enterprise. Common storage methods include:
[0153] Local storage: Store electronic documents on the local disk of the computer or server where the quality inspection system is located for quick access and query.
[0154] Network storage: Upload electronic documents to the enterprise's internal network or cloud server to achieve centralized data management and remote access.
[0155] Database storage: Store quality inspection results in a structured form in a relational or non-relational database to facilitate subsequent data analysis and mining.
[0156] The quality inspection results and quality problem reports are sent to the human-computer interaction interface for output and display.
[0157] The data processing unit sends the generated electronic documents of quality inspection results and quality problem reports to the human-computer interaction interface and outputs them in a graphical manner. The output display content includes:
[0158] 3D model of the inspected workpiece: Display the 3D CAD model of the inspected workpiece or the measured point cloud model to intuitively show the overall shape and structure of the workpiece.
[0159] The position and measurement value of the measuring point: The position and corresponding measurement value of each measuring point are displayed on the 3D model in different colors or marks, which is convenient for users to quickly locate and identify.
[0160] Tolerance range and degree of deviation: Display the comparison between the measured value of each measuring point and the design tolerance in the form of a chart or numerical value, and highlight the degree of deviation from the tolerance.
[0161] Quality Problem Report: The content of the quality problem report is displayed in the interface, including detailed information and data of unqualified measurement points, which is convenient for users to analyze and trace the causes of quality problems.
[0162] The human-computer interaction interface can be in various forms such as web browsers, mobile apps, desktop software, etc., supporting users to access and operate through different terminals such as PCs, tablets, and mobile phones.
[0163] Generate electronic quality inspection reports with quality traceability function.
[0164] In addition to outputting and displaying quality inspection results and quality problem reports, the human-computer interaction interface also supports the generation of electronic quality inspection reports with quality traceability functions. The quality traceability function includes:
[0165] Historical data query: Users can query and access historical quality inspection results and quality problem reports by keywords such as the number of the inspected workpiece, inspection time, and inspector, to achieve traceability and comparison of quality data.
[0166] Quality problem analysis: By collecting statistics and analyzing information such as the location, frequency, and degree of deviation of unqualified measurement points, the weak links in the production and processing of the inspected workpieces and the characteristic areas prone to quality problems can be identified to provide data support for quality improvement.
[0167] Quality trend prediction: By conducting trend analysis and prediction on quality inspection results over a period of time, we can evaluate the changing trend and risk level of workpiece quality and take preventive and corrective measures in a timely manner.
[0168] Electronic quality inspection reports are generated and displayed in the form of web pages, PDF documents, data visualization dashboards, etc., supporting users to conduct quality management and decision analysis in an electronic manner, thereby improving the efficiency and level of quality management.
[0169] By automatically generating quality problem reports, storing quality inspection results in the form of electronic documents, and performing graphical display and quality traceability analysis on the human-computer interaction interface, the quality inspection process is made paperless, intelligent, and visual, which improves the efficiency and accuracy of quality inspection and provides a data basis for the continuous improvement of product quality.
[0170] Figure 2 FIG. 1 is a schematic diagram of the structure of a rapid paperless quality inspection system according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0171] The first unit is used to obtain a three-dimensional model of the inspected workpiece, and automatically generate a quality inspection plan for inspecting the inspected workpiece according to the geometric features of the three-dimensional model and in combination with preset quality inspection rules, wherein the quality inspection plan includes a measurement path, a measurement point position, a measurement item, and a measurement tolerance;
[0172] The second unit is used to send the quality inspection plan to the three-dimensional coordinate measuring machine, control the three-dimensional coordinate measuring machine to measure the inspected workpiece according to the measurement path and the measurement point position, and obtain the measurement data of the inspected workpiece, wherein the measurement data includes the coordinate information of the measurement point and the corresponding measurement value; transmit the measurement data to the data processing unit, compare the measurement data with the design size of the three-dimensional model through the data processing unit, and judge whether the measurement value of each measurement point is within the tolerance range according to the preset tolerance requirement, so as to obtain the quality inspection result of the inspected workpiece;
[0173] The third unit is used to generate a quality problem report through the data processing unit if the quality inspection result is unqualified, and the quality problem report includes the location, measurement value and degree of deviation from tolerance of the unqualified measurement point; store the quality inspection result in the form of an electronic document, and send the quality inspection result and the quality problem report to the human-computer interaction interface for output and display, so as to generate an electronic quality inspection report with quality traceability function.
[0174] According to a third aspect of the embodiments of the present invention,
[0175] An electronic device is provided, comprising:
[0176] processor;
[0177] a memory for storing processor-executable instructions;
[0178] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0179] According to a fourth aspect of the embodiments of the present invention,
[0180] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0181] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. Fast and paperless quality inspection method, It is characterized in that include: Acquire a three-dimensional model of the workpiece to be inspected, and automatically generate a quality inspection plan for inspecting the workpiece to be inspected based on the geometric features of the three-dimensional model and in combination with preset quality inspection rules, wherein the quality inspection plan includes a measurement path, measurement point positions, measurement items, and measurement tolerances; The quality inspection scheme is sent to a three-dimensional coordinate measuring machine, and the three-dimensional coordinate measuring machine is controlled to measure the inspected workpiece according to the measurement path and the measurement point position to obtain the measurement data of the inspected workpiece, wherein the measurement data includes the coordinate information of the measurement point and the corresponding measurement value; the measurement data is transmitted to a data processing unit, and the measurement data is compared with the design size of the three-dimensional model through the data processing unit, and according to the preset tolerance requirements, it is determined whether the measurement value of each measurement point is within the tolerance range to obtain the quality inspection result of the inspected workpiece; If the quality inspection result is unqualified, a quality problem report is generated through the data processing unit, and the quality problem report includes the location of the unqualified measurement point, the measurement value and the degree of deviation from the tolerance; The quality inspection results are stored in the form of electronic documents, and the quality inspection results and quality problem reports are sent to the human-computer interaction interface for output and display, so as to generate an electronic quality inspection report with quality traceability function; Obtain a three-dimensional model of the workpiece to be inspected, and automatically generate a quality inspection plan for inspecting the workpiece to be inspected based on the geometric features of the three-dimensional model and the preset quality inspection rules. The quality inspection plan includes a measurement path, measurement point positions, measurement items, and measurement tolerances, including: Obtaining a three-dimensional model of the inspected workpiece, including scanning the inspected workpiece with a three-dimensional scanner to obtain the workpiece's point cloud data; performing denoising, filtering, and point cloud density adjustment on the point cloud data; converting the point cloud data into a triangular face mesh model through a point cloud data reconstruction algorithm; performing hole filling, mesh simplification, and mesh optimization on the triangular face mesh model to obtain a high-quality three-dimensional model of the inspected workpiece; Extracting features from the three-dimensional model of the workpiece under inspection, including segmenting the three-dimensional model of the workpiece under inspection into a plurality of geometric feature regions of a plane, a cylindrical surface, and a spherical surface through a surface segmentation algorithm; calculating feature parameters of each geometric feature region to obtain a normal vector of the plane, an axis direction and a radius of the cylindrical surface, and a center coordinate and a radius of the spherical surface; Constructing a point feature histogram or a fast point feature histogram to characterize the geometric features of a 3D model; A quality inspection plan is automatically generated according to the geometric features of the inspected workpiece and preset quality inspection rules.
2. The method according to claim 1, It is characterized in that The three-dimensional model of the inspected workpiece is segmented into multiple geometric feature areas of a plane, a cylindrical surface and a spherical surface by a surface segmentation algorithm, wherein the surface segmentation algorithm includes: Calculate the Gaussian curvature of each vertex on the three-dimensional model of the inspected workpiece, divide the vertices into plane points, cylindrical points and spherical points according to the Gaussian curvature value, and merge adjacent vertices of the same type into a geometric feature region through the region growing algorithm; Calculate the principal curvature direction of each vertex on the three-dimensional model of the inspected workpiece, divide the vertices into plane points, cylindrical points and spherical points according to the distribution characteristics of the principal curvature direction, and merge adjacent vertices of the same type into a geometric feature region through the region growing algorithm; The feature parameters of each geometric feature area obtained by segmentation are calculated, including: For the plane feature area, the normal vector of the plane is calculated by principal component analysis; For the cylindrical feature area, the axis direction and radius of the cylindrical surface are calculated by a fitting algorithm, wherein the fitting algorithm includes constructing a least squares optimization problem, solving the axis equation parameters and the cylindrical surface radius, so that the sum of the distances from the vertices on the cylindrical surface to the axis is minimized; For the spherical feature area, the coordinates of the center of the sphere and the radius are calculated by a least squares fitting algorithm. The least squares fitting algorithm includes constructing a least squares optimization problem to solve the coordinates of the center of the sphere and the radius so that the sum of the squares of the difference between the distance from the vertex on the sphere to the center of the sphere and the radius is minimized.
3. The method according to claim 2, It is characterized in that The method further comprises: A geometric feature descriptor is constructed to characterize the local geometric features of the three-dimensional model of the inspected workpiece. The geometric feature descriptor includes a point feature histogram, which is obtained by calculating the four-tuple features between each point on the three-dimensional model of the inspected workpiece and the point pairs in its neighborhood, and counting the four-tuple features in the histogram.
4. The method according to claim 1, It is characterized in that Controlling the three-dimensional coordinate measuring machine to measure the workpiece according to the measurement path and measurement point position includes: Encode the measurement path as a solution to the optimization problem. The encoding methods include integer encoding and real number encoding. Integer encoding represents the visit order of the measurement points as an integer sequence, and real number encoding uses the coordinates of each measurement point as an optimization variable. According to the goal of measuring path optimization, constructing an objective function of the optimization problem, wherein the objective function includes minimizing the measuring path length and minimizing the measuring error; According to the goal of measuring path optimization, corresponding constraints are set, wherein the constraints include measuring point access order constraint, measuring point spacing constraint and measuring path smoothness constraint. The measuring point access order constraint ensures that each measuring point is visited only once, the measuring point spacing constraint ensures that the distance between adjacent measuring points is greater than the safety distance of the measuring head, and the measuring path smoothness constraint ensures that there is no sharp turn in the measuring path. The objective function and constraint conditions of the optimization problem are solved by a multi-objective optimization algorithm, and the optimized measurement path is applied to the quality inspection plan to guide the three-dimensional coordinate measuring machine to automatically measure the inspected workpiece according to the optimal path, wherein the multi-objective optimization algorithm includes a genetic algorithm.
5. The method according to claim 4, It is characterized in that The first objective function to minimize the measurement path length includes: ; in, n、m Indicates the number of measurement points. The two values are different. ( x i ,y i ,z i ) indicates the measuring point i The spatial coordinates of , λ represents the smoothness weight coefficient, δ ij Indicator variable representing the smoothness constraint of the measurement path. i and j The value is 1 when an acute angle is formed between them, otherwise it is 0. d ij Indicates the measuring point i and j Distance between The second objective function to minimize the measurement error includes: ; in, w i Indicates i The weight value of each measurement point, k i Indicates i The number of repeated measurements for each measurement point, ( x ib ,y ib ,z ib ) indicates the i The measurement point is b The spatial coordinates at the time of the first measurement represent the i The target space coordinates of the measurement points, μ represents the measurement uncertainty weight coefficient, θ ij Indicates the measuring point i and j The correlation coefficient of measurement uncertainty between e ij Indicates the measuring point i and j The measurement uncertainty between.
6. A rapid paperless quality inspection system, used to implement the method according to any one of claims 1 to 5. It is characterized in that include: The first unit is used to obtain a three-dimensional model of the inspected workpiece, and automatically generate a quality inspection plan for inspecting the inspected workpiece according to the geometric features of the three-dimensional model and in combination with preset quality inspection rules, wherein the quality inspection plan includes a measurement path, a measurement point position, a measurement item, and a measurement tolerance; The second unit is used to send the quality inspection plan to the three-dimensional coordinate measuring machine, control the three-dimensional coordinate measuring machine to measure the inspected workpiece according to the measurement path and the measurement point position, and obtain the measurement data of the inspected workpiece, wherein the measurement data includes the coordinate information of the measurement point and the corresponding measurement value; transmit the measurement data to the data processing unit, compare the measurement data with the design size of the three-dimensional model through the data processing unit, and judge whether the measurement value of each measurement point is within the tolerance range according to the preset tolerance requirement, so as to obtain the quality inspection result of the inspected workpiece; A third unit is used for generating a quality problem report through a data processing unit if the quality inspection result is unqualified, wherein the quality problem report includes the position of the unqualified measurement point, the measurement value and the degree of deviation from the tolerance; The quality inspection results are stored in the form of electronic documents, and the quality inspection results and quality problem reports are sent to the human-computer interaction interface for output and display, generating an electronic quality inspection report with quality traceability function.
7. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 5.
8. A computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Paperless system based on WEB platform and application
CN111563667A
3D probe on-machine measurement automatic programming method based on MBD model
CN112506474A
Project quality control method based on BIM technology
CN113592231A
Geometric error measurement strategy intelligent reasoning method based on ontology
CN114297785A
Prefabricated part intelligent detection method based on BIM-unmanned aerial vehicle-mechanical dog
CN114547866A
