§ 瀏覽學位論文書目資料
  
系統識別號 U0002-2906200503535400
DOI 10.6846/TKU.2005.00728
論文名稱(中文) 低價機器視覺系統之硬體式影像擷取技術發展
論文名稱(英文) A Hardware-Based Image Acquisition Scheme for Low-cost Machine Vision Systems
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 機械與機電工程學系碩士班
系所名稱(英文) Department of Mechanical and Electro-Mechanical Engineering
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 93
學期 2
出版年 94
研究生(中文) 陳佑杰
研究生(英文) Yu-Chieh Chen
學號 692342834
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2005-06-10
論文頁數 62頁
口試委員 指導教授 - 王銀添(ytwang@mail.tku.edu.tw)
委員 - 翁慶昌(wong@ee.tku.edu.tw)
委員 - 李祖聖(alf@npidc.org.tw)
關鍵字(中) CMOS感測器
影像檢測
機器視覺
SOPC
關鍵字(英) CMOS vision
Visual inspection
Machine Vision System
system on a programmable chip
第三語言關鍵字
學科別分類
中文摘要
本研究使用低價的CMOS視覺感測元件製作機器視覺系統,修改市售CMOS視覺模組的部份限制,發展適合機器視覺系統的影像擷取技術。修改重點包括影像擷取時的環境設定與影像編碼格式,以及影像擷取後的影像處理程序等。首先以改變視覺模組工作頻率的方式,產生不同的曝光程度以得到不同的影像品質。並將影像劃分為數個子影像加以分析,選擇出最佳品質的子影像,組合後做為後續影像處理的原始影像。其次,使用感測元件輸出的影像編碼格式進行影像傳輸與處理,具有影像資料量小且訊息完整的優點。最後,針對原始影像運用影像分割技術找尋所需要的物件,再輸出物件位置給控制系統做後續處理。視覺模組工作頻率的變動方面,將以數位邏輯電路形式實現在Altera的FPGA晶片中,驅動義統電子低價位的ET21X110A視覺模組。並在Altera的FPGA晶片中自行設計Nios CPU,以實現品質測定、影像邊緣強化、影像放大與影像分割等程序。最後利用UART串列傳輸輸出到控制系統。發展的機器視覺系統應用在光碟拷貝機的感測與檢測程序,包括有無碟片偵測、托盤伸出長度量測、與碟片中心點位置量測等。未來也可應用在動態環境的感測與檢測,例如當做機器人的視覺系統以回授周遭訊息。
英文摘要
In this research, a Machine Vision System (MVS) is developed based on a low-cost CMOS vision module. Many limitations on image processing for the CMOS vision are investigated and improved in order to design an applicable MVS for industry applications. These problems include the environment setting during the process of image acquisition, the image encoded format, and the image processing after the image is acquired. First, in image acquisition setting, the working frequencies of the vision module are varied to perform different exposure time and obtain different quality of image. After that, an image quality selection procedure is executed by analyzing the sub-images. Sub-images with best quality are collected to reform a full image. Second, the original image encoded format of the CMOS module is utilized for image transmission. Therefore, the transmitted image will preserve complete but small-in-volume information. Finally, utilize the technique of image segmentation to separate the image pixel of the tracked object from those of the environment. Then the information about the tracked object can be abstracted and fed back to the mechanism control system.
In hand-on practice, all of the mathematical algorithms for image acquisition and processing are programmed in an Altera FPGA chip using SOPC design tools. Four functional modules, namely working frequency selection, image acquisition, signal hand-shaking, and UART transmission, are designed based on VHDL. Furthermore, a Nios CPU is designed to perform the procedures for image selection and processing. The developed MVS is utilized in the automatic sensing and inspection processes of a CD/DVD duplicator. Three experiments are implemented, including logic detection of the existence of a compact disc, one-dimensional measurement of stretch length of a CD tray, and two-dimensional measurement of the center position of a compact disc. In the near future, an attempt will be made to apply this vision system to a dynamic environment, for example, the sensing device for a mobile robot.
第三語言摘要
論文目次
目 錄

中文摘要.....................................................................................................................................	I
英文摘要....................................................................................................................................II	
目錄...........................................................................................................................................IV
圖目錄.......................................................................................................................................VI	
表目錄.......................................................................................................................................IX	
第一章 序論..............................................................................................................................	1
	1.1 研究動機…………………………………………………………………………	1
	1.2 現有視覺模組的限制……………………………………………………………	2
	1.3 研究目地…………………………………………………………………………	3
	1.4 硬體式影像擷取技術的實現…………………………………………………....	4
	1.5 相關文獻探討……………………………………………………………………4
	1.6 研究範圍與論文架構…………………………………………………………....	6
