傳統的圖形比對方法多以灰階影像為主體,對目前彩色世界的圖形或物體而言,以二極化影像或灰階方式呈現,容易喪失部份關鍵性色彩資訊,而無法比對出最正確的結果。基於目前灰階比對無法突破的困境及彩色影像處理在工業應用的需求,本研究利用彩色機器視覺針對彩色圖形提出適合任意方向之圖形比對的方法,使圖形比對能充分利用色彩資訊以達到穩健(Robust)之比對效果。 本研究中不受物體旋轉影響之彩色比對技術,所涵蓋的方法有環形投影(Ring projection)轉換、相關係數(Correlation coefficient)計算、旋轉軸分析(Orientational axis analysis)等。為了節省搜尋時間,比對過程採用兩階段比對策略,第一階段為粗略比對(Coarse matching),選用彩色環形投影相關係數法,能不受旋轉影響快速地由待測影像中篩選出含標準圖形之可能區域;第二階段為細緻比對(Fine matching),先由二次動差法配合色彩模型中的色彩特徵值作為權重計算一個彩色圖形的方向軸,以克服旋轉之影響,再由彩色影像點相關係數法進一步確認第一階段所選擇之可能區域中最近似標準圖形之比對結果。 實驗中以各種彩色圖形與工業元件為測試樣本,由實驗結果得知,以彩色圖形比對法能真實掌握影像中每一點的色彩資訊,有效的比對出正確的結果,這正是灰階比對方法所不能及的;在工業瑕疵檢測方面的應用如螢幕外殼、金手指等,以彩色環形投影相關係數法確實可以不受物體旋轉影響且能有效凸顯一致性紋路表面之異常瑕疵。
Pattern matching has been an important technique in machine vision for the applications of optical character recognition (OCR), object detection, remote sensing and motion analysis. Many exiting pattern matching methods are mainly applied to gray-level images. They lose key color information and make the pattern matching task unreliable. To avoid the predicament of gray-level image technology and to cope with the needs of color image process in industrial application, we propose a rotation-invariant color pattern matching method, and focus on its applications to component search and defect detection in industry. In order to shorten the period of search time, the match process has been set to two phases. Phase one is a coarse matching process. It adopts color-ring-projection that transforms the 2-D color image in a circular window into a 1-D color value as a function of radius. It can rapidly select the possible regions of a model pattern in the scene image by computing the correlation coefficient of color-ring-projection between the model and the scene. Phase two is a fine matching process. It verifies the selected regions in phase one by measuring the correlation coefficients between the model and the candidate regions in a pixel-by-pixel basis. To make the match rotation-invariant, the axis of least second moment along with the color feature value as the weight is used to determine the rotational angle of a pattern. By simply applying the color-ring-projection correlation coefficient method, experiments on various industrial textured surfaces such as papers, textile fabrics, printed-circuit board have shown that the proposed method is very efficient and effective for the application of defect inspection.