A method for measuring the size of irregular parts of CNC machine tools

By screening and analyzing the abnormal scanning areas of irregular parts of CNC machine tools and adjusting the scanning accuracy, the point cloud data error and distortion problems are solved, and the construction efficiency of the three-dimensional model and the accuracy of dimensional measurement are improved.

CN118513913BActive Publication Date: 2024-11-15WUXI KANGBEI ELECTRONICS EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410968780.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-15
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

In the prior art, there are errors or distortions in point cloud data scanning of irregular parts of CNC machine tools, resulting in inaccurate construction of three-dimensional models and large errors in dimensional measurement results, especially when the parts have high complex geometric shapes or sharp fine edges. .

Method used

By obtaining point cloud data of multiple irregular parts of the same type, filtering out abnormal scanning parts, analyzing point cloud plane abnormalities and connections, determining the scanning difficulty of the abnormal scanning area, and re-acquisition of new point cloud data according to the difficulty, adjusting the scanning accuracy Improve measurement accuracy.

Benefits of technology

It improves the acquisition accuracy of point cloud data, enhances the construction efficiency of the three-dimensional model and the accuracy of dimensional measurement, especially in difficult-to-scan areas, and reduces measurement errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118513913B_ABST
    Figure CN118513913B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of point cloud model acquisition, and specifically to a method for measuring the size of irregular parts of CNC machine tools. The method screens out abnormal scanning parts through the expected deviation of the irregular parts themselves; obtains a point cloud plane for each abnormal scanning part, and obtains the plane anomaly of each point cloud plane according to the difference between each point cloud plane and the expected point cloud plane and the distribution deviation of the point cloud plane itself, thereby determining the abnormal scanning area; for scanning areas with the same abnormality, the plane anomaly and the distribution degree of occurrence are combined to obtain the scanning difficulty of each abnormal scanning area; based on the scanning difficulty, new point cloud data is obtained and then the size is measured. The present invention improves the acquisition accuracy of point cloud data by adaptively adjusting the acquisition accuracy of different areas according to the abnormalities of point cloud data in different planes and areas, making the construction of three-dimensional models more efficient and the size measurement more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of point cloud model acquisition, and in particular to a method for measuring the size of irregular parts of a numerically controlled machine tool. Background Art

[0002] CNC machine tools are automated machine tools controlled by computer programs. They can achieve precise processing of workpieces and play an important role in industrial production. In the machining industry, the production of each part has strict dimensional standards and specifications, and the dimensional measurement of the parts is used to verify whether the product meets these standards. However, some irregular parts usually require more precise matching with other parts due to their special uses. At this time, slight dimensional deviations are likely to cause assembly problems or damage to structural integrity.

[0003] In order to obtain the part size more accurately, a 3D scanner is used to obtain the point cloud data of the part surface and build a 3D model for measurement. This can more accurately detect the dimensions of irregular parts that are difficult to obtain. However, since irregular parts have highly complex geometric shapes or sharp and fine edges, the scanning parameter settings of the scanning equipment cannot meet the detection requirements of the parts. At this time, some scanned point cloud data will have certain errors or distortions, resulting in inaccurate construction of the 3D model and large errors in the size measurement results. Summary of the invention

[0004] In order to solve the technical problem that the scanned point cloud data in the prior art may have certain errors or distortions, resulting in inaccurate construction of the three-dimensional model and large errors in the size measurement results, the purpose of the present invention is to provide a size measurement method for irregular parts of CNC machine tools, and the technical scheme adopted is as follows:

[0005] The present invention provides a method for measuring the size of irregular parts of a numerically controlled machine tool, the method comprising:

[0006] Obtain point cloud data of two or more irregular parts of the same type;

[0007] According to the degree of deviation between the point cloud data of the irregular parts and the expected point cloud data, the abnormal scanned parts are screened from all the irregular parts;

[0008] The point cloud plane of each abnormal scanned part is obtained; according to the distribution deviation of the point cloud data in each point cloud plane of each abnormal scanned part and the distribution difference with the expected point cloud plane, the plane anomaly of each point cloud plane of each abnormal scanned part is obtained; according to the plane anomaly and connection of the point cloud plane of each abnormal scanned part, the abnormal scanning area of ​​each abnormal scanned part is obtained;

[0009] According to the plane anomaly of the point cloud plane corresponding to the same abnormal scanning area in all abnormal scanning parts and the degree of occurrence of the abnormal scanning area in all irregular parts, the scanning difficulty of the abnormal scanning area is obtained; new point cloud data of the irregular parts are re-acquired based on the scanning difficulty of the abnormal scanning area; and dimension measurement is performed based on the new point cloud data.

[0010] Furthermore, the method for obtaining abnormal scanning parts includes:

[0011] Obtaining point cloud data of preset standard irregular parts of the same type as expected point cloud data;

[0012] For any irregular part, according to the local distribution of the coordinates of the point cloud data in the irregular part in the expected point cloud data coordinates, the matching point cloud data in the irregular part is determined;