第二章 數位影像處理..............................................................................................................	8
	2.1 影像品質測定……………………………………………………………………	8
	2.2 影像分割……………………………………………………………………….	10
	2.2.1 Sobel遮罩方法…………………………………………………………..	10
	2.2.2 臨界值法…………………………………………………………………	13
	2.3 影像處理流程…………………………………………………………………..	14
第三章 CMOS視覺模組........................................................................................................	16
	3.1 視覺模組……………………….……………………………………………….	16
	3.2  32x32低階視覺模組……………………………………………………….....	17
	3.3  640x480視覺模組…………………………………………..…………..…….	21
第四章 SOPC設計………………………………………………………………………….	23
	4.1	Altera Stratix EP1S10 SOPC實驗板…………………………………………..	23
	4.2 工作頻率選擇模組……………………………………………………………..	25
       4.3	影像擷取功能模組……………………………………………………………..29
	4.4	串列傳輸功能模組……………………………………………………………..31
	4.5	訊號交握功能模組……………………………………………………………..	33
	4.6	Nios CPU………………………………………………………………...……..	36
	4.7功能模組整合……………………………………………………………...……38
	4.8影像品質測定與組合…………………...............................................................	39
	4.9	程式操作界面與影像顯示……………………………………………………..43
第五章	拷貝機檢測應用…………………………………………………………………….	47
	5.1	距離測試………………………………………………………………………..	47
	5.2	求測光碟片中心………………………………………………………………..	49
	5.3	偵測有無光碟與托盤伸出長度………………………………………………..	52
	5.4	結果討論………………………………………………………………………..	55
第六章	結論與未來發展…………………………………………………………………….	56
	6.1	研究成果………………………………………………………………………..	56
	6.2	單晶片化成本分析……………………………………………………………..	56
	6.3	影像格式之資料量比較………………………………………………………..	57
	6.4	未來研究方向…………………………………………………………………..	59
附錄A………………………………………………………………………………………...	60
ET21X110A 視覺模組規格…………………………………………………………………	60
參考文獻...................................................................................................................................61

圖目錄

圖1.1 各類型感測器所含訊息與解析度相對於價格的比較……………………………….	1
圖1.2 CMUcam2影像追蹤模組……………………………………………………………...	6
圖1.3 益眾科技 彩色影像感測模組………………………………………………………..	6
圖1.4 凌陽科技 彩色影像感測模組………………………………………………………..	6
圖2.1 當d2和d1之值相差較遠時,因雜訊干擾之不正常影像…………………………	9
圖2.2 當d2和d1之值相差不遠時,則為正常影像……………………………………...	10
圖2.3 遮罩與影像平面示意圖……………………………………………………………...	12
圖2.4  Sobel mask…………………………………………………………………………..	12
圖2.5 影像經Sobel遮罩尋邊處理………………………………………………………....	13
圖2.6 分割影像之臨界值選取……………………………………………………………	14
圖2.7 光碟片中心取閥值…………………………………………………………………	14
圖2.8影像處理流程圖………………………………………………………………………	15
圖3.1 系統硬體架構圖……………………………………………………………………...	16
圖3.2 影像視覺模組 (義統電子 ET21X110A)……………………………………………	19
圖3.3 ET21x110A 影像感測器像素陣列………………………………………………......	19
圖3.4 ET21x110A 功能圖…………………………………………………………………..	20
圖3.5 ET21x110A 感測器時序圖…………………………………………………………..	20
圖3.6 ET21x110A 數位轉類比之同步功能時序圖………………………………………..	21
圖3.7 晶睿通訊視覺模組.......................................................................................................	22
圖4.1 系統軟體架構圖……………………………………………………………………...	23
圖4.2  Altera Stratix EP1S10………………………………………………………………..	25
圖4.3 QuartusII 之PLL規劃界面…………………………………………………………..	27
圖4.4 QuartusII 之MUX規劃界面…………………………………………………………	27
圖4.5 工作頻率選擇模組內部連結圖……………………………………………………...	28
圖4.6 工作頻率選擇模組…………………………………………………………………...	28
圖4.7 工作頻率選擇模組模擬時序圖……………………………………………………..	29
圖4.8 工作頻率選擇模組模擬圖-部份放大……………………………………………….	29
圖4.9 影像擷取功能狀態機流程圖………………………………………………………..	30
圖4.10影像擷取功能模組…………………………………………………………………..	31
圖4.11 影像擷取功能模組模擬圖………………………………………………………….	31
圖4.12 串列傳輸程式流程圖……………………………………………………………….	32
圖4.13 串列傳輸功能模組模擬圖………………………………………………………….	33
圖4.14 串列傳輸功能模組………………………………………………………………….	33
圖4.15 QuartusII 之FIFO規劃界面………………………………………………………..	34
圖4.16 VHDL訊號交握功能………………………………………………………………..	34
圖4.17 訊號交握功能模擬圖……………………………………………………………….	35
圖4.18 訊號交握功能方塊連結圖………………………………………………………….	35
圖4.19 訊號交握功能模組………………………………………………………………….	35
圖4.20 SOPC Builder的使用者介面………………………………………………………..	37
圖4.21 Nios CPU功能模組圖……………………………………………………………….	37
圖4.22 QuartusII之Logic Lock繞線下載模式……………………………………………..38
圖4.23 系統功能模組連結圖……………………………………………………………….	39
圖4.24 32x32像素、6位元灰階解析度影像………………………………………………	40
圖4.25 將16x16影像分析區塊再分成16個4x4影像單元……………………………...	41
圖4.26 頻率與光源之關係圖………………………………………………………………	42
圖4.27影像品質選擇與組合流程圖……………………………………………………….	42
圖4.28 SOPC Builder檢視視窗界面……………………………………………………….	44
圖4.29 電腦端顯像視窗界面………………………………………………………………	44
圖4.30  4x4之像素分離…………………………………………………………………..	45
圖4.31 雙線性補插技衚流程圖…………………………………………………………….	45
圖4.32 影像放大…………………………………………………………………………….46
圖5.1距離實測圖……………………………………………………………………………	47
圖5.2 視覺模組距離字卡260 ………………………………………………………….	48
圖5.3 視覺模組距離字卡10 …………………………………………………………..	48
圖5.4 求測光碟片中心機構示意圖………………………………………………………...	50
圖5.5 系統機構外觀………………………………………………………………………...	50
圖5.6 邊緣強化與影像分割………………………………………………………………...	51
圖5.7 求測光碟片中心- SOPC Builder檢視視窗界面…………………………………….	51
圖5.8 求測光碟片中心-電腦端顯像視窗界面…………………………………………….	52
圖5.9 自動光碟拷貝機 Pronto Pro…………………………………………………………	53
圖5.10 光碟拷貝機之極限開關…………………………………………………………….	53
圖5.11 測試方法示意圖…………………………………………………………………….	54
圖5.12光碟托盤未完全伸出……………………………………………………………….	54
圖5.13光碟托盤完全伸出………………………………………………………………….	54
圖5.14無光碟片…………………………………………………………………………….	55
圖5.15有光碟片…………………………………………………………………………….	55
圖6.1 Nios SOPC系統概念圖……………………………………………………………….	57
圖6.2 YCbCr 4:2:0取樣示意圖……………………………………………………………...58
圖6.3 影像擷取追踨系統…………………………………………………………………...	59
圖A.1 ET21x110A 影像擷取模組電路圖………………………………………………….	60



