为了解决当前目标匹配算法存在计算耗时高,以及对旋转缩放目标定位不准的问题,文章提出了基于金字塔图像结构与Hu矩的螺丝目标匹配算法。首先,建立图像金字塔模型,成比例降低测试图像和模板图像的分辨率,减小模板遍历的计算量。然后,在测试图像中逐像素移动模板图像,计算平方差归一化匹配度函数,得到匹配坐标。最后,基于Canny边缘检测得到模板目标轮廓与测试图像中疑似螺丝目标边缘轮廓,并计算两个轮廓的Hu矩,利用Hu矩抗缩放旋转干扰的特性,完成形状度匹配。实验测试结果显示:与当前匹配算法相比,文中算法对螺丝匹配定位拥有更高的实时性和精准度。
In order to solve the current target matching algorithm,computing time and the rotating zoom interfere with sensitive problem,is proposed in this paper,and based on pyramid structure and Hu moment of target image matching algorithm. First,image pyramid model,is proportional to the test image and the template image resolution,decrease the template traversal calculation. Then,in a test image pixels mobile template image,calculate the normalized matching degree function,matched coordinates. Finally,based on Canny edge detection template target outline of suspected targets in images with the test outline,and calculate the two contour Hu moment,using Hu moment zooming rotation interference characteristics,to complete the degree of shape matching. Test results show that compared with the traditional matching algorithms in terms of operational efficiency and the rotating zoom interference,this algorithm has a higher real-time and accuracy.