[0013] According to the difference between the matching point cloud data and the expected point cloud data in the irregular part, and the amount of non-matching point cloud data, the point cloud difference of the irregular part is obtained;

[0014] When the point cloud difference of an irregular part is greater than the preset abnormal point cloud threshold, the corresponding irregular part is regarded as an abnormal scanning part.

[0015] Furthermore, the method for acquiring matching point cloud data includes:

[0016] Within the preset neighborhood range of each expected point cloud data, when point cloud data of the irregular part exists, the corresponding point cloud data is used as the matching point cloud data of the irregular part.

[0017] Further, the step of obtaining the point cloud difference of the irregular part according to the difference between the matching point cloud data and the expected point cloud data in the irregular part, and the amount of non-matching point cloud data, includes:

[0018] In the irregular part, the distance between each matching point cloud data and the nearest expected point cloud data is obtained as the point cloud deviation of each matching point cloud data;

[0019] Combining the point cloud deviations of all matching point cloud data in the irregular part, obtaining the point cloud deviation degree of the irregular part;

[0020] The product of the total number of non-matching point cloud data in the irregular part and the point cloud deviation is normalized to obtain the point cloud difference of the irregular part.

[0021] Furthermore, the method for obtaining the plane anomaly includes:

[0022] For any point cloud plane of any abnormal scanned part, plane fitting is performed on the point cloud data contained in the point cloud plane to obtain a fitting plane;

[0023] According to the distance between each point cloud data in the point cloud plane and the fitting plane, and the change of the position distribution of each point cloud data in the point cloud plane in the fitting plane, the fitting plane difference of the point cloud plane is obtained;

[0024] Obtaining a point cloud plane of expected point cloud data as the expected point cloud plane, and counting the number of coordinates of point cloud data in the point cloud plane that are not in the corresponding expected point cloud plane as the expected plane difference of the point cloud plane;

[0025] The plane anomaly of the point cloud plane is obtained by combining the expected plane difference and the fitted plane difference of the point cloud plane.

[0026] Furthermore, the method for obtaining the fitting plane difference includes:

[0027] The shortest distance from each point cloud data in the point cloud plane to the fitting plane is obtained as the fitting distance of each point cloud data in the point cloud plane; the fitting chaos degree of the point cloud plane is obtained according to the numerical chaos degree of the fitting distance of all the point cloud data in the point cloud plane;

[0028] Acquire the central point cloud data in the point cloud plane; use the distance variance of all the point cloud data in the point cloud plane from the central point cloud data as the position distribution of the point cloud plane;

[0029] The projection points of all the point cloud data contained in the point cloud plane in the fitting plane are used as the projection data in the fitting plane;

[0030] Obtain the central projection data of the projection data in the fitting plane; use the distance variance of all the projection data in the fitting plane from the central projection data as the position distribution of the fitting plane;

[0031] The difference in position distribution between the point cloud plane and the fitting plane is used as the position change degree of the point cloud plane;

[0032] The fitting plane difference of the point cloud plane is obtained by combining the fitting chaos and position variation of the point cloud plane; the fitting chaos and position variation are both positively correlated with the fitting plane difference.

[0033] Furthermore, the method for acquiring the abnormal scanning area includes:

[0034] In each abnormal scanned part, when there is a point cloud plane with a plane anomaly greater than a preset plane threshold, the corresponding point cloud plane is regarded as an abnormal plane;

[0035] In the abnormal scanning part, each abnormal plane is regarded as an abnormal scanning area. When there are intersections between abnormal scanning areas, the intersecting abnormal scanning areas are merged into one abnormal scanning area, and the merging is iterated until there are no intersecting abnormal scanning areas in the abnormal scanning part.

[0036] Furthermore, the method for obtaining the scanning difficulty includes:

[0037] Count the number of times each abnormal scanning area appears in the abnormal scanning part as the scanning abnormality frequency of each abnormal scanning area;

[0038] In each abnormal scanning part, the abnormality of all point cloud planes in each abnormal scanning area is combined to obtain the abnormality degree of each abnormal scanning area; the average of the abnormality degrees of the same abnormal scanning area in all abnormal scanning parts is taken as the scanning abnormality degree of the corresponding abnormal scanning area;

[0039] The scanning difficulty of each abnormal scanning area is obtained by combining the scanning abnormality frequency and the scanning abnormality degree of each abnormal scanning area.

[0040] Furthermore, the method of reacquiring new point cloud data of the irregular part according to the scanning difficulty of the abnormal scanning area includes:

[0041] In irregular parts, when the scanning difficulty of an abnormal scanning area is greater than a preset difficulty threshold, the corresponding abnormal scanning area is recorded as a high-difficulty area;

[0042] For difficult areas, rescan and collect data by presetting high-precision scanning parameters to obtain new point cloud data corresponding to irregular parts.

[0043] Furthermore, the point cloud plane is obtained by a plane detection algorithm.

[0044] The present invention has the following beneficial effects:

