【正文】
沈陽理工大學(xué)學(xué)士學(xué)位論文 I 瞳孔動(dòng)態(tài)監(jiān)測(cè)系統(tǒng)的研究與開發(fā) 摘 要 本文以紅外線條件下錄制的瞳孔視頻為處理對(duì)象,對(duì)瞳孔視頻進(jìn)行預(yù)處理,得到用特殊顏色標(biāo)識(shí)的瞳孔視頻為輸出。通過對(duì)視頻文件的逐幀采集,對(duì)采集的幀圖像,進(jìn)行圖像處理得到瞳孔的面積大小并用特殊顏色標(biāo)識(shí)瞳孔,然后進(jìn)行幀合成為視頻輸出文件。 本文采用對(duì)采集的幀圖像進(jìn)行腐蝕、膨脹、開運(yùn)算、二值化等圖像預(yù)處理的方法,并用區(qū)域生長(zhǎng)算法得到瞳孔的區(qū)域,從而計(jì)算出瞳孔區(qū)域的相對(duì)像素?cái)?shù),可以計(jì)算出瞳孔面積大小,并繪制瞳孔面積變化曲線,然后將處理后的圖像幀合成為視頻輸出文件,從而實(shí)現(xiàn)瞳孔的動(dòng)態(tài)分析。本文對(duì)幀的處理是基于二值化的粗定位和區(qū)域生長(zhǎng)方法相結(jié)合的方法,能有效檢測(cè)因病變而呈不規(guī)則圓形的瞳孔,簡(jiǎn)單而且快速。首先使用形態(tài)學(xué)開運(yùn)算進(jìn)行預(yù)處理,去除睫毛和亮斑的影響且保持原有瞳孔大小,同時(shí)生成縮略圖;然后生成二值閾值化圖像,進(jìn)行水平和垂直投影,找到極值點(diǎn),將其作 為種子點(diǎn);最后用區(qū)域生長(zhǎng)算法得到精確的瞳孔區(qū)域?;谝陨系奶幚矸椒?,采用 OpenCV、 VC++編程工具,編程實(shí)現(xiàn)了瞳孔動(dòng)態(tài)監(jiān)測(cè)系統(tǒng)的軟件部分。 關(guān)鍵詞 :二值化;開運(yùn)算;區(qū)域生長(zhǎng)法;瞳孔定位; 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)測(cè)算法的發(fā)展 ....................................................................................... 3 本文瞳孔監(jiān)測(cè)的方法 ............................................................................................... 5 OpenCV 的介紹 ....................................................................................................... 5 2 瞳孔動(dòng)態(tài)監(jiān)測(cè)系統(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è)計(jì) ..................................................................................................... 11 3 瞳孔動(dòng)態(tài)監(jiān)測(cè)算法設(shè)計(jì) ................................................................................................... 12 預(yù)處理 ..................................................................................................................... 12 腐蝕 ............................................................................................................... 12 膨脹 ............................................................................................................... 13 開運(yùn)算 ........................................................................................................... 14 閾值分割 ................................................................................................................. 15 二值化 ..................................................................................................................... 17 種子點(diǎn)定位 ............................................................................................................. 17 區(qū)域生長(zhǎng)法 ............................................................................................................. 18 4 瞳孔動(dòng)態(tài)監(jiān)測(cè)系統(tǒng)的軟件設(shè)計(jì) ....................................................................................... 21 瞳孔動(dòng)態(tài)監(jiān)測(cè)系統(tǒng)的模塊設(shè)計(jì) ............................................................................. 21 視頻讀取模塊 ............................................................................................... 21 視頻處理模塊 ............................................................................................... 21 畫曲線圖模塊 ............................................................................................... 22 處理后的視頻查看模塊 ............................................................................... 23 軟件的具體實(shí)現(xiàn) ..................................................................................................... 23 環(huán)境配置 ....................................................................................................... 23 整體界面設(shè)計(jì) ............................................................................................... 25 沈陽理工大學(xué)學(xué)士學(xué)位論文 IV 視頻讀取模塊的具體實(shí)現(xiàn) ........................................................................... 26 視頻處 理模塊的具體實(shí)現(xiàn) .........