为实现单目摄像头对一般工业零件的六自由度位姿测量,研究了离线模板库自动建立,图像处理以及优化匹配3个方面的问题。首先,由STL文件格式的CAD文件建立不同观察方位下的匹配模板,定义了一种方便模板库调用并有图像意义的位姿描述参数。然后,对Chamfer Match方法进行改进,将距离映射图按边缘倾角分层,结合模板探索点的倾角进行匹配,在不增加运算量的情况下提升匹配度函数的灵敏性。最后,使用加入了退火算法的遗传算法进行最优搜索,从而提高匹配效率。实验结果表明:基于文中的方法完成一次位姿测量耗时在500ms以内,搜索可以获到正确的结果。在330mm观察距离上,平移误差和深度方向误差分别控制在1mm、2mm以内,转角误差为1°左右。得到的结果基本满足单目视觉六自由度位姿快速匹配自动测量的要求。
To automatically and continuously estimate the 6-DOF pose of industry parts with a monocular camera,three related problems,building an off-line template library,image processing,and optimizing match,were researched.Firstly,the matching templates under different orientations were established by the CAD model in a STL(Standard Template Library)format,and a new pose parameter was defined to provide the call for a template library.Then,Chamfer Matching method was improved and the sensitivity of fitness function was improved without more time spending by layering the distance mapping map and matching the angle of template searching points.Finally,simulated annealing algorithm together with genetic algorithm was applied to the optimum searching to improve the matching efficiency in real time.The experiment result indicates that the whole match progress spends less than 500 ms,and the correct results are obtained.The translation error and the depth direct error have been kept by less than 1mm and 2mm respectively,and the rotate error is about 1°in a viewing distance of 330 mm.The result satisfies the requirements of the monocular vision system for rapid and automatic pose estimation.