[0045] The present invention first screens out abnormal scanning parts that may have scanning anomalies through the expected deviation of the irregular parts themselves, and performs local abnormal analysis on the multi-plane conditions of the parts by obtaining the point cloud plane for each abnormal scanning part. Therefore, the difference between each point cloud plane and the expected point cloud plane and the distribution deviation of the point cloud plane itself are further analyzed. From the two aspects of the difference between the plane and the expected and the deviation from the ideal acquisition of the plane, the plane anomaly of each point cloud plane is obtained, reflecting the degree of scanning anomaly and combining the connection between the planes, more accurately determining the abnormal scanning area with scanning anomaly, so as to facilitate the subsequent analysis of the consistency of abnormal scanning area based on multiple parts. Since irregular parts are analyzed of the same type, the plane anomaly is comprehensively analyzed for the situation with the same abnormal scanning area, and the scanning difficulty of each abnormal scanning area is obtained in combination with the distribution degree. For the more difficult scanning area, the scanning accuracy needs to be readjusted to obtain new point cloud data, so that the scanning acquisition of the part with higher scanning anomaly is more accurate, and then the size measurement is performed. The present invention improves the acquisition accuracy of point cloud data by adaptively adjusting the acquisition accuracy of different areas for the abnormal conditions of point cloud data in different planes and areas, making the construction of three-dimensional models more efficient and the size measurement more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A flow chart of a method for measuring the size of irregular parts of a CNC machine tool provided by one embodiment of the present invention;

[0048] Figure 2 A schematic diagram of part point cloud data provided by an embodiment of the present invention;

[0049] Figure 3 A flow chart of a method for obtaining abnormal scanned parts provided by one embodiment of the present invention;

[0050] Figure 4 A flow chart of a method for obtaining a plane anomaly provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the dimension measurement method of irregular parts of a CNC machine tool proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0052] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0053] The specific scheme of the dimension measurement method of irregular parts of a CNC machine tool provided by the present invention is described in detail below with reference to the accompanying drawings.

[0054] See also Figure 1 , which shows a flow chart of a method for measuring the size of irregular parts of a CNC machine tool provided by an embodiment of the present invention, the method comprising the following steps:

[0055] S1: Obtain point cloud data of two or more irregular parts of the same type.

[0056] The irregular parts of CNC machine tools require high-precision detection, so they are detected by 3D scanners. 3D scanners are instruments that assist in accurately measuring the size of irregular objects. They can convert the geometric shape of an object into a digital model and provide detailed size and shape information. Different types of irregular parts have different areas that are more difficult to detect. Therefore, the detection process analyzes the same type of irregular parts as a whole. In an embodiment of the present invention, a 3D scanner is used to scan multiple irregular parts of the same type to obtain point cloud data of more than two irregular parts of the same type. The point cloud data of each irregular part can reflect the surface condition of the part. Please refer to Figure 2 , which shows a schematic diagram of a part point cloud data provided by an embodiment of the present invention. It should be noted that in the initial scanning process, the scanning parameters are the same, including scanning speed, point cloud density and scanning path, etc., and the acquired point cloud data are mapped to the same spatial coordinates to facilitate analysis of differences.

[0057] S2: Filter abnormal scanned parts from all irregular parts according to the degree of deviation between the point cloud data of the irregular parts and the expected point cloud data.

[0058] Since irregular parts usually have special external features or internal structures, they may be difficult to handle during production and polishing. Therefore, when the spatial structure of irregular parts is complex or the polishing effect of some positions is poor, such as insufficient local polishing, highly reflective or porous materials, etc., the point cloud data obtained by scanning the corresponding positions may be spatially distorted or data points are missing. Similarly, due to the diversity and particularity of the structure of irregular parts, the position of the abnormal scanning collection cannot be determined, so irregular parts of the same type need to be collectively analyzed and adjusted.

[0059] In order to more efficiently analyze the hard-to-obtain parts of irregular parts, firstly, the parts with large abnormal deviations in the overall collected point cloud data are screened to improve the efficiency of subsequent analysis of the hard-to-obtain parts.

[0060] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining abnormal scan parts can be found in Figure 3 , which shows a flow chart of a method for obtaining abnormal scanned parts provided by an embodiment of the present invention, the method comprising the following steps:

[0061] S201: Obtaining point cloud data of a preset standard irregular part of the same type as expected point cloud data.

[0062] When produced by CNC machine tools, the size parameters of each type of standard parts are known, so the same type of standard irregular parts are ideal processing parts with the most suitable size. However, in actual production, due to the influence of processes such as grinding, the produced parts will have a certain quality tolerance. Therefore, the point cloud data obtained by scanning the same type of standard irregular parts in the same way is used as the expected point cloud data for subsequent difference analysis.

[0063] S202: For any irregular part, according to the local distribution of the coordinates of the point cloud data in the irregular part in the expected point cloud data coordinates, determine the matching point cloud data in the irregular part.

[0064] Since the scanning method is the same, when the scanning condition of the irregular part is better, the coordinate distribution of the point cloud data should be more matched with the expected point cloud data, so the matching point cloud data in each irregular part is first obtained.

