贾迪,杨宁华,孙劲光(辽宁工程技术大学电子与信息工程学院, 葫芦岛 125105)
目的 图像模板匹配法常用于寻找像对间区域的对应关系，目前尚存的问题有：1）随着摄影基线的增加，待匹配区域在目标影像中有效信息逐渐降低；2）匹配区域的选择对匹配结果准确性影响较大。为了解决上述问题，提出一种基于分值图的图像模板选择与匹配方法。方法 首先利用图像多通道特征，提出采用抽样矢量归一化相关算法SV-NCC （sampling vector-normalized cross correlation）度量两幅图像间区域一致性，增加多通道特征间的有效信息对比，以此降低噪声与光照对模板匹配的影响。其次，在矢量空间中对图像进行分块聚类，将模板区域根据颜色特征分为几类，统计匹配图像的每个区域类中心颜色在待匹配图像中相似数量的倒数作为度量值，其值越大则颜色或颜色组合在目标图像中相似的概率越小，以该位置为基础选取模板进行匹配的准确率越高。最后，给出依据分值图排序模板区域的方法，并选取高分值区域作为最终的模板选择区域。结果 实验采用公共数据集从两个方面对本文方法进行客观评价：1）在摄影基线变换不大的情况下，SAD与SV-NCC方法的准确率均较高，达到90%以上。随着摄影基线的增大，采用SAD方法匹配准确率降低速率更快，在第6幅Graf图像的测试中匹配准确率低于20%，而SV-NCC方法匹配准确率高于40%；2）随着摄影基线的增大，落在高分值图区域匹配的正确率高于未落在高分值图区域匹配的正确率，由此可见高分值图区域的合理选择将提高模板匹配方法的准确率，验证了本文分值图与选择最佳模板匹配位置方法的有效性。结论 该方法从定量和定性比较上都体现了较好的像对匹配能力，其匹配结果适用于影像融合、超分辨率重建及3维重建等技术中的先期处理步骤。
Template selection and matching algorithm for image matching
Jia Di,Yang Ninghua,Sun Jinguang(School of Electronic and Information Engineering,Liaoning Technical University,Huludao 125105,China)
Template matching algorithms consider all possible transformations,such as rotation,scaling,and affine transformations.Template matching algorithms are commonly used to find the corresponding image regions between image pairs.However,the two following issues negatively affect its accuracy.1) When the photography baseline increases,the effective information of the area to be matched in the target image decreases and the matching accuracy gradually decreases.2) The choice of matching areas significantly influences the matching accuracy;thus,the matching results may differ considerably by selecting different regions as matching templates.We propose a template selection and matching algorithm for image matching to resolve these problems.Method
First,sampling vector normalized cross-correlation (SV-NCC) is proposed to measure the regional consistency between two images by multichannel features.The proposed method discards two parameters,i.e.,Δs
,which play an important role in suppressing the interference of light and noise in the CSAD method but reduce matching accuracy.The NCC method is introduced using the "mean" and "cross-correlation" to inhibit the effect of light and noise to solve this problem.Template matching is conducted in Lab color space to better reduce the influence of the change in illumination.When computing the color similarity of two images,if the Euclidean distance of two color components falls in a rectangle with width w and height h,then they are considered similar colors.Coefficient proportionality λ is used to adjust the proportion of brightness similarity;thus,distinction between similar colors is obtained by controlling λL.Second,we divide the image into many blocks and use the clustering method to derive several categories in accordance with the color feature.The reciprocal of the similar number of each area is used to measure similarity.The larger this value,the smaller the probability that the color or color combination is similar to the target image.Thus,the accuracy of template matching based on this location can be high.Although density-based spatial clustering of applications with noise (DBSCAN) is used in the previously presented process,the image is divided into many blocks.Thus,no matter how large the image size is,the processing time of pixel clustering cannot substantially increase.In addition,the clustering results can exhibit a mosaic appearance but cannot affect the calculation of subsequent statistical scores.Finally,on the basis of the score map,a method for sorting the template area is proposed.These areas with high scores are selected as the final template areas.The parallel DBSCAN algorithm is also used in this research to fully utilize a multi-core CPU and reduce the computation time.For example,with an eight-core CPU,an 800×600 image with 100×100 blocks takes 2.8 s to process.Then,the computational complexity is reduced because of the fact that introducing the integral image to compute blocks can significantly reduce the processing time and can make this algorithm practical in real-life usage.Result The experiments use a 3.3 GHz,8 GB RAM,four-core CPU and are coded in MATLAB.Data from Oxford Graf,which contain six different views of the same target,and data of Pascal VOC 2010 are selected for the experiment to test the effectiveness of the proposed algorithm.The size of the template is set as 100×100,Tr=2,δ=0.25,and ℓ=0.15.Given that two important parameters that affect the experimental results should be set on the basis of experience in using the CSAD,it is unsuitable to compare with the SV-NCC,which automatically computes the similarity between the blocks.Therefore,we compare the proposed method with the SAD method directly.We evaluate the proposed method in the two following aspects.1) When the baseline of photographic changes is low,the accuracy of the SAD and SV-NCC methods are all more than 90%.However,when the baseline of photographic changes increases,the matching accuracy of SAD is reduced rapidly.In the test of the sixth Graf image,the matching accuracy is less than 20% and the accuracy of SV-NCC matching is more than 40%.2) When the baseline of photographic changes increases,the matching accuracy is higher in the regions with high scores than that in the regions with low scores.Thus,the reasonable selection of regions with high scores can improve the accuracy of template matching,and the proposed method,which selects the best template positions,is verified.Conclusion The SV-NCC method is proposed to compute the similarity between regions by use of the multichannel features of colored images to resolve the previously mentioned issues when matching wide baseline colored images.On the basis of the assumption that,the lesser the color or color combination in the images to be matched,the higher the matching accuracy,a new algorithm based on the score map is proposed to optimize the template selection and improve the matching accuracy.The experiments show that this algorithm presents a significantly high image matching accuracy for wide baseline colored images.The algorithm is also robust,making it practical,particularly in areas where colored images need to be matched with high accuracy.The algorithm can also be combined with random sample consensus to eliminate mismatched regions.Quantitative and qualitative analyses of the proposed method show that it exhibits a good performance and that its matching results are suitable for image fusion,super-resolution reconstruction,and 3D reconstruction in the advanced steps.