表目錄

表3.1 色彩編碼格式……………………………………………………………………...…	17
表3.2 三大影像訊號標準系統……………………………………………………………...	17
表3.3  ET21X110A 各主要接腳功能說明………………………………………………..	18
表3.4 OV7620 影像感測器規格……………………………………………………………	22
表4.1 Stratix EP1S10C6規格表…………………………………………………………….	24
表4.2 設定之四組頻率……………………………………………………………………..	26
表4.3 工作頻率選擇模組接腳說明………………………………………………………..	28
表4.4 影像擷取功能模組接腳說明………………………………………………………..	30
表4.5 訊號交握功能模組接腳說明………………………………………………………..	36
表4.6 Nios CPU部份腳位功能說明………………………………………………………..	36
表4.7 圖4.24之各影像分析區塊數值…………………………………………………….	41
表5.1 距離測試實例一……………………………………………………………………..	41
表5.2 距離測試實例二……………………………………………………………………..	48
表5.3 光碟中心測試精度計算……………………………………………………………..	48
表6.1 Nios SOPC系統元件表………………………………………………………………	49
表6.2 影像格式比較………………………………………………………………………..	57
表6.3 RGB Raw Data輸出格式…………………………………………………………….	58
表A.1  ET21x110A 影像擷取模組規格表……………………………………………….	60
參考文獻
參考文獻

