CN104484508B - Optimizing method for noncontact three-dimensional matching detection of complex curved-surface part - Google Patents
Optimizing method for noncontact three-dimensional matching detection of complex curved-surface part Download PDFInfo
- Publication number
- CN104484508B CN104484508B CN201410699839.9A CN201410699839A CN104484508B CN 104484508 B CN104484508 B CN 104484508B CN 201410699839 A CN201410699839 A CN 201410699839A CN 104484508 B CN104484508 B CN 104484508B
- Authority
- CN
- China
- Prior art keywords
- point
- point cloud
- matching
- dimensional
- curved surface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Length Measuring Devices With Unspecified Measuring Means (AREA)
- Image Processing (AREA)
Abstract
本发明公开了一种复杂曲面零件非接触式三维匹配检测优化方法,包括:对待检测的复杂曲面零件CAD模型与扫描模型执行采样;将复杂曲面零件CAD模型与扫描模型执行重心对齐;计算复杂曲面CAD模型与扫描模型之间的对应点对;基于布谷鸟算法得到转换矩阵;根据转换矩阵更新复杂曲面零件的扫描模型;复杂曲面零件扫描模型与CAD模型之间执行匹配误差计算,并执行迭代更新。通过本发明,能够有效解决现有技术中计算收敛速度慢、且易陷入局部最优的问题,并尤其适用于大型复杂曲面零件如航空发动机叶片的高精度质量检测用途。
The invention discloses a method for non-contact three-dimensional matching detection and optimization of complex curved surface parts, which includes: sampling the CAD model of the complex curved surface part to be detected and the scanning model; aligning the center of gravity between the CAD model of the complex curved surface part and the scanning model; calculating the complex curved surface Corresponding point pairs between the CAD model and the scanned model; the conversion matrix is obtained based on the cuckoo algorithm; the scanned model of the complex curved surface part is updated according to the conversion matrix; the matching error calculation is performed between the scanned model of the complex curved surface part and the CAD model, and an iterative update is performed . The present invention can effectively solve the problems of slow calculation convergence speed and easy to fall into local optimum in the prior art, and is especially suitable for high-precision quality inspection of large complex curved surface parts such as aeroengine blades.
Description
技术领域technical field
本发明属于零件加工及检测技术领域,更具体地,涉及一种复杂曲面零件非接触式三维匹配检测优化方法。The invention belongs to the technical field of part processing and detection, and more specifically relates to a non-contact three-dimensional matching detection optimization method for complex curved surface parts.
背景技术Background technique
目前,对于较高精度的复杂曲面零件检测主要有两类方法:接触式测量法和非接触式测量法。接触式测量采用传统的三坐标测量机对零件进行逐点采样,测量精度较高,但该方法测量效率低,而且对被测零件的材质有特殊要求。随着计算机视觉及模式识别技术的不断发展,非接触式测量技术以其较高的测量速度和精度在复杂曲面零件检测领域得到越来越广泛的应用。At present, there are mainly two types of methods for the detection of complex curved surface parts with higher precision: contact measurement method and non-contact measurement method. The contact measurement adopts the traditional three-coordinate measuring machine to sample the parts point by point, and the measurement accuracy is high, but the measurement efficiency of this method is low, and there are special requirements for the material of the measured parts. With the continuous development of computer vision and pattern recognition technology, non-contact measurement technology has been more and more widely used in the field of detection of complex curved surface parts due to its high measurement speed and accuracy.
非接触式测量利用光学扫描仪获得不同角度的扫描点集,然后对这些点集进行拼合,得到完整的零件扫描点集,通过扫描点集与CAD模型点集匹配分析获得零件的误差信息。在标准的检测环节,一般主要考虑加工误差,却忽略了测量误差对检测结果的影响;事实上,但是如果匹配本身的误差并没有达到理想的数量级,则会得到错误的测量结果,尤其在高精度复杂曲面零件的匹配检测过程中更要使匹配误差降到最低。Non-contact measurement uses an optical scanner to obtain scanning point sets at different angles, and then stitches these point sets together to obtain a complete part scanning point set, and obtains the error information of the part through the matching analysis of the scanning point set and the CAD model point set. In the standard detection process, the processing error is generally considered, but the influence of the measurement error on the detection result is ignored; in fact, if the error of the matching itself does not reach the ideal order of magnitude, the wrong measurement result will be obtained, especially at high In the matching detection process of precision complex curved surface parts, it is necessary to minimize the matching error.
现有技术中的匹配检测技术应用最为广泛的是Besl等人于1992年提出的ICP(Iterative Closest Point)算法,美国Geomagic公司著名的Geomagic Studio软件以及斯坦福大学开发的Scanalyze软件都是基于ICP算法实现点集匹配。但是,ICP算法在执行匹配时对两片点云的初始位置有要求,即在算法执行前需对两片点集进行粗匹配操作,且该算法利用奇异值分解或四元数法获得刚体变换矩阵,容易陷入局部最优,对一些复杂的模型不能保证得到匹配的最优解。CN101847262A公布了一种快速三维点云搜索匹配法,匹配过程包括低精度搜索和高精度搜索,相应增加了算法的复杂性;CN102034104A公布了一种三维点云中基于随机采样一致性的特征线检测方法,该方法的关键环节是获得点云的特征线,但对一些尖锐特征不明显或曲率变化比较平滑的零件,该检测方法同样存在较大误差。The most widely used matching detection technology in the prior art is the ICP (Iterative Closest Point) algorithm proposed by Besl et al. in 1992. The famous Geomagic Studio software of the American Geomagic Company and the Scanalyze software developed by Stanford University are all based on the ICP algorithm. Point set matching. However, the ICP algorithm has requirements for the initial positions of the two point clouds when performing the matching, that is, it needs to perform a rough matching operation on the two point sets before the algorithm is executed, and the algorithm uses singular value decomposition or quaternion method to obtain the rigid body transformation matrix, it is easy to fall into local optimum, and it is not guaranteed to get the matching optimal solution for some complex models. CN101847262A discloses a fast three-dimensional point cloud search and matching method. The matching process includes low-precision search and high-precision search, which increases the complexity of the algorithm accordingly; CN102034104A discloses a feature line detection based on random sampling consistency in a three-dimensional point cloud method, the key link of this method is to obtain the feature line of the point cloud, but for some parts whose sharp features are not obvious or the curvature changes are relatively smooth, this detection method also has a large error.
发明内容Contents of the invention
针对现有技术的以上缺陷或改进需求,本发明提供了一种复杂曲面零件非接触式三维匹配检测优化方法,其中通过结合复杂曲面零件自身的结构特点,采用优化后的布谷鸟算法来设计其三维匹配检测工艺同时对其关键工艺流程进行改进,测试表明能够有效解决现有技术中收敛速度慢、且易陷入局部最优的问题,并尤其适用于大型复杂曲面零件如航空发动机叶片的高精度质量检测用途。Aiming at the above defects or improvement needs of the prior art, the present invention provides a non-contact three-dimensional matching detection optimization method for complex curved surface parts, in which the optimized cuckoo algorithm is used to design the complex curved surface parts by combining their own structural characteristics The three-dimensional matching detection process improves its key process at the same time. The test shows that it can effectively solve the problems of slow convergence and easy to fall into local optimum in the existing technology, and is especially suitable for high precision of large complex curved surface parts such as aeroengine blades. Quality testing purposes.
为实现上述目的,按照本发明的一个方面,提供了一种复杂曲面零件非接触式三维匹配检测优化方法,其特征在于,该方法包括下列步骤:In order to achieve the above object, according to one aspect of the present invention, a non-contact three-dimensional matching detection optimization method for parts with complex curved surfaces is provided, which is characterized in that the method includes the following steps:
(a)对待检测的复杂曲面零件执行首次扫描以获得多个三维测量点,然后对对三维测量点及对应的CAD模型离散点分别二次采样进行精简,由此获得作为匹配比较对象的两片点云;此外,将对应CAD模型的点云设定为对应零件的测量点云设定为其中j=1,...,nq,i=1,...,np,nq、np分别表示点云Q和点云P的点的总数;(a) Perform the first scan of the complex surface part to be detected to obtain multiple 3D measurement points, and then simplify the sub-sampling of the 3D measurement points and the corresponding discrete points of the CAD model, thereby obtaining two pieces as matching comparison objects point cloud; in addition, set the point cloud corresponding to the CAD model as The measurement point cloud of the corresponding part is set as Where j=1,...,n q , i=1,...,n p , n q , n p represent the total number of points in point cloud Q and point cloud P respectively;
(b)基于以下公式(一)和(二)分别计算出两片点云Q、P各自的重心和然后将两片点云移动至同一XYZ坐标系下,并将其各自的重心与坐标原点相重合,其中分别表示两片点云Q、P中的各个点,且每个点以三维坐标值的形式表示:(b) Calculate the respective centers of gravity of the two point clouds Q and P based on the following formulas (1) and (2) with Then move the two point clouds to the same XYZ coordinate system, and coincide their respective centers of gravity with the coordinate origin, where Represent each point in the two point clouds Q and P respectively, and each point is expressed in the form of a three-dimensional coordinate value:
(一) (one)
(二) (two)
(c)保持点云Q固定不动,依次遍历点云P中的每一个点,在点云Q中寻找相对距离最近的点作为对应点,进而形成点对,即使得与相对应;(c) Keep the point cloud Q fixed, traverse each point in the point cloud P in turn, find the point with the closest relative distance in the point cloud Q as the corresponding point, and then form a point pair, that is, and Corresponding;
(d)基于布谷鸟算法,在上述XYZ坐标系内将点云P以绕着xyz三轴执行角度旋转和沿着xyz三轴执行距离平移的方式,随机生成6个变量,然后将其进行编码作为个体并组成布谷鸟种群;接着,在进行迭代计算时,对个体进行解码生成包含旋转矩阵和平移矩阵两部分的转换矩阵其中旋转矩阵表示点云P分别沿着所述xyz三轴执行角度旋转而获得的3行×3列的旋转矩阵,平移矩阵表示点云P分别沿着所述xyz三轴执行距离平移所获得的3行×1列的平移向量,然后,依照下列的函数式(三)对点云P执行更新:(d) Based on the cuckoo algorithm, in the above-mentioned XYZ coordinate system, the point cloud P is rotated around the xyz three-axis and the distance is translated along the xyz three-axis, randomly generates 6 variables, and then encodes them As an individual and form a cuckoo population; then, when performing iterative calculations, decode the individual to generate a rotation matrix containing and translation matrix Two-Part Transformation Matrix where the rotation matrix Represents the rotation matrix and translation matrix of 3 rows × 3 columns obtained by performing angular rotation along the xyz three axes of the point cloud P Represents the translation vector of 3 rows × 1 column obtained by performing distance translation along the xyz three axes of the point cloud P, and then updates the point cloud P according to the following functional formula (3):
(三) (three)
(e)基于以下公式(四)计算点云P与点云Q之间的匹配误差值ER:(e) Calculate the matching error value ER between point cloud P and point cloud Q based on the following formula (4):
(四) (Four)
其中,表示点云Q中与点距离最近的对应点,且每个点以三维坐标值的形式表示;||X||表示对X取绝对值;并且当计算出的匹配误差值大于预设的匹配阈值时,基于步骤(d)的函数式对点云P执行迭代更新,直至计算出的匹配误差值小于或等于所述匹配阈值时为止,并获得当前对应下的最优转换矩阵;in, Represents the points in the point cloud Q The closest corresponding point, and each point is expressed in the form of three-dimensional coordinates; ||X|| represents the absolute value of X; and when the calculated matching error value is greater than the preset matching threshold, based on step (d ) function iteratively updates the point cloud P until the calculated matching error value is less than or equal to the matching threshold, and obtains the optimal transformation matrix under the current correspondence;
(f)基于步骤(e)所得到的当前最优转换矩阵对点云P进行更新,然后同样基于所述公式(四)来计算更新后的点云P与点云Q之间的匹配误差值,并且当计算出的匹配误差值大于所述匹配阈值时,返回至步骤(c)重新计算点云Q与点云P的对应点对,并继续进行循环,直至计算出的匹配误差值小于或等于所述匹配阈值时为止,由此完成整个的三维匹配检测优化过程。(f) update the point cloud P based on the current optimal transformation matrix obtained in step (e), and then calculate the matching error value between the updated point cloud P and point cloud Q based on the formula (4) , and when the calculated matching error value is greater than the matching threshold, return to step (c) to recalculate the corresponding point pairs of point cloud Q and point cloud P, and continue to loop until the calculated matching error value is less than or When it is equal to the matching threshold, the entire three-dimensional matching detection optimization process is thus completed.
作为进一步优选地,在步骤(a)中,利用近似模型理论来执行所述二次采样。As a further preference, in step (a), the sub-sampling is performed using approximate model theory.
作为进一步优选地,在步骤(c)中,优选采用K-D树法来加速对两片点云Q、P之间点对的寻找。As a further preference, in step (c), the K-D tree method is preferably used to speed up the search for point pairs between the two point clouds Q and P.
作为进一步优选地,所述复杂曲面零件优选为航空发动机叶片。As a further preference, the complex curved surface part is preferably an aeroengine blade.
按照本发明的另一方面,还提供了另外一种复杂曲面零件非接触式三维匹配检测优化方法,其特征在于,该方法包括下列步骤:According to another aspect of the present invention, another non-contact three-dimensional matching detection optimization method for parts with complex curved surfaces is provided, which is characterized in that the method includes the following steps:
(i)对待检测的复杂曲面零件执行首次扫描以获得多个三维测量点,然后对三维测量点及对应的CAD模型离散点分别二次采样进行精简,由此获得作为匹配比较对象的两片点云;此外,将对应CAD模型的点云设定为对应复杂曲面零件的测量点云设定为其中j=1,...,nq,i=1,...,np,nq、np分别表示点云Q和点云P的点的总数;(i) Perform the first scan of the complex surface part to be detected to obtain multiple 3D measurement points, and then resample the 3D measurement points and the corresponding discrete points of the CAD model to simplify, thereby obtaining two pieces of points as matching comparison objects cloud; in addition, the point cloud corresponding to the CAD model is set as The measurement point cloud corresponding to the complex surface part is set as Where j=1,...,n q , i=1,...,n p , n q , n p represent the total number of points in point cloud Q and point cloud P respectively;
(ii)基于以下公式(一)和(二)分别计算出两片点云Q、P各自的重心和然后将两片点云移动至同一XYZ坐标系下,并将其各自的重心与坐标原点相重合,其中分别表示两片点云Q、P中的各个点,且每个点以三维坐标值的形式表示:(ii) Calculate the respective centers of gravity of the two point clouds Q and P based on the following formulas (1) and (2) with Then move the two point clouds to the same XYZ coordinate system, and coincide their respective centers of gravity with the coordinate origin, where Represent each point in the two point clouds Q and P respectively, and each point is expressed in the form of a three-dimensional coordinate value:
(一) (one)
(二) (two)
(iii)保持点云Q固定不动,依次遍历点云P中的每一个点,在点云Q中寻找相对距离最近的点作为对应点,进而形成点对,即使得与相对应;(iii) Keep the point cloud Q fixed, traverse each point in the point cloud P in turn, find the point with the closest relative distance in the point cloud Q as the corresponding point, and then form a point pair, that is, and Corresponding;
(iv)基于布谷鸟算法,在上述XYZ坐标系内将点云P以绕着xyz三轴执行角度旋转和沿着xyz三轴执行距离平移的方式,随机生成6个变量,然后将其进行编码作为个体并组成布谷鸟种群;接着,在进行迭代计算时,对个体进行解码生成包含旋转矩阵和平移矩阵两部分的转换矩阵其中旋转矩阵表示点云P分别沿着所述XYZ坐标系的xyz三轴执行角度旋转而获得的3行×3列的旋转矩阵,平移矩阵表示点云P分别沿着所述XYZ坐标系的xyz三轴执行距离平移所获得的3行×1列的平移向量,然后,依照下列的函数式(三)对点云P执行更新:(iv) Based on the cuckoo algorithm, in the above-mentioned XYZ coordinate system, the point cloud P is rotated around the xyz three-axis and the distance is translated along the xyz three-axis, randomly generates 6 variables, and then encodes them As an individual and form a cuckoo population; then, when performing iterative calculations, decode the individual to generate a rotation matrix containing and translation matrix Two-Part Transformation Matrix where the rotation matrix Represents the rotation matrix and translation matrix of 3 rows × 3 columns obtained by performing angular rotation along the xyz three axes of the XYZ coordinate system respectively. Represents the translation vector of 3 rows × 1 column obtained by performing distance translation along the xyz three axes of the XYZ coordinate system respectively, and then updates the point cloud P according to the following functional formula (3):
(三) (three)
(v)基于以下公式(四)计算点云P与点云Q之间的匹配误差值ER:(v) Calculate the matching error value ER between point cloud P and point cloud Q based on the following formula (4):
(四) (Four)
其中,表示点云Q中与点距离最近的对应点,且每个点以三维坐标值的形式表示;||X||表示对X取绝对值;并且当计算出的匹配误差值大于预设的匹配阈值时,基于步骤(iv)的所述函数式对点云P执行迭代更新,并返回至步骤(iii)重新计算点云Q与点云P的对应点对,然后继续进行循环,直至计算出的匹配误差值小于或等于所述匹配阈值时为止,由此完成整个的三维匹配检测优化过程。in, Represents the points in the point cloud Q The closest corresponding point, and each point is expressed in the form of a three-dimensional coordinate value; ||X|| represents the absolute value of X; and when the calculated matching error value is greater than the preset matching threshold, based on step (iv ) performs an iterative update on point cloud P, and returns to step (iii) to recalculate the corresponding point pairs between point cloud Q and point cloud P, and then continue to loop until the calculated matching error value is less than or equal to When the matching threshold is reached, the entire three-dimensional matching detection optimization process is thus completed.
总体而言,通过本发明所构思的以上技术方案与现有技术相比,主要具备以下的技术优点:Generally speaking, compared with the prior art, the above technical solution conceived by the present invention mainly has the following technical advantages:
1、通过采用优化后的布谷鸟算法来设计复杂曲面零件的三维匹配检测工艺,可以充分利用其收敛速度快、鲁棒性好和不易陷入局部最优的特点,测试表明能够获得高精度和高效率的三维匹配结果;1. By adopting the optimized cuckoo algorithm to design the three-dimensional matching detection process of complex surface parts, it can make full use of its characteristics of fast convergence speed, good robustness and not easy to fall into local optimum. The test shows that it can obtain high precision and high precision. 3D matching results of efficiency;
2、尤其是,通过对具体工艺流程中设计角度旋转变量和距离平移变量作为个体来构成种群,同时对其特定优化策略进行设计,相应能够贴合复杂曲面零件自身的结构特点,同时对点云初始位置没有要求,在执行算法前不必进行粗匹配操作,而且能够进一步提高匹配检测的精度和效率;2. In particular, the design angle rotation variable and distance translation variable in the specific process flow are used as individuals to form a population, and its specific optimization strategy is designed at the same time, which can fit the structural characteristics of complex curved surface parts. At the same time, the point cloud There is no requirement for the initial position, and there is no need to perform a rough matching operation before executing the algorithm, and it can further improve the accuracy and efficiency of matching detection;
3、由于在匹配操作之前利用近似模型理论对两片点集进行二次采样,相应可以在降低模型的复杂度的同时确保匹配结果的精度;此外,通过匹配操作之前执行两片点集重心对齐操作,可有效减少了计算平移矩阵的计算量;3. Since the approximate model theory is used to resample the two point sets before the matching operation, the accuracy of the matching result can be ensured while reducing the complexity of the model; in addition, the center of gravity of the two point sets is aligned before the matching operation operation, which can effectively reduce the calculation amount of calculating the translation matrix;
4、本发明中特别提出了具备内、外两层循环结构的优化策略,其中内层循环可得到当前对应情况下最优的转换矩阵,而当内层循环结束后,外层循环给出一种新的点对对应情况,重复执行内层循环直到外层循环满足终止条件,测试表明该优化策略能够显著达到点云点对在空间位置上的差异最小化,相应进一步提高三维匹配检测的结果精度。4. In the present invention, an optimization strategy with inner and outer loop structures is specially proposed, wherein the inner loop can obtain the optimal transformation matrix under the current corresponding situation, and when the inner loop ends, the outer loop gives a A new point pair correspondence situation, the inner loop is repeatedly executed until the outer loop meets the termination condition. The test shows that this optimization strategy can significantly minimize the difference in the spatial position of the point cloud point pair, and further improve the result of 3D matching detection. precision.
附图说明Description of drawings
图1是按照本发明所构思的非接触式三维匹配检测方法的基本流程图;Fig. 1 is the basic flowchart of the non-contact three-dimensional matching detection method conceived according to the present invention;
图2是按照本发明第一优选实施方式的检测优化流程图;Fig. 2 is a flow chart of detection optimization according to the first preferred embodiment of the present invention;
图3是按照本发明第二优选实施方式的检测优化流程图;Fig. 3 is a flow chart of detection optimization according to the second preferred embodiment of the present invention;
图4是用于示范性显示两片点集初始位置的二次采样图;FIG. 4 is a subsampling diagram for exemplary display of initial positions of two point sets;
图5是用于示范性显示两片点集重心对齐时的示意图;Fig. 5 is a schematic diagram for exemplary displaying when the centers of gravity of two point sets are aligned;
图6是用于显示按照图2中所示检测优化流程所得到的匹配结果图;Fig. 6 is a diagram for displaying matching results obtained according to the detection and optimization process shown in Fig. 2;
图7是用于显示按照图3中所示检测优化流程所得到的匹配结果图。FIG. 7 is a diagram for displaying matching results obtained according to the detection optimization process shown in FIG. 3 .
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.
在现有技术中,工件的几何测量往往是在CAD模型已知的情况下进行,通过多传感器测量系统获得工件的实际要素信息,并经过数据处理抽取出需要的几何轮廓,通过与CAD模型进行匹配检测,最终完成误差的判定。匹配检测是寻找两个图像点集间一种最优的刚体变换,使得一个图像点集中的每个点与另一点集中的对应点匹配,相应降低测量误差对零件检测结果的影响。In the existing technology, the geometric measurement of the workpiece is often carried out when the CAD model is known. The actual element information of the workpiece is obtained through the multi-sensor measurement system, and the required geometric contour is extracted through data processing. Match detection, and finally complete the judgment of the error. Matching detection is to find an optimal rigid body transformation between two image point sets, so that each point in one image point set matches the corresponding point in the other point set, and correspondingly reduces the influence of measurement errors on the part detection results.
因此,针对工件尤其是复杂曲面零件的三维匹配检测问题,考虑到布谷鸟算法基于Lévy飞行原理对解空间进行搜素,具有良好的全局寻优能力。本发明从点集几何形状入手,通过优化后的布谷鸟算法迭代,搜索两点集间最优的旋转和平移矩阵,相应可达到收敛速度快,鲁棒性好,适合高精度复杂曲面零件的三维匹配检测等效果。Therefore, for the three-dimensional matching detection of workpieces, especially complex curved parts, considering that the cuckoo algorithm searches the solution space based on the Lévy flight principle, it has good global optimization capabilities. The present invention starts from the geometric shape of the point set, and searches for the optimal rotation and translation matrix between two point sets through the iteration of the optimized cuckoo algorithm, which can achieve fast convergence speed and good robustness, and is suitable for high-precision complex curved surface parts. 3D matching detection and other effects.
图1是按照本发明所构思的非接触式三维匹配检测方法的基本流程图,下面我们将以为某型号航空发动机叶片模型为例来进行具体说明。Fig. 1 is a basic flow chart of the non-contact three-dimensional matching detection method conceived according to the present invention. Below we will take a certain type of aeroengine blade model as an example for specific description.
首先,对待检测的航空发动机叶片模型执行首次扫描以获得多个三维测量点,为了简化分析,可利用近似模型理论对扫描模型进行二次采样进行精简,譬如为易于理解两个模型都取1000个点进行分析(当然,实际情况中分析点的数量不相等也是可行的),由此获得作为匹配比较对象的两片点云;此外,可以将对应CAD模型的点云设定为对应复杂曲面零件的点云设定为其中i=1,...,1000,这里j与i相等,精简后的点集如图4所示,图中实点点集为CAD模型,空心圆点集为复杂曲面零件的扫描模型。First, perform the first scan of the aero-engine blade model to be tested to obtain multiple 3D measurement points. In order to simplify the analysis, the approximate model theory can be used to simplify the scanning model by subsampling. For example, 1000 points are taken for both models for easy understanding. point analysis (of course, it is also feasible that the number of analysis points is not equal in the actual situation), thus obtaining two point clouds as matching comparison objects; in addition, the point cloud corresponding to the CAD model can be set as The point cloud corresponding to the complex surface part is set as Where i=1,...,1000, where j is equal to i, the simplified point set is shown in Figure 4, the solid point set in the figure is the CAD model, and the hollow circle point set is the scanning model of the complex curved surface part.
接着,可基于以下公式(一)和(二)分别计算出两片点云Q、P各自的重心和然后将两片点云移动至同一XYZ坐标系下,并将其各自的重心与坐标原点相重合,其中分别表示两片点云Q、P中的各个点,且每个点以三维坐标值的形式表示:Then, the respective centers of gravity of the two point clouds Q and P can be calculated based on the following formulas (1) and (2) with Then move the two point clouds to the same XYZ coordinate system, and coincide their respective centers of gravity with the coordinate origin, where Represent each point in the two point clouds Q and P respectively, and each point is expressed in the form of a three-dimensional coordinate value:
(一) (one)
(二) (two)
重心对齐后的两片点云如图5中所示。The two point clouds after the center of gravity are aligned are shown in Fig. 5.
接着,保持点云Q固定不动,依次遍历点云P中的每一个点,在点云Q中寻找相对距离最近的点作为对应点,进而形成点对,即使得与相对应;Then, keep the point cloud Q fixed, traverse each point in the point cloud P in turn, and find the point with the closest relative distance in the point cloud Q as the corresponding point, and then form a point pair, that is, and Corresponding;
接着,基于布谷鸟算法,在上述XYZ坐标系内随机生成绕xyz坐标轴旋转的三个变量和绕xyz坐标轴平移的三个变量,对这个六个变量进行编码作为个体并组成布谷鸟种群;换而言之,也即对点云P在执行角度旋转和距离平移的方式来随机获得变量,并对这6个变量执行编码组成布谷鸟种群的个体;接着,进行迭代计算时,对个体进行解码生成包含旋转矩阵和平移矩阵两部分的转换矩阵其中旋转矩阵表示点云P分别沿着所述XYZ坐标系的xyz三轴执行角度旋转而获得的3×3的旋转矩阵,平移矩阵表示点云P分别沿着所述XYZ坐标系的xyz三轴执行距离平移所获得的3×1的平移向量,举例而言,为检测本发明的匹配精度,譬如可以将以复杂曲面零件的扫描模型分别绕xyz坐标轴依次旋转20度,依次平移100毫米,然后与CAD模型进行匹配操作。其中,对P中的所有点进行更新,式(三)表示点云P更新后的表示形式:Next, based on the cuckoo algorithm, randomly generate three variables that rotate around the xyz coordinate axis and three variables that translate around the xyz coordinate axis in the above-mentioned XYZ coordinate system, encode these six variables as individuals and form a cuckoo population; In other words, the variables are randomly obtained by performing angle rotation and distance translation on the point cloud P, and these six variables are encoded to form the individuals of the cuckoo population; then, when performing iterative calculations, the individuals are Decoding generates a rotation matrix and translation matrix Two-Part Transformation Matrix where the rotation matrix Represents the 3×3 rotation matrix and translation matrix obtained by performing angle rotation along the xyz three axes of the XYZ coordinate system respectively for the point cloud P Represents the 3×1 translation vector obtained by performing distance translation along the xyz three axes of the XYZ coordinate system respectively. For example, in order to test the matching accuracy of the present invention, for example, the scanning The model is rotated 20 degrees around the xyz coordinate axis, translated 100 mm in turn, and then matched with the CAD model. Among them, all points in P are updated, and formula (3) represents the updated representation of point cloud P:
(三) (three)
上式即表示利用布谷鸟算法得到的转换矩阵对复杂曲面零件扫描模型进行更新操作。The above formula means that the transformation matrix obtained by the cuckoo algorithm is used to update the scanning model of the complex surface part.
本发明中优选可采用K-D树法加速两片点集间对应点对的寻找,假设经计算后点云Q中与点云P中的相对应,则可利用下式(四)进行匹配误差ER的计算:In the present invention, it is preferable to use the KD tree method to accelerate the search for corresponding point pairs between two point sets, assuming that after calculation, in the point cloud Q and in the point cloud P Correspondingly, the following formula (4) can be used to calculate the matching error ER:
(四) (Four)
其中,表示CAD模型中与扫描模型中点距离最近的对应点,且每个点以三维坐标值的形式表示,分别表示点云P分别沿着所述XYZ坐标系的xyz三轴执行角度旋转和距离平移而获得的3×3的旋转矩阵和3×1的平移向量,||X||表示对X取绝对值;本发明的循环终止条件可设定为计算出的匹配误差小于或等于预设的匹配阈值时为止,当然也可以设定为当迭代次数等于指定的循环次数。in, Indicates in the CAD model and in the scanned model The point is the closest corresponding point, and each point is expressed in the form of a three-dimensional coordinate value, Represents the 3×3 rotation matrix and 3×1 translation vector obtained by performing angular rotation and distance translation along the xyz three axes of the XYZ coordinate system respectively, and ||X|| represents the absolute value of X value; the loop termination condition of the present invention can be set until the calculated matching error is less than or equal to the preset matching threshold, and of course it can also be set when the number of iterations is equal to the specified number of loops.
图2和图3分别显示了按照本发明的两种优选实施方式所制定的优化策略。Figure 2 and Figure 3 respectively show the optimization strategies formulated according to two preferred embodiments of the present invention.
对于图2所示的优化策略,迭代过程中有内、外两层循环结构,内层循环的目的是得到当前对应情况下最优的转换矩阵,内层循环结束后,外层循环给出一种新的点对对应情况,重复执行内层循环,直到外层循环满足终止条件,具体而言也即:当计算出的匹配误差值大于预设的匹配阈值时,基于优化函数模型对种群执行迭代更新,直至计算出的匹配误差值小于或等于所述匹配阈值时为止,并获得当前对应的最优转换矩阵;接着,基于所得到的当前最优转换矩阵对点云P进行更新,然后同样基于匹配误差计算公式来计算更新后的点云P与点云Q之间的匹配误差值,并且当计算出的匹配误差值大于所述匹配阈值时,返回至点对寻找步骤重新计算两片点云的对应关系,继续进行外部循环,直至计算出的匹配误差值小于或等于所述匹配阈值时为止,由此完成整个的三维匹配检测优化过程。For the optimization strategy shown in Figure 2, there are inner and outer loop structures in the iterative process. The purpose of the inner loop is to obtain the optimal transformation matrix under the current corresponding situation. After the inner loop ends, the outer loop gives a A new point-to-correspondence situation, the inner loop is repeatedly executed until the outer loop meets the termination condition, specifically: when the calculated matching error value is greater than the preset matching threshold, the population is executed based on the optimization function model Update iteratively until the calculated matching error value is less than or equal to the matching threshold, and obtain the current corresponding optimal transformation matrix; then, update the point cloud P based on the obtained current optimal transformation matrix, and then similarly Calculate the matching error value between the updated point cloud P and point cloud Q based on the matching error calculation formula, and when the calculated matching error value is greater than the matching threshold, return to the point pair search step to recalculate the two points The corresponding relationship between clouds continues to perform an external loop until the calculated matching error value is less than or equal to the matching threshold, thereby completing the entire three-dimensional matching detection optimization process.
而对于图3所示的优化策略,迭代过程中只有一层循环结构,具体也即:对布谷鸟种群执行初始化,并基于匹配误差计算公式来计算点云P与点云Q之间的匹配误差值ER,并且当计算出的匹配误差值大于预设的匹配阈值时,基于所述优化函数模型对种群执行迭代更新,并直接返回至点对寻找的步骤进行循环,直至计算出的匹配误差值小于或等于所述匹配阈值时为止,由此完成整个的三维匹配检测优化过程。For the optimization strategy shown in Figure 3, there is only one layer of cyclic structure in the iterative process, specifically: initialize the cuckoo population, and calculate the matching error between point cloud P and point cloud Q based on the matching error calculation formula value ER, and when the calculated matching error value is greater than the preset matching threshold value, iteratively update the population based on the optimization function model, and directly return to the point to find the steps to cycle until the calculated matching error value When it is less than or equal to the matching threshold, the entire three-dimensional matching detection optimization process is thus completed.
基于以上两种优化策略的匹配结果分别如图6和图7所示,图中用实点点集表示CAD模型,用空心圆点集表示扫描模型,两点集中每个点的重合度越高表示匹配效果越好。从图6和图7的匹配结果可以看出,本发明提出的两种优化策略均可以获得较高精度的匹配结果,可以最大限度地降低测量误差对零件检测结果的影响;尤其是,内外两层循环的优化策略能够显著达到点云点对在空间位置上的差异最小化,相应进一步提高三维匹配检测的结果精度。The matching results based on the above two optimization strategies are shown in Figure 6 and Figure 7, respectively. In the figure, the CAD model is represented by the solid point set, and the scanning model is represented by the hollow circle point set. The higher the coincidence degree of each point in the two point sets, the The better the match. It can be seen from the matching results in Fig. 6 and Fig. 7 that both the two optimization strategies proposed by the present invention can obtain higher-precision matching results, and can minimize the influence of measurement errors on the part detection results; especially, the inner and outer two The optimization strategy of the layer cycle can significantly minimize the difference in the spatial position of the point cloud point pairs, and correspondingly further improve the accuracy of the 3D matching detection results.
本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。It is easy for those skilled in the art to understand that the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, All should be included within the protection scope of the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410699839.9A CN104484508B (en) | 2014-11-26 | 2014-11-26 | Optimizing method for noncontact three-dimensional matching detection of complex curved-surface part |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410699839.9A CN104484508B (en) | 2014-11-26 | 2014-11-26 | Optimizing method for noncontact three-dimensional matching detection of complex curved-surface part |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104484508A CN104484508A (en) | 2015-04-01 |
CN104484508B true CN104484508B (en) | 2017-05-10 |
Family
ID=52759049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410699839.9A Active CN104484508B (en) | 2014-11-26 | 2014-11-26 | Optimizing method for noncontact three-dimensional matching detection of complex curved-surface part |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104484508B (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105872729A (en) * | 2015-04-21 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Method and device for identification of operation event |
CN104867136B (en) * | 2015-05-06 | 2017-06-16 | 华中科技大学 | A kind of workpiece point cloud matching algorithm minimum based on distance variance |
CN105354850B (en) * | 2015-11-16 | 2016-08-17 | 华中科技大学 | Complex curved surface parts size three-dimensional matching detection method based on electric field property |
CN105719287B (en) * | 2016-01-19 | 2019-04-26 | 博众精工科技股份有限公司 | A kind of alignment method of irregular figure |
CN106354935B (en) * | 2016-08-30 | 2017-07-18 | 华中科技大学 | Complex curved surface parts matching detection method based on electron outside nucleus probability density distribution |
CN106289146A (en) * | 2016-11-08 | 2017-01-04 | 长春理工大学 | Complex curved surface parts topography measurement experimental technique |
CN107067469B (en) * | 2016-12-27 | 2022-03-22 | 中国人民解放军装甲兵工程学院 | A system for obtaining models of defective parts of damaged parts |
CN108536093B (en) * | 2018-04-09 | 2020-04-03 | 枣庄北航机床创新研究院有限公司 | Processing method for numerical control processing of complex curved surface by non-rotary tool |
CN110579180B (en) * | 2019-08-07 | 2020-12-18 | 合肥学院 | Measurement method of reflective surface parts based on optical vision and conoscopic polarization group sum |
CN110458822B (en) * | 2019-08-07 | 2022-10-11 | 合肥学院 | Non-contact three-dimensional matching detection method for complex curved surface part |
CN111156948A (en) * | 2019-12-29 | 2020-05-15 | 苏州赛腾精密电子股份有限公司 | Three-dimensional data coordinate correction method and device for 3C glass panel detection |
CN111882614A (en) * | 2020-07-30 | 2020-11-03 | 南京溧航仿生产业研究院有限公司 | KNN-ICP algorithm-based free-form surface positioning method |
CN112577447B (en) * | 2020-12-07 | 2022-03-22 | 新拓三维技术(深圳)有限公司 | Three-dimensional full-automatic scanning system and method |
CN116843729A (en) * | 2023-04-11 | 2023-10-03 | 中国石油大学(华东) | Part pre-positioning method based on point cloud surface shape feature descriptor registration algorithm |
CN117876436A (en) * | 2023-12-18 | 2024-04-12 | 哈尔滨工业大学 | Point cloud matching method and system based on regular optimal transmission model and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008153721A1 (en) * | 2007-05-29 | 2008-12-18 | Cognex Corporation | System and method for locating a three-dimensional object using machine vison |
CN101645170A (en) * | 2009-09-03 | 2010-02-10 | 北京信息科技大学 | Precise registration method of multilook point cloud |
-
2014
- 2014-11-26 CN CN201410699839.9A patent/CN104484508B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008153721A1 (en) * | 2007-05-29 | 2008-12-18 | Cognex Corporation | System and method for locating a three-dimensional object using machine vison |
CN101645170A (en) * | 2009-09-03 | 2010-02-10 | 北京信息科技大学 | Precise registration method of multilook point cloud |
Non-Patent Citations (2)
Title |
---|
二进制布谷鸟搜索算法;冯登科等;《计算机应用》;20130601;第33卷(第6期);1566-1570 * |
基于遗传算法的点云数据与CAD模型坐标归一化研究;张学昌等;《系统仿真学报》;20060930;第18卷(第9期);2497-2500 * |
Also Published As
Publication number | Publication date |
---|---|
CN104484508A (en) | 2015-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104484508B (en) | Optimizing method for noncontact three-dimensional matching detection of complex curved-surface part | |
CN106845515B (en) | Robot target identification and pose reconstruction method based on virtual sample deep learning | |
Xie et al. | A high-accuracy method for fine registration of overlapping point clouds | |
CN103955939B (en) | 3 D scanning system midpoint cloud edge feature point method for registering | |
CN105654483B (en) | The full-automatic method for registering of three-dimensional point cloud | |
CN109754459B (en) | Method and system for constructing human body three-dimensional model | |
CN106248035A (en) | The method and system that a kind of surface profile based on point cloud model accurately detects | |
CN105806315B (en) | Noncooperative target relative measurement system and measuring method based on active coding information | |
CN102622479B (en) | A Reverse Engineering CAD Modeling Method Based on 3D Sketch | |
CN104463894A (en) | Overall registering method for global optimization of multi-view three-dimensional laser point clouds | |
CN107133989A (en) | A kind of 3 D scanning system parameter calibration method | |
CN106570905B (en) | A kind of noncooperative target point cloud initial attitude verification method | |
CN106568381B (en) | A kind of line laser measuring system scaling method based on standard flat | |
CN112132752B (en) | A precise stitching method for multi-view scanning point clouds of large and complex surfaces | |
CN108801175B (en) | A kind of high-precision spatial pipeline measuring system and method | |
Oomori et al. | Point cloud matching using singular value decomposition | |
CN105354850B (en) | Complex curved surface parts size three-dimensional matching detection method based on electric field property | |
JP2012026895A (en) | Position attitude measurement device, position attitude measurement method, and program | |
CN108876862B (en) | Non-cooperative target point cloud position posture calculation method | |
CN112017293A (en) | Method for measuring geometric initial defects of round steel pipe | |
CN101847262A (en) | Fast three-dimensional point cloud searching and matching method | |
Han et al. | A double branch next-best-view network and novel robot system for active object reconstruction | |
CN109766903A (en) | A Surface Matching Method for Point Cloud Models Based on Surface Features | |
CN109559296A (en) | Medical image registration method and system based on full convolutional neural networks and mutual information | |
CN106354935B (en) | Complex curved surface parts matching detection method based on electron outside nucleus probability density distribution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |