【正文】
長春理工大學本科畢業(yè)設(shè)計 I 編號 本科生畢業(yè) 設(shè)計 基于機器視覺 的 表面缺陷檢測系統(tǒng)設(shè)計 Surface defect detection system design based on machine vision 學 生 姓 名 專 業(yè) 電子信息工程 學 號 指 導 教 師 學 院 電子信息工程學院 二〇一三年六月 長春理工大學本科畢業(yè)設(shè)計 II 中文摘要 為了不斷提高產(chǎn)品質(zhì)量和生產(chǎn)效率,金屬工件表面缺陷在線自動檢測技術(shù)在生產(chǎn)過程中顯得日益重要。針對金屬工件表面的多種缺陷 , 本文 設(shè)計了一套 基于機器視覺 能夠?qū)崿F(xiàn)對金屬工件表面缺陷進行實時在線、無損傷的自動檢測系統(tǒng)。該系統(tǒng)采用面陣 CCD 和多通道圖像采集卡作為圖像采集部分,提高了檢測系統(tǒng)的速度并降低了對 CCD 的性能要求,使系統(tǒng)在現(xiàn)有的條件下比較容易實現(xiàn)實時在線檢測 ; 采用自動選取圖像分割 閾 值,根據(jù)實際應(yīng)用的閾值把工件信息從圖像中提取出來并掃描工件 圖像中的信息,實現(xiàn)了系統(tǒng)的自動測量 ; 根據(jù)掃描得到的工件信息去除掉工件邊緣的光圈,利用自動選取的 閾值 對金屬工件表面的圖像進行二值化分割,從而實現(xiàn)各種缺陷的自動提取 及識別。 關(guān)鍵詞 : 機器視覺 表面缺陷 CCD 圖像處理 缺陷檢測 長春理工大學本科畢業(yè)設(shè)計 III Abstract In order to continually promote the quality of product and efficiency of production, the online automatic inspection technology of surface defect of metal workpiece has bee more and more important in the process of production. This paper designs an automatic system based on machine vision, which can inspect surface defect of metal workpiece timely without any damage on it. Firstly, using CCD and multichannel image acquisition card to acquire images, the system has accelerated the inspection speed and reduced the requirements of CCD on the performance to do the timely online inspection more easily under the current condition。 secondly, according to the practical application of threshold, the system has used the segmentation threshold of selecting an image automatically to select the workpiece information from images and scan that information to realize the automatic measurement of the system。 finally, the system has removed the aperture on the edge of workpiece in accordance with the workpiece information of scan and conducted the binarization segmentation on the image of the metal workpiece surface by using the automatic selection threshold to automatically select and identify varied defects. Keywords: machine vision。 surface defect。 CCD。 image processing。 defect inspecting 長春理工大學本科畢業(yè)設(shè)計 IV 目 錄 中文摘要 ...................................................................................................................... II Abstract ....................................................................................................................... III 第 1 章 引言 ................................................................................................................. 1 研究背景及意義 .............................................................................................. 1 國內(nèi)外研究現(xiàn)狀 .............................................................................................. 1 第 2 章 圖像技術(shù)及機器視覺 簡介 ............................................................................. 3 圖像處理技術(shù) ................................................................................................... 3 圖像和數(shù)字圖像 ..................................................................................... 3 圖像技術(shù)和圖像工程 ............................................................................. 3 數(shù)字圖像處理系統(tǒng) ........................................................................................... 4 圖像處理和分析系統(tǒng) ............................................................................. 4 圖像采集模塊 ......................................................................................... 4 圖像的數(shù)據(jù)編碼和傳輸 ......................................................................... 5 機器視覺技術(shù) ................................................................................................... 5 機器視覺技術(shù)簡介 ................................................................................. 5 機器視覺系統(tǒng)的概念、組成及特點 ..................................................... 6 機器視覺系統(tǒng)的應(yīng)用及發(fā)展動向 ................................................................... 7 機器視覺檢測應(yīng)用 ................................................................................. 7 機 器視覺系統(tǒng)的發(fā)展動向 ..................................................................... 7 第 3 章 系統(tǒng)總體設(shè)計 .................................................................................................. 9 3. 1 CCD 攝像頭 .................................................................................................... 9 3. 2 圖像采集卡 ...................................................................................................... 9 視頻輸入信號及采樣頻率 ................................................................... 10 視頻輸入窗口和顯示窗口 ................................................................... 10 3. 3 軟件設(shè)計 ........................................................................................................ 10 第 4 章 缺陷檢測軟件設(shè)計 ........................................................................................ 11 4. 1 圖像實時采集模塊 ........................................................................................ 11 4. 2 圖像預(yù)處理模塊 ............................................................................................ 11 4. 3 閾值選取模塊 ................................................................................................ 12 4. 4 圖像測量模塊 ................................................................................................ 12 4. 5 缺陷檢測模塊 ................................................................................................ 20 二值圖像區(qū)域標 記 ............................................................................... 21 二值圖像的小區(qū)域消除 ....................................................................... 22 4. 6 缺陷識別模塊 ................................................................................................ 22 第 5 章 實驗結(jié)果及分析 ............................................................................................ 25 實驗數(shù)據(jù) ......................................................................................................... 25 實驗分析 ..........................