【正文】
沈陽理工大學(xué)學(xué)士學(xué)位論文 I 瞳孔動態(tài)監(jiān)測系統(tǒng)的研究與開發(fā) 摘 要 本文以紅外線條件下錄制的瞳孔視頻為處理對象,對瞳孔視頻進(jìn)行預(yù)處理,得到用特殊顏色標(biāo)識的瞳孔視頻為輸出。通過對視頻文件的逐幀采集,對采集的幀圖像,進(jìn)行圖像處理得到瞳孔的面積大小并用特殊顏色標(biāo)識瞳孔,然后進(jìn)行幀合成為視頻輸出文件。 本文采用對采集的幀圖像進(jìn)行腐蝕、膨脹、開運(yùn)算、二值化等圖像預(yù)處理的方法,并用區(qū)域生長算法得到瞳孔的區(qū)域,從而計算出瞳孔區(qū)域的相對像素數(shù),可以計算出瞳孔面積大小,并繪制瞳孔面積變化曲線,然后將處理后的圖像幀合成為視頻輸出文件,從而實現(xiàn)瞳孔的動態(tài)分析。本文對幀的處理是基于二值化的粗定位和區(qū)域生長方法相結(jié)合的方法,能有效檢測因病變而呈不規(guī)則圓形的瞳孔,簡單而且快速。首先使用形態(tài)學(xué)開運(yùn)算進(jìn)行預(yù)處理,去除睫毛和亮斑的影響且保持原有瞳孔大小,同時生成縮略圖;然后生成二值閾值化圖像,進(jìn)行水平和垂直投影,找到極值點,將其作 為種子點;最后用區(qū)域生長算法得到精確的瞳孔區(qū)域?;谝陨系奶幚矸椒?,采用 OpenCV、 VC++編程工具,編程實現(xiàn)了瞳孔動態(tài)監(jiān)測系統(tǒng)的軟件部分。 關(guān)鍵詞 :二值化;開運(yùn)算;區(qū)域生長法;瞳孔定位; C++ 沈陽理工大學(xué)學(xué)士學(xué)位論文 II Abstract Based on the infrared body under the condition of recording pupil video as treatment object, the pupil video preprocessing, get with the special color identification pupil video for the output. Through the frame by frame of video file collection, the collection of image, image processing of pupil size and special color mark the pupil, then the frame synthesis for video output file. This article adopts the corrosion, expansion, with the frame of open operation, binary image preprocessing methods, such as using region growing algorithm to get the pupil area, so as to calculate the relative sizes of pupil area, can calculate the pupil size, and draw the pupil area change curve, and then synthesize processed image frames into video output file, so as to realize the dynamic analysis of the pupil. In this paper, the frame is based on the processing of binarization of coarse location and region growing method with the bination of methods, can effectively detect irregular round pupil by lesions, simple and rapid. Preprocessing of the first to use morphological open operation to remove eyelash and bright spots and keep the pupil size, the influence of the generated thumbnail at the same time。 Then generate binary threshold images, the horizontal and vertical projection, find the extreme value point, as the seed point。 Finally get accurate pupil area using region growing algorithm. Processing method based on the above, the use of OpenCV, vc + + programming tools, programming software part of the dynamic monitoring system has realized the pupil. Keywords:threshold。 open operation。 region growing。 the pupil position。C++ 沈陽理工大學(xué)學(xué)士學(xué)位論文 III 目 錄 1 緒 論 ................................................................................................................................... 1 課題研究背景及意義 ............................................................................................... 1 目前瞳孔監(jiān)測算法的發(fā)展 ....................................................................................... 3 本文瞳孔監(jiān)測的方法 ............................................................................................... 5 OpenCV 的介紹 ....................................................................................................... 5 2 瞳孔動態(tài)監(jiān)測系統(tǒng)的構(gòu)建 ................................................................................................. 8 系統(tǒng)的總體結(jié)構(gòu) ....................................................................................................... 8 系統(tǒng)的硬件結(jié)構(gòu) ....................................................................................................... 8 圖像采集的硬件結(jié)構(gòu) ........................................................................................ 9 攝像頭光源結(jié)構(gòu) ................................................................................................. 9 刺激光源與控制部分 ......................................................................................... 9 系統(tǒng)的軟件設(shè)計 ..................................................................................................... 11 3 瞳孔動態(tài)監(jiān)測算法設(shè)計 ................................................................................................... 12 預(yù)處理 ..................................................................................................................... 12 腐蝕 ............................................................................................................... 12 膨脹 ............................................................................................................... 13 開運(yùn)算 ........................................................................................................... 14 閾值分割 ................................................................................................................. 15 二值化 ..................................................................................................................... 17 種子點定位 ............................................................................................................. 17 區(qū)域生長法 ............................................................................................................. 18 4 瞳孔動態(tài)監(jiān)測系統(tǒng)的軟件設(shè)計 ....................................................................................... 21 瞳孔動態(tài)監(jiān)測系統(tǒng) 的模塊設(shè)計 ............................................................................. 21 視頻讀取模塊 ............................................................................................... 21 視頻處理模塊 ............................................................................................... 21 畫曲線圖模塊 ............................................................................................... 22 處理后的視頻查看模塊 ............................................................................... 23 軟件的具體實現(xiàn) ..................................................................................................... 23 環(huán)境配置 ....................................................................................................... 23 整體界面設(shè)計 ............................................................................................... 25 沈陽理工大學(xué)學(xué)士學(xué)位論文 IV 視頻讀取模塊的具體實現(xiàn) ........................................................................... 26 視頻處理模塊的具體實現(xiàn) .......................