由於以樣板做為比對的基準之方法具有有效性及簡單性,所以近年來常常被用來在影像中偵測想要的物件。至於硬體實現方面,為了讓這些相關技術能夠在速度上有所提升,不管對於演算法上的改進,或者是架構上的改進,均有相當多的文獻提出相對應的解決辦法。然而許多文獻只針對某個部份做加強,並沒有考慮到整個架構的完善性。所以當這些架構要被應用到真正的視訊系統時,便會有許多問題隨之產生。本文從中選擇了一個比較強健的演算法,並試圖在我們實驗室所發展的即時視訊系統上實作其硬體架構。除此之外,對於該演算法來說,有些運算結果是可以預先計算的,因此我們移除了這些相關的運算單元來降低演算法所需的硬體資源,並且讓CPU以動態的方式負責去計算出這些結果。也就是說,在視訊系統運行當中,我們可以任意地變換這些值,使得整個視訊系統會有不太一樣的功能。最後由實驗結果可知,我們不僅成功地減少了整個架構所需的硬體資源,並且也讓我們的視訊系統一樣地維持在它原來的時脈頻率下運作,保有了即時的特性。
Template-based matching methods are often used for object detection because of their effectiveness and simplicity. To accelerate the speed of template matching in hardware implementation, there have been many studies on either algorithmic or architectural improvements. However, they are often lack of comprehensive considerations, resulting in the fact that many of them cannot be adopted for a practical application. In this thesis, we try implementing in hardware an algorithm that is more robust among all the studies, and integrate it into the real-time video system developed by our laboratory. Besides, we reduce the overall hardware resources required for the algorithm by removing some arithmetic units whose results can be pre-computed offline. The CPU in the video system is then instructed to calculate these results dynamically when the system is operating. Experimental results show that our modification of the architecture indeed achieves a reduction in the logic elements needed. Moreover, the video system with the template matching function inside can still work at its original clock rate, preserving the real-time characteristic.