[0065] In a feasible embodiment of the present invention, within the preset neighborhood range of each expected point cloud data, when there is point cloud data of the irregular part, the corresponding point cloud data is used as the matching point cloud data of the irregular part. In the embodiment of the present invention, the preset neighborhood range is a circular area with each expected point cloud data as the center and a radius of 1. For example, when the coordinates of an expected point cloud data are (2,1,2), the fluctuation range of the point cloud data in the preset neighborhood range is 1-3 on the horizontal axis, 0-2 on the vertical axis, and 1-3 on the vertical axis. If there is point cloud data (2,1.5,2) of an irregular part, the point cloud data is within the preset neighborhood range of the expected point cloud data. At this time, the point cloud data is the matching point cloud data. The specific range is set according to the tolerance of the specific implementation scenario and is not limited here.

[0066] S203: Obtaining a point cloud difference of the irregular part according to the difference between the matching point cloud data and the expected point cloud data in the irregular part, and the amount of non-matching point cloud data.

[0067] Non-matching point cloud data may indicate that the part surface cannot be obtained, is distorted, or has surface abnormalities during scanning. Therefore, the more non-matching point cloud data there is, the greater the difference in the scan. At the same time, for the matching point cloud data, the greater the difference from the expected point cloud data, the more likely it is that there is a scanning anomaly.

[0068] In a feasible embodiment of the present invention, in the irregular part, the distance between each matching point cloud data and the nearest expected point cloud data is obtained as the point cloud deviation of each matching point cloud data, and the point cloud deviation degree of the irregular part is obtained by combining the point cloud deviations of all matching point cloud data to comprehensively reflect the abnormal situation of the matching point cloud data.

[0069] In the embodiment of the present invention, the point cloud deviation degree can be obtained by averaging all point cloud deviations. In other embodiments of the present invention, the point cloud deviation degree can also be obtained by summing all point cloud deviations, which will not be described in detail here.

[0070] Furthermore, the product of the total number of non-matching point cloud data in the irregular part and the point cloud deviation is normalized to obtain the point cloud difference of the irregular part. Combining the total number of non-matching point cloud data and the point cloud deviation, the greater the total number of non-matching point cloud data and the greater the point cloud deviation, the greater the overall difference between the irregular part and the expected scanning situation, and the higher the abnormal situation reflected by the point cloud data. In the embodiment of the present invention, the expression of the point cloud difference is:

[0071] ; In the formula, Expressed as The point cloud difference of irregular parts, Expressed as The total number of non-matching point cloud data of irregular parts, Expressed as The total number of matching point cloud data of irregular parts, Expressed as Irregular parts The point cloud deviation of the matching point cloud data. It is represented as a normalization processing function. It should be noted that normalization is a technical means well known to those skilled in the art. The normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here. Expressed as The point cloud deviation of an irregular part.

[0072] S204: When the point cloud difference of the irregular part is greater than a preset abnormal point cloud threshold, the corresponding irregular part is regarded as an abnormal scanning part.

[0073] The point cloud data is screened by the distribution of the overall point cloud data and the expected point cloud data. When the point cloud difference is greater than the preset abnormal point cloud threshold, it means that the corresponding irregular part has a large deviation in the distribution of the point cloud data. The abnormal situation can be further analyzed, so it is determined to be an abnormal scanned part. In the embodiment of the present invention, the preset abnormal point cloud threshold is set to 0.4, and the specific value can be adjusted by the implementer, and there is no limitation here.

[0074] At this point, the abnormal scanning parts with abnormal scanning conditions are preliminarily screened out.

[0075] S3: Obtain the point cloud plane of each abnormal scanned part; obtain the plane anomaly of each point cloud plane of each abnormal scanned part according to the distribution deviation of the point cloud data in each point cloud plane of each abnormal scanned part and the distribution difference with the expected point cloud plane; obtain the abnormal scanning area of ​​each abnormal scanned part according to the plane anomaly and connection of the point cloud plane of each abnormal scanned part.

[0076] The point cloud data of irregular parts is a three-dimensional coordinate data, so the anomaly of local scanning usually involves multiple planes on the surface of the part. Therefore, when evaluating the anomaly of local scanning, analysis is performed based on the plane situation to obtain the area of ​​abnormal scanning.

[0077] First, it is necessary to obtain the point cloud plane of each abnormal scanned part. In an embodiment of the present invention, all point cloud planes can be obtained for each abnormal scanned part through a plane detection algorithm, wherein the plane detection algorithm is a well-known technical means familiar to those skilled in the art and will not be described in detail here. It should be noted that since the irregular parts are all analyzed in the same type during analysis, when the algorithm analyzes the plane as a whole, the point cloud plane of each irregular part is consistent in overall structure, that is, each plane has a corresponding relationship in the same position in space. In an embodiment of the present invention, the plane corresponding to the position can be the plane closest to the center point and the normal vector as the point cloud plane corresponding to the position in space. In other embodiments of the present invention, the plane of the corresponding position can also be determined according to the number of matching point cloud data in the plane that matches the expected point cloud data, which will not be described in detail here.

