現今已有相當多的高科技產業,例如電子、光電產業及半導體業等,將機器視覺的技術應用於生產線上,其主要原因乃是為了降低人工檢測作業存在之漏檢及誤判等問題發生,進而使用機器視覺之自動檢測系統取代人工作業。在機器視覺技術中,圖形比對(Pattern matching)技術在實際工業應用上已經相當廣泛,而相關係數法(Normalized correlation)為目前圖形比對應用最普遍的方法,但由於傳統相關係數法在處理效果上及計算效率上不符合工業自動檢測的需求,因此本研究針對傳統相關係數法在瑕疵檢測應用上提出一個改良處理效果與計算效率的方法。 在瑕疵偵測效果方面,本研究藉由高斯平滑濾波器,對於兩比對圖形進行高斯平滑影像處理來降低變異因素對相關係數所造成的影響。在計算效率方面,透過建立的加總表,使相關係數的計算不受比對視窗尺寸的影響進而達到快速計算的目的。經由實驗結果驗證,本研究所提之改良方案確實能有效改善傳統相關係數法在處理效果與計算效率上的缺失,使得相關係數法在自動瑕疵檢測方面能獲得更廣泛的應用。
Pattern matching has been an important technique in machine vision for the applications of optical character recognition (OCR), object detection, motion analysis, and defect detection. Normalized correlation is the most common measure used for pattern matching. However, the traditional normalized correlation is computational intensive, and is sensitive to environmental changes. This prohibits normalized correlation for industrial inspection applications. In this research, we propose a method to improve the effectiveness and efficiency of the normalized correlation for defect detection application. In order to reduce the variation of normalized correlation affected by the factors such as image displacement and intensity variation, a Gaussian smoothing filter is used to smooth both the reference image and scene image so that the evaluated correlation values can be stable respect to minor environmental changes. To improve the computational efficiency of the normalized correlation, a sum-table approach is applied, which makes the computation of normalized correlation invariant to the window size of two compared images. Experimental results on various industrial samples such as PCB, SMT and BGA have shown that the proposed method is very efficient and effective for defect detection application.