采用基于灰度直方图的加权模板匹配法实现摄像机的标定.首先以一个游标卡尺作为目标采集图像,此采集图像作为后续分析的同时用于模板的多处提取;提取的每个模板都将用于后续的模板匹配来提取目标区域(Region of Interest,ROI);匹配所获得的所有目标区域二值化后并旋转90°,以提取其水平方向的灰度直方图;所获得灰度直方图经过优化获得单一峰值后用于获取测量精度;最终标定出的测量精度是由所获得的所有测量精度值进行可信区间的加权平均决定的.本文所采用的加权模板匹配方法不仅降低了单一模板匹配的风险,而且充分利用了具有相似纹理这一有利信息,实验结果表明,提出的方法可以达到工程要求的亚像素级别误差,由此说明该方法在摄像机标定的应用中是行之有效的.
This paper employs the weighted template matching method based on the histogram for camera calibration.Firstly,a vernier caliper is used as an subject to capture the image.Then the image is used to extract numbers of templates,and each template is used to extract ROI based on template matching method.After the matching results are transferred into binary image and rotated 90 degrees to get the histogram;the histogram is optimized and used to get the measure accuracy.Finally,the weighted average of these measure accuracy is obtained as the final result.Comparing with the true value,the final results show that the weighted template matching method is efficient for camera calibration and it's easy to implement.