[0078] Each point cloud plane is further evaluated, and the distribution anomaly of the point cloud data is analyzed for each point cloud plane. Preferably, in some possible implementation methods of the embodiments of the present invention, the method for obtaining the plane anomaly can be found in Figure 4 , which shows a flow chart of a method for obtaining a plane anomaly provided by an embodiment of the present invention, the method comprising the following steps:

[0079] S301: For any point cloud plane of any abnormal scanned part, plane fitting is performed on the point cloud data contained in the point cloud plane to obtain a fitting plane.

[0080] The acquisition of the plane by the plane detection algorithm is to preliminarily identify the possible plane structure of the point cloud data, and can roughly obtain the key plane position and range of the part. The algorithm is robust when acquiring the plane detection algorithm. The point cloud data contained in the point cloud plane is not completely on the plane. For example, in the multi-plane detection algorithm in Open3D, the approximate point cloud data is divided into the same plane through the threshold setting. The threshold division plane may divide the local deviation points.

[0081] When plane fitting is performed on the point cloud data contained in the point cloud plane, an optimal plane is found to approximate the point cloud data, which can further accurately characterize the plane situation. The fitting plane is the distribution optimization of the point cloud data in the corresponding point cloud plane. Ideally, the fitting plane coincides with the point cloud data. Therefore, the subsequent distribution difference between the fitting plane and the acquired point cloud plane can reflect the acquisition quality of the point cloud plane. It should be noted that the method of plane fitting based on points is a technical means well known to technicians in this field, such as the least squares method or the RANSAC algorithm, etc., which will not be elaborated here.

[0082] S302: Obtaining a fitting plane difference of the point cloud plane according to the distance between each point cloud data in the point cloud plane and the fitting plane, and the change in the position distribution of each point cloud data in the point cloud plane in the fitting plane.

[0083] When the point cloud plane is missing or distorted during scanning, the acquisition of the point cloud plane is worse, that is, the quality of the acquired point cloud plane is poor. Therefore, the acquisition quality of the point cloud plane is analyzed by fitting the plane of the point cloud data in the point cloud plane.

[0084] In an embodiment of the present invention, the shortest distance from each point cloud data in the point cloud plane to the fitting plane is obtained as the fitting distance of each point cloud data in the point cloud plane. The fitting chaos degree of the point cloud plane is obtained according to the numerical chaos degree of the fitting distance of all point cloud data in the point cloud plane. The more chaotic the distance between the point cloud data and the fitting plane is, the poorer the representation of the distribution of the point cloud data itself is, and the scanning acquisition abnormality of the point cloud data on the plane is likely to be more likely.

[0085] In an embodiment of the present invention, the variance of all fitting distances may be calculated to obtain the fitting confusion, and the variance may be used to reflect the numerical confusion. In other embodiments of the present invention, the mean square error or coefficient of variation may also be used to reflect the numerical confusion, which is not limited here.

[0086] Furthermore, the central point cloud data in the point cloud plane is obtained, and the distance variance of all the point cloud data in the point cloud plane from the central point cloud data is used as the position distribution of the point cloud plane, and the position distribution discreteness of the point cloud data on the plane is reflected by the variance. The projection points of all the point cloud data contained in the point cloud plane in the fitting plane are used as the projection data in the fitting plane, and the central projection data of the projection data in the fitting plane is obtained, and the position distribution is analyzed after being projected onto the fitting plane. The distance variance of all the projection data in the fitting plane from the central projection data is used as the position distribution of the fitting plane, and the position discreteness of the point cloud data in the fitting representation is reflected by the projection position of the point cloud data.

[0087] Furthermore, the difference in position distribution between the point cloud plane and the fitting plane is used as the position change degree of the point cloud plane. The degree of position change of the point cloud data in the preferred representation further reflects the preference of the plane distribution of the point cloud data itself.

[0088] Finally, the fitting plane difference of the point cloud plane is obtained by combining the fitting chaos and position variation of the point cloud plane. The fitting chaos and position variation are positively correlated with the fitting plane difference. When the fitting chaos and position variation are smaller, it means that the point cloud plane is more similar to the fitting plane, the point cloud data is more optimal for obtaining the point cloud plane, and the scanning anomaly of the plane is less likely to occur.

[0089] In an embodiment of the present invention, the product of the fitting chaos and the position change degree is taken as the fitting plane difference, and the multiplication is used to reflect that the fitting chaos and the position change degree are both positively correlated with the fitting plane difference. In other embodiments of the present invention, other basic mathematical operations can also be used to reflect that the fitting chaos and the position change degree are both positively correlated with the fitting plane difference, such as addition or power operation, etc., which are not limited here.

[0090] S303: Acquire a point cloud plane of expected point cloud data as the expected point cloud plane, and count the number of coordinates of point cloud data in the point cloud plane that are not in the corresponding expected point cloud plane as the expected plane difference of the point cloud plane.

[0091] The expected point cloud plane is obtained through the expected point cloud data. The expected point cloud plane is the distribution of the point cloud plane that can be obtained from the part point cloud data under ideal standard conditions. By comparing the expected point cloud plane at the corresponding position with the point cloud plane, the degree of deviation from the expectation is reflected. The more point cloud data that is not in the expected point cloud plane, the higher the degree of deviation, so the greater the difference in the expected plane.

