摘要
樣板匹配技術已在工業界中廣泛的被應用在瑕疵檢測、元件定位、元件辨識等領域。而樣板匹配的原理為:給定一個目標物體影像為樣板影像,以樣板影像搜孬
鉴張場景影像,判斷是否有目標物體存在於場景影像之中,如果有則储存該點位置。在工業界中,快速且準確的樣板匹配技術,可以有效提升產能;然而,多數樣板匹
配軟體核心技術都掌握在外國公司手中,因此,本論文開發一套適用於工業界的快速且准確定位的樣板匹配技術。本論文利用兩種影像特徵擷取方法進行樣板匹配,分別為環形投影法(RPT)、邊緣偵測法。本論文提出的樣板匹配技術分為兩階段:訓練階段、匹配階段;首先為訓練階段,在這個階段會利用影像金宇塔縮小樣板影像尺寸,擷取樣板影像特徵並儲存,避免後續過程重複計算;在匹配階段同樣利用影像金字塔縮小場景影像尺寸,擷取場景影像特徵,利用相關係數公式計算相似度,選擇相似度較高者到下一層影像進行匹配,直到得到最終位置。
本論文以四張實驗影像進行含旋轉的實驗,評估其運算速度與穩定性,接著以三組實際影像,驗證本硏究之様板匹配技術之可行性。根據實騐結果分析顯示,於角度量測誤差方面,環形投影法量測之平均誤差在0.61°以內,邊緣偵測法量測之平均誤差在0.54°以內,邊緣偵測法的角度量測結果較為穩定;在匹配速度方面,環形投影法單次執行時間為3.4ms,邊緣偵測法單次執行時間為
11.9ms,使用搜尋影像尺寸為300× 300,樣板影像尺才為54× 83,環形投影法的表現較佳;實際應用上,使用搜尋影像尺才為2448x
2048,樣板影像尺寸為33×24,檢測 3640
顆晶粒,環形投影法需花費1.088士0.019s,邊緣偵測法則為27.278士0.295s,由數據結果可以看出,本研究之環形投影法角度檢測奥匹配速度方面已符合工業使用標準,邊緣偵測法因匹配時間過長,無法應用於實務中。
關鍵字:樣板匹配 環形投影法 邊緣偵測
影像金字塔
Abstract
Template matching has been widely used in
the field of defect detection; object positioning, object identification,
and so on. The principle of template matching is to employ a reference image
of an object as the template image and determine whether the obiect exists
in the scene image and find its location. In industrial applications,
accurate and efficient template matching technique can increase the
productivity. However, most of the core technology of template matching is
owned by foreign companies. To facilitatedomestic development of industrial
applications, this thesis describes an efficient andaccurate template
matching method.
Two feature extraction techniques are used
here in our template matching method,including ring projection
transformation (RPT) and edge detection. The template matching method is
divided into two stages: training phase and matching phase. Intraining
phase, the image pyramid method is used to reduce the template image size,
andthen the features of template image of reduced images are extracted and
saved in order toavoid repetitive computation. In matching phase, the image
pyramid method is also used
to reduce the scene image size, and then
the features of reduced scene image are extracted.The correlation
coefficient formula is used to estimate the similarity of the extracted
features at each matching position. Those
positions with high similarity is taken to next pyramid level to match until
a final position is obtained at the last pyramid level.
Four kinds of target images are used as a
standard test of the template matching
method, in which the template object is
rotated. Both matching speed and stability is
evaluated. Furthermore, three sets of
target images in practical application are used to
verify the applicability of this template
matching method. According to the experiment, the angle measurement error of ring projection
transformation and edge detection are under 0.61° - 0.54° respectively, and
the performance of angle measurement of edge detection is better. The
computation time of ring projection method takes 3.4ms to
complete, the execution time of edge detection is 11.9m for a 300 x
300 scene imageand a 54 x 83 template image, ring projection method performs
better. In the application of LED testing and
sorting, the size of scene image we used is 2448 × 2048
and the size of template image is 33 × 24, there are 3640 dies to be
detected. The ring projection method takes 1.088 +
0.019s and the edge detection method takes
27.278士 0.295s, It can be seen from the results that the angle detection and
matching speed of the ring projection method in this study have met the
industrial standards, and the edge detection method
cannot be applied in industry since it is time-consuming.
Keywords:
Template Matching ,
Ring Projection Transformation(RPT) , Edge Detection , Image Pyramid
|