[1]	Altera, 2003, Stratix EP1S10, http://www.altera.com
[2]	Chang, W.C., and S.A. Lee, 2004, Autonomous Visual Servioing with Tele-Supervision, Proceedings of IEEE International Conference on Networking, Sensing, and Control 
[3]	Cheriet, M., J.N. Said, and C.Y. Suen, 1998, A recursive thresholding technique for image segmentation, IEEE Transactions on Image Processing , Vol.7, pp.918-921.
[4]	CMU, 2003, CMUcam2, http://www.robot-electronics.co.uk/shop/Camerax39s2081.htm 
[5]	Gonzalez, R.C., and R.E. Woods, 2002, Digital Image Processing, Prentice Hall.
[6]	Horton, I., 1998, Beginning C++ The Complete Language, Wrox Press.
[7]	Horton, I., 1998, Beginning Visual C++ 6, Wrox Press. 
[8]	Jack, K., 2005, Video Demystified, 4th edition, Elsevier.
[9]	Jarvis, J.F., 1977, Automatic Visual Inspection of Western Electric Type 700 Connectors, Proceedings of IEEE Conference on Pattern Recognition and Image Processing.
[10]	Leinecker, R.C., and T. Archer, 2001, Visual C++ 6 Bible, Kings Information.
[11]	Li, T.H., and S.J. Chang, 2003, Autonomous Fuzzy Parking Control of a Car-Like Mobile Robot, IEEE Transactions on System, Man, and Cycbernetics, Vol.33, no4, pp.451-465.
[12]	Mannos, J., and D. Sakrison, 1974, The effects of a visual fidelity criterion of the encoding of images, IEEE Transactions on Information Theory,Vol.20 ,no. 4, pp.525-536.
[13]	OmniVision, 2004, CameraKits http://www.ovt.com/i_products.html
[14]	Pai A.L., and K. Lee, 1986, Automated Visual Inspection of Aircraft Engine Combustor Assemblies, Processings of IEEE International Conference on Robotics and Automation, pp.1919-1924.
[15]	Porter G.B., T.M. Cipolla, and J.L. Mundy, 1979, Automatic Visual Inspection of Blind Holes in Metal Surfaces, Proceedings of IEEE Conference on Pattern Recognition and Image Processing, pp.83-86.
[16]	Prewitt, J., 1970, Object Enhancement and Extraction, in picture Processing and Psychopictorics, B. Lipkin and A. Rosenfeld (eds.),Academic Press, pp. 75-149
[17]	Pu H.C., S.F. Liang, and C.T. Lin, 2004, A HVS-Directed Neural-Network-Based Image Resolution Enhancement Scheme for Image Resizing, Department of Electrical and Control Engineering National Chiao-Tung University, Hsinchu, Taiwan
[18]	Sharpened Net, 2005, http://www.sharpened.net/glossary/definition.php?vga
[19]	Song, K.T., and W.H. Tang, 1996, Environment Perception for a Mobile Robot Using Double Ultrasonic Sensors and a CCD Camera, IEEE Transactions on Industrial Electronics, Vol.43, no3, pp.372-379.
[20]	Shimizu S., T. Kondo, T. Kohashi, M. Tsuruta, and T. Komuro, 1992, A new algorithm for exposure control based on fuzzy logic for video cameras, IEEE Transactions on Consumer Electronics, Vol.38, pp.617-623. 
[21]	Tippet, J.T., 1965, Optical and Electro-optical Information Processing, MIT Press.
[22]	UIUC, 2005, http://archive.ncsa.uiuc.edu/SCMS/training/general/details/video_standards.html
[23]	Yu, W.H.W. and U.C. Huang, 1989, An efficient geometric curve fitting technique TENCON, Fourth IEEE Region 10 International Conference , pp.960–963.
[24]	方柏霖,2004,影像擷取系統之硬體設計,成功大學工程科學研究所碩士論文。
[25]	林柏辰、陳慶逸,2003,VHDL數位電路實習與專題設計,文魁資訊。
[26]	林明權、王瑞祿、蔡國瑞、黃俊岳、陳朝烈、柯嘉雄,2004,數位控制系統設計-使用VHDL(修訂版),全華科技圖書。
[27]	前程科技,2004,Pronto Pro,http://www.datatronics.com.tw/
[28]	徐瑞文、陳姿伶,2004,如何擷取ET21X110A 影像資料,技術報告,義統電子。
[29]	徐瑞文,2003,ET31X110 Pcam Technical Manual,義統電子。
[30]	益眾科技,2004,彩色影像感測模組,www.icci.com.tw 
[31]	凌陽科技,2004,彩色影像追蹤模組,http://www.sunplus.com.tw/chinese/
[32]	許文隆,2004,應用低價視覺模組於自動化光碟拷貝機之定位檢測,淡江大學機械與機電工程學系碩士論文。
[33]	黃南溢,2004,通用串列匯流排控制器硬體設計之實現與應用,成功大學工程科學研究所碩士論文。
[34]	晶睿通訊股份有限公司,http://www.vivotek.com/
[35]	義統電子,2004,ET21X110A,http://www.etomscorp.com
[36]	蕭如宣,2003,SOPC系統設計,儒林圖書。
[37]	鐘書銘,2004,以SOPC實現強健性彩色影像物體追蹤及移動預測系統,成功大學電機系碩士論文。
論文全文使用權限
校內
紙本論文於授權書繳交後1年公開
同意電子論文全文授權校園內公開
校內電子論文於授權書繳交後1年公開
校外
同意授權
校外電子論文於授權書繳交後1年公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信