[0092] S304: Combining the expected plane difference and the fitted plane difference of the point cloud plane, obtain the plane anomaly of the point cloud plane.

[0093] The plane anomaly is obtained by combining the abnormality of the point cloud plane itself and the abnormality of the deviation from the expected plane. In the embodiment of the present invention, the product of the expected plane difference and the fitted plane difference of the point cloud plane is normalized to obtain the plane anomaly of the point cloud plane. The larger the expected plane difference and the fitted plane difference, the worse the plane acquisition of the point cloud plane is when the point cloud plane is greatly different from the expected plane, and the more likely it is that the point cloud data is difficult to scan. Therefore, the larger the plane anomaly. In a specific embodiment of the present invention, the expression of the plane anomaly is:

[0094] ; In the formula, Expressed as The first abnormal scan part Planar anomalies of point cloud planes, Expressed as The first abnormal scan part The fitting chaos of the point cloud plane, Expressed as The first abnormal scan part The position distribution of the point cloud plane, Expressed as The first abnormal scan part The position distribution of the fitting plane of the point cloud plane, Expressed as The first abnormal scan part The expected plane difference of the point cloud plane, It is expressed as a normalized processing function. Expressed as The first abnormal scan part The position change of the point cloud plane is Expressed as The first abnormal scan part The fitted plane difference of the point cloud plane.

[0095] At this point, the possible abnormality analysis of each point cloud plane is completed.

[0096] Furthermore, the abnormal plane can be confirmed according to the possibility of abnormality, and the abnormal scanning area can be comprehensively screened out according to the plane connection situation. Therefore, the abnormal scanning area of ​​each abnormal scanning part is obtained according to the plane abnormality and connection situation of the point cloud plane of each abnormal scanning part.

[0097] Preferably, in some achievable methods of the embodiments of the present invention, in each abnormal scanned part, when there is a plane anomaly of a point cloud plane greater than a preset plane threshold, the corresponding point cloud plane is used as an abnormal plane, indicating that the abnormality is more significant. In the embodiments of the present invention, the preset plane threshold is set to 0.5. The specific numerical value can be adjusted by the implementer according to the specific implementation situation, and is not limited here.

[0098] Furthermore, in the abnormal scanning parts, each abnormal plane is regarded as an abnormal scanning area. When there is an intersection between the abnormal scanning areas, the intersecting abnormal scanning areas are merged into one abnormal scanning area, and the merging is iterated until there are no intersecting abnormal scanning areas in the abnormal scanning parts. Since the point cloud data itself represents the surface conditions of each irregular part, the abnormal scanning area obtained by merging the abnormal planes can reflect the overall distribution range of the local difficult scanning on the part.

[0099] At this point, the acquisition of the specific abnormal local area in the abnormal scanned part is completed.

[0100] S4: According to the plane anomaly of the point cloud plane corresponding to the same abnormal scanning area in all abnormal scanning parts and the degree of occurrence of the abnormal scanning area in all irregular parts, the scanning difficulty of the abnormal scanning area is obtained; new point cloud data of the irregular parts are re-acquired according to the scanning difficulty of the abnormal scanning area; and dimension measurement is performed based on the new point cloud data.

[0101] For irregular parts of the same type, when there are more identical abnormal scanning areas and the degree of abnormality is more significant, it means that for this type of part, it is difficult to scan in this area due to the geometric shape of the part, and the scanning parameters need to be adjusted for more accurate scanning. On the contrary, when the frequency of occurrence and degree of abnormality of the abnormal scanning area are not significant, it may be a random error in the scanning process, and no scanning adjustment is required. It should be noted that the identical abnormal scanning area is the area with the same combined point cloud plane in the abnormal scanning part, and the identical abnormal scanning area will exist in different abnormal scanning parts.

[0102] Thus, the scanning difficulty is obtained by combining the distribution of the abnormal scanning area and the plane abnormality. Preferably, in some achievable manners of the embodiments of the present invention, the method for obtaining the scanning difficulty includes:

[0103] First, the number of times each abnormal scanning area appears in the abnormal scanning part is counted as the scanning abnormality frequency of each abnormal scanning area, which reflects the degree of occurrence of the abnormal scanning area. In other embodiments of the present invention, the proportion of the number of times each abnormal scanning area appears in all irregular parts can be counted as the scanning abnormality frequency, which is not elaborated here.

[0104] Secondly, in each abnormal scanning part, the plane anomalies of all point cloud planes in each abnormal scanning area are combined to obtain the abnormality degree of each abnormal scanning area, which reflects the comprehensive abnormality degree of the abnormal scanning area in each abnormal scanning part. In an embodiment of the present invention, the sum of the plane anomalies of all point cloud planes in each abnormal scanning area can be used as the abnormality degree of each abnormal scanning area. In other embodiments of the present invention, the mean of the plane anomalies of all point cloud planes in each abnormal scanning area can also be used as the abnormality degree of each abnormal scanning area, which will not be repeated here.

