针对TFDS检测系统中制动开关定位耗时较长的缺点,提出一种基于Hu不变矩的变步长匹配方法。该方法由粗匹配和精匹配组成,并根据制动开关形状设计了横向匹配的变步长计算公式。首先通过Hu不变矩计算模板图像与检测图像中模板窗口的匹配值,根据匹配值的权重来选择对应步长,并把匹配值大于设定阈值的点作为初级预选点;然后获取每个预选点邻域内的最佳匹配点,将其保存到极大值序列以搜索最大值,最终锁定制动开关所在区域。实验结果表明,该算法对尺度变换、平移以及旋转具有一定的不变性,且匹配速度大大提高,取得了良好的匹配效果。
A matching method of variable step size based on Hu invariant moments is proposed to overcome the disadvan- tage of time-consuming positioning of the braking switch in TFDS detecting system. The method consists of coarse matching and precise matching. The variable step size calculation formula for horizontal matching was designed according to the shape of the breaking switch. The matching values of the template windows in template image and detection image are calculated with Hu in- variant moments. The corresponding step size is selected according to the weight of the matching values. Those points whose matching values are greater than the given threshold are taken as the pre-selected points to get the optimal matching points in the neighborhood of each pre-selected point and then save them into the maximum sequence to search the maximum value. The region where the breaking switch lies in is located finally. The experimental results show that this algorithm has certain invariant properties in the aspects of scaling variation, translation and rotation, improves the matching speed greatly, and has obtained a good matching effect.