近年來由於高科技電子產業發達,高速度與高良率成為生產線上重要的訴求;更快速的生產方式若是仰賴人工檢測,則成本不但無法降低,且持續檢測的工作容易使人員因疲憊而發生誤失,進而造成品質檢驗不穩定。所以機器視覺近年來在工業檢測上發展迅速,有逐步取代人工檢測的明顯趨勢。雖然目前自動檢測的定位技術已十分精準,但高密度的複雜電子組件,必須對微量位移與製程變異有足夠的容忍度,才不會因製程變異允差造成重工、整批報廢而延誤交期。傳統2D相關係數法(Normalized Cross Correlation,NCC)是目前使用最普遍的圖形比對檢測法,但計算量龐大且穩定度易受環境影響,以致於比對結果產生不確定的影響。 本研究應用分位數散佈圖(Quantile-Quantile Plot)於瑕疵檢測,期望能降低傳統圖形比對法於灰階一致性圖形與微量位移效果不佳之情形。本研究提出分位數演算法並應用於圖形比對,能有效地將二維灰階資訊轉為一維分位數資訊,使得資訊處理量可以大幅度下降,並有效降低影像因位移或些許製程變異所造成之誤判,此方法雖減少像素在二維空間的資訊,但仍可正確地偵測影像中異常的瑕疵區域,本研究使用分位數卡方值之p-value為相似度指標,研究結果已顯示此方法較傳統2D相關係數法有較佳之鑑別度,可有效區分影像中的正常與異常區域。實驗中以印刷電路板的樣本為主並進行測試,相較於傳統2D相關係數法,於灰階一致性圖形與微量位移影響,效果有明顯地改善;光源不穩定時,可運用分位數常規化的技術,使光源變異大時,降低大部分誤判的雜訊。
Pattern matching bas been used extensively for many machine vision applications such as optical character recognition, face detection, object detection, and defect detection. The normalized cross correlation (NCC) is the most commonly used technique in pattern matching. However, it is computational intensive, sensitive to environmental changes such as lighting and shifting, and suffers from false alarms for a complicated image that contains partial uniform regions. In this research, a pattern matching scheme based on the quantile-quantile plot (Q-Q plot) is proposed for defect detection applications. In a Q-Q plot, the quantiles of the test image are plotted against the corresponding quantiles of the template image. If both compared images are identical, each pair of corresponding quantiles would plot on a straight line with slop 1. The p-value of Chi-square test from the resulting Q-Q plot is then used as the quantitative measure for the similarity between the two compared images. The quantile representation transforms the 2D gray-level information into the 1D quantile one. It can therefore efficiently reduce the dimensionality of the data, and accelerate the computation. Experimental results have shown that the proposed pattern matching scheme is computational fast and is tolerable to minor displacement and process variation. The proposed similarity measure of p-value has excellent discrimination capability to detect subtle defects, compared with the traditional measure of NCC. With a proper normalization of the Q-Q plot, the p-value measure can be tolerable to moderate light changes. Experimental results from numerous PCB (printed circuit board) samples have shown the efficacy of the proposed pattern matching scheme for defect detection.