[0105] Furthermore, the average of the abnormality degrees of the same abnormal scanning area in all abnormal scanning parts is used as the scanning abnormality degree of the corresponding abnormal scanning area. The abnormality degrees represented by the same abnormal scanning area in different parts may be different, and the comprehensive point cloud scanning abnormality of this area is reflected by the average.

[0106] Finally, the scanning difficulty of each abnormal scanning area is obtained by combining the scanning abnormality frequency and scanning abnormality degree of each abnormal scanning area. The greater the scanning abnormality frequency and scanning abnormality degree, the greater the number of times the abnormal scanning area is the same in the irregular parts, and the more abnormal the point cloud data distribution in the abnormal scanning area is, the less optimistic the scanning situation in this area is, and the greater the scanning difficulty is. In an embodiment of the present invention, the product of the scanning abnormality frequency and the scanning abnormality degree can be normalized to obtain the scanning difficulty. In other embodiments of the present invention, the sum of the scanning abnormality frequency and the scanning abnormality degree can also be normalized to obtain the scanning difficulty, which is not limited here.

[0107] After obtaining the scanning difficulty of the area, new point cloud data of the irregular parts can be reacquired based on the scanning difficulty of the abnormal scanning area. Preferably, in irregular parts, when the scanning difficulty of the abnormal scanning area is greater than the preset difficulty threshold, the corresponding abnormal scanning area is recorded as a high-difficulty area, which indicates that the scanning abnormalities in the parts are uniform and serious. The high-difficulty area is re-scanned and collected by pre-setting high-precision scanning parameters to obtain new point cloud data of the corresponding irregular parts. In an embodiment of the present invention, the preset difficulty threshold is set to 0.3, and the specific value can be adjusted by the implementer, and is not limited here. It should be noted that the high-precision scanning parameters are parameters for adjusting the three-dimensional scanner, such as laser power, scanning angle, scanning path, scanning speed or resolution, etc. The specific adjustment to improve the scanning accuracy is not limited here, and can be adjusted according to the specific scanning situation, which is not limited here.

[0108] In an embodiment of the present invention, abnormal scanning areas where the scanning difficulty is less than or equal to a preset difficulty threshold can be further treated as low-difficulty areas. The high-difficulty areas are re-scanned by pre-setting first high-precision scanning parameters, and the low-difficulty areas are re-scanned by pre-setting second high-precision scanning parameters. The accuracy of the second high-precision scanning parameters is lower than the first high-precision scanning parameters. The scanning accuracy is adjusted for the abnormal areas, thereby improving the scanning accuracy of the poorly scanned parts while ensuring the scanning efficiency.

[0109] Finally, a 3D model is constructed based on the point cloud data of the irregular parts after adjusting the scanning results, and the size parameters of the parts are obtained to complete the size measurement of the irregular parts.

[0110] In summary, the present invention first screens out abnormal scanning parts that may have scanning anomalies through the expected deviation of the irregular parts themselves, and analyzes them. For each abnormal scanning part, the point cloud plane is obtained to perform local abnormal analysis on the multi-plane situation of the part. Therefore, the difference between each point cloud plane and the expected point cloud plane and the distribution deviation of the point cloud plane itself are further analyzed. From the two aspects of the difference between the plane and the expected and the deviation from the ideal acquisition of the plane, the plane anomaly of each point cloud plane is obtained, reflecting the degree of scanning anomaly and combining the connection between the planes, more accurately determining the abnormal scanning area with scanning anomaly, so as to facilitate the subsequent analysis of the consistency of abnormal scanning area based on multiple parts. Since irregular parts are analyzed of the same type, the plane anomaly is comprehensively analyzed for the situation with the same abnormal scanning area, and the scanning difficulty of each abnormal scanning area is obtained in combination with the distribution degree. For the more difficult scanning area, the scanning accuracy needs to be readjusted to obtain new point cloud data, so that the scanning acquisition of the part with higher scanning anomaly is more accurate, and then the size measurement is performed. The present invention improves the acquisition accuracy of point cloud data by adaptively adjusting the acquisition accuracy of different areas for the abnormal situation of point cloud data in different planes and areas, making the construction of three-dimensional models more efficient and the size measurement more accurate.

