Considering feature of panoramic image mosaic , dimension of template , searching range and means of searching were researched in this paper . and a new type of optimization algorithm was presented based on template matching . this algorithm can greatly raise the speed of panoramic images 本文结合全景图像拼接特点,首次就模板尺寸、搜索范围和搜索方式进行研究,提出一种新的基于模板匹配的优化算法,可以明显提高全景图像的拼接速度,并以此为理论基础,编写图像拼接程序panaimgmosaic 。