[0111] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0112] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for measuring the size of irregular parts of a CNC machine tool, characterized in that: The method comprises: Obtain point cloud data of two or more irregular parts of the same type; According to the degree of deviation between the point cloud data of the irregular parts and the expected point cloud data, the abnormal scanned parts are screened from all the irregular parts; The point cloud plane of each abnormal scanned part is obtained; according to the distribution deviation of the point cloud data in each point cloud plane of each abnormal scanned part and the distribution difference with the expected point cloud plane, the plane anomaly of each point cloud plane of each abnormal scanned part is obtained; according to the plane anomaly and connection of the point cloud plane of each abnormal scanned part, the abnormal scanning area of ​​each abnormal scanned part is obtained; According to the plane anomaly of the point cloud plane corresponding to the same abnormal scanning area in all abnormal scanning parts, and the degree of occurrence of the abnormal scanning area in all irregular parts, the scanning difficulty of the abnormal scanning area is obtained; new point cloud data of the irregular part is re-acquired according to the scanning difficulty of the abnormal scanning area; and the dimension measurement is performed based on the new point cloud data; The method for obtaining the abnormal scanning parts includes: Obtaining point cloud data of preset standard irregular parts of the same type as expected point cloud data; For any irregular part, according to the local distribution of the coordinates of the point cloud data in the irregular part in the expected point cloud data coordinates, the matching point cloud data in the irregular part is determined; According to the difference between the matching point cloud data and the expected point cloud data in the irregular part, and the amount of non-matching point cloud data, the point cloud difference of the irregular part is obtained; When the point cloud difference of the irregular part is greater than the preset abnormal point cloud threshold, the corresponding irregular part is regarded as an abnormal scanning part; The method for acquiring matching point cloud data includes: Within the preset neighborhood range of each expected point cloud data, when point cloud data of the irregular part exists, the corresponding point cloud data is used as the matching point cloud data of the irregular part; The step of obtaining the point cloud difference of the irregular part according to the difference between the matching point cloud data and the expected point cloud data in the irregular part, and the amount of non-matching point cloud data, comprises: In the irregular part, the distance between each matching point cloud data and the nearest expected point cloud data is obtained as the point cloud deviation of each matching point cloud data; Combining the point cloud deviations of all matching point cloud data in the irregular part, obtaining the point cloud deviation degree of the irregular part; Normalizing the product of the total number of non-matching point cloud data in the irregular part and the point cloud deviation to obtain the point cloud difference of the irregular part; The method for obtaining the plane anomaly includes: For any point cloud plane of any abnormal scanned part, plane fitting is performed on the point cloud data contained in the point cloud plane to obtain a fitting plane; According to the distance between each point cloud data in the point cloud plane and the fitting plane, and the change of the position distribution of each point cloud data in the point cloud plane in the fitting plane, the fitting plane difference of the point cloud plane is obtained; Obtaining a point cloud plane of expected point cloud data as the expected point cloud plane, and counting the number of coordinates of point cloud data in the point cloud plane that are not in the corresponding expected point cloud plane as the expected plane difference of the point cloud plane; Combining the expected plane difference and the fitted plane difference of the point cloud plane, the plane anomaly of the point cloud plane is obtained; The method for obtaining the fitting plane difference includes: The shortest distance from each point cloud data in the point cloud plane to the fitting plane is obtained as the fitting distance of each point cloud data in the point cloud plane; the fitting chaos degree of the point cloud plane is obtained according to the numerical chaos degree of the fitting distance of all the point cloud data in the point cloud plane; Acquire the central point cloud data in the point cloud plane; use the distance variance of all the point cloud data in the point cloud plane from the central point cloud data as the position distribution of the point cloud plane; The projection points of all the point cloud data contained in the point cloud plane in the fitting plane are used as the projection data in the fitting plane; Obtain the central projection data of the projection data in the fitting plane; use the distance variance of all the projection data in the fitting plane from the central projection data as the position distribution of the fitting plane; The difference in position distribution between the point cloud plane and the fitting plane is used as the position change degree of the point cloud plane; The fitting plane difference of the point cloud plane is obtained by combining the fitting chaos and position variation of the point cloud plane; the fitting chaos and position variation are both positively correlated with the fitting plane difference; The method for acquiring the abnormal scanning area includes: In each abnormal scanned part, when there is a point cloud plane with a plane anomaly greater than a preset plane threshold, the corresponding point cloud plane is regarded as an abnormal plane; In the abnormal scanning part, each abnormal plane is regarded as an abnormal scanning area. When there are intersections between abnormal scanning areas, the intersecting abnormal scanning areas are merged into one abnormal scanning area, and the merging is iterated until there are no intersecting abnormal scanning areas in the abnormal scanning part. The method of reacquiring new point cloud data of the irregular part according to the scanning difficulty of the abnormal scanning area includes: In irregular parts, when the scanning difficulty of an abnormal scanning area is greater than a preset difficulty threshold, the corresponding abnormal scanning area is recorded as a high-difficulty area; For difficult areas, rescan and collect data by presetting high-precision scanning parameters to obtain new point cloud data corresponding to irregular parts.

2. The method for measuring the size of irregular parts of a CNC machine tool according to claim 1, characterized in that: The method for obtaining the scanning difficulty includes: Count the number of times each abnormal scanning area appears in the abnormal scanning part as the scanning abnormality frequency of each abnormal scanning area; In each abnormal scanning part, the abnormality of all point cloud planes in each abnormal scanning area is combined to obtain the abnormality degree of each abnormal scanning area; the average of the abnormality degrees of the same abnormal scanning area in all abnormal scanning parts is taken as the scanning abnormality degree of the corresponding abnormal scanning area; The scanning difficulty of each abnormal scanning area is obtained by combining the scanning abnormality frequency and the scanning abnormality degree of each abnormal scanning area.

3. The method for measuring the size of irregular parts of a CNC machine tool according to claim 1, characterized in that: The point cloud plane is obtained by a plane detection algorithm.