簡易檢索 / 詳目顯示

研究生: 李宗樺
Tsung-Hua Li
論文名稱: 結合OpenCV與主成份分析法之人臉辨識系統
Enhancing A Face Recognition System With OpenCV And Principle Component Analysis
指導教授: 楊英魁
Ying-Kuei Yang
口試委員: 黎碧煌
Bih-Hwang Li
張博綸
Po-Lun Chang
李建南
Chien-Nan Lee
楊英魁
Ying-Kuei Yang
學位類別: 碩士
Master
系所名稱: 電資學院 - 電機工程系
Department of Electrical Engineering
論文出版年: 2018
畢業學年度: 106
語文別: 中文
論文頁數: 73
中文關鍵詞: 影像處理人臉偵測人臉辨識OpenCVHaarcascade主成份分析法
外文關鍵詞: Image Processing, Face Recognition, Face Detection, OpenCV, Haarcascade, Principle Component Analysis
相關次數: 點閱:246下載:8
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

在使用人臉辨識系統來做為日常生活應用中,例如手機解鎖、電子門鎖以及出國 時的自動通關應用中,最重要的部分即是辨識人臉時的準確度,以及辨識階段,計算 特徵及比對資料,所需要花費的時間。
本論文之研究目的為提升人臉辨識之成功率,藉由將整個人臉辨識系統先分為偵 測以及辨識兩大部分,在初始階段以 Haarcascade 特徵分類器,以正面人臉以及眼部 特徵這兩個特徵作為偵測基準,進而偵測出影像中人臉所在的準確位置,來獲得更加 精準的人臉部分資訊,同時間將影像尺寸裁切統一規格後,再將人臉影像透過 OpenCV 進行影像的前處理,以高斯濾波、開運算等方式消去人臉影像的雜訊,再以 主成份分析法(Principle Component Analysis),萃取出輸入影像之特徵值以及特徵向量, 將其數據與資料庫中的人臉特徵資料做交互比對,計算出歐氏距離大小,設定辨識閥 值(Threshold),進而判定輸入的人臉影像是否與資料庫中的人臉影像相符合,以達到 人臉辨識之效果。
在本論文中,我們的人臉影像資料庫,除了使用 AT&T 所提供之人臉資料,同時 也加入我們自己所拍攝蒐集之人臉資料,作為影像辨識時判斷是否為相同人物的比對 資料。
藉由將經過人臉偵測(Face Detection)且完成影像前處理後所獲得之人臉資訊,與 已建立完成之人臉資料庫做交互比對,將資料庫中的所有人臉圖像做運算,獲得計算 後所獲得之特徵人臉影像,再與輸入之影像做比對,方能完成影像辨識。
本實驗共使用 43 張不同人臉影像作為辨識使用包括 40 張來自於 AT&T 人臉資 料庫之人臉影像及以人臉偵測方式額外加入的 3 個不同人的人臉影像。在辨識結果方 面,僅經過灰階化(Grayscale)之人臉影像,辨識準確率為 81.3%,再將辨識錯誤的人 臉影像,獨立加入高斯濾波(Gaussian filter)後,進行二次辨識,則再提升 9.3%成功率。
再將 43 張人臉影像全部經過灰階化(Grayscale)並且加入高斯濾波(Gaussian filter) 後之人臉辨識結成功率為 86.04%,而再將辨識錯誤之人臉影像進一步加入開運算 (Open Operation)後,則無辨識效果上的提升。


Face recognition system has become a common application in daily life, such as Face ID on the mobile phone, electronic door lock, and e-gate in airport. There are several issues needed to be studied and improved, but the most important one in face recognition is accuracy and time to perform a recognition..
The purpose of the thesis is to improve the accuracy of face recognition system. The experiment is conducted in two parts including face detection and face recognition.
Firstly, the Haarcascade classifier is used to detect the location of human face. In this part, both face and eyes are used as features to detect faces. Then all face images are normalized. The OpenCV is then applied to pre-process the images to reduce computation and remove noise from the initial image.
After face detection, the Principle Component Analysis (PCA) is applied to get the feature value and feature vector of face images. The recognition of the input image is then performed by comparing the input image against face image database by setting a threshold value and calculating the Euclidean distance.
In the experiment, the database includes 40 faces form AT&T face image database and 3 of our own images. The recognition rate of grayscale images is 81.3% by the approach proposed in this these. The recognition rate of face images after the Gaussian filter is 86.04%. After Gaussian filter is applied to the grayscale images which failed to be recognized at first time, and the recognition rate has been raised by 9.3%. Finally, the open operation is applied to the 4 images which still failed to be recognized, and the result shows no improvement at all.

目錄 摘要 1 ABSTRACT 2 致謝 3 第一章 緒論 12 1.1 研究動機 12 1.2 研究目的 13 1.3 論文架構 14 第二章 研究背景 15 2.1 數位影像(Digital Image) 15 2.1.1 RGB色域空間(RGB Color Space) 15 2.1.2 HSV色域空間(HSV Color Space) 15 2.2 影像前處理(Image Pre-processing) 17 2.2.1 灰階化(Grayscale) 17 2.2.2 二值化(Thresholding) 18 2.2.3 自適化閥值(OTSU) 20 2.2.4 Sobel邊緣偵測(Sobel Operator) 21 2.2.5 高斯濾波器(Gaussian Filter) 22 2.2.6 侵蝕(Erosion) 25 2.2.7 膨脹(Dilation) 27 2.2.8 開運算(Open Operation)、閉運算(Closed Operation) 29 2.3 Haarcascade分類器 31 2.3.1 Haar-Like特徵偵測 32 2.3.2 積分影像(Integral Image) 33 2.3.3 Adaboost分類器訓練 34 2.3.4 分類器串聯 34 2.4 主成份分析法(Principle Component Analysis) 35 2.5 局部二值模式直方圖(Local Binary Patterns Histogram) 36 2.6 第二章總結 38 第三章 研究方法 39 3.1 人臉偵測(Face Detect) 39 3.2 人臉影像前處理(Face Image Pre-processing) 42 3.2.1 灰階影像加入高斯濾波處理 42 3.2.2 高斯濾波影像加入開運算處理 43 3.3 人臉辨識(Face Recognition) 43 3.4 研究方法 45 3.5 資料庫建立 47 3.6 受測者人臉影像擷取 48 3.7 辨識結果判定 49 3.8 第三章總結 50 第四章 實驗結果與討論 51 4.1 使用工具 51 4.1.1 影像輸入擷取 51 4.1.2 Python 51 4.1.3 OpenCV 52 4.2 辨識結果(灰階) 52 4.3 辨識結果(高斯濾波) 58 4.4 辨識結果(高斯濾波-二次修正) 63 4.5 辨識結果(開運算-二次修正) 64 4.6 第四章總結 67 第五章 結論與未來展望 68 5.1 結論 68 5.2 未來展望 69 參考文獻 70

[1] 李柏翰,應用人臉辨識技術實作課堂點名系統之研究,明志科技大學電子系碩士論,民105。
[2] Abha Thakral., “Comaprision between local binary pattern histograms and principle component analysis algorithm in face recognition system,” IEEE International Conference On Smart Technologies For Smart Nation (SmartTechCon), pp. 973-978,2017.
[3] Navya Sushma Tummala.,“Face Recognition Using PCA and Geometric Approach,” IEEE International Conference on Computing Methodologies and Communicatoin (ICCMC), pp. 562-565,2017.
[4] Rafael C. Gonzalez, and Richard E. Woods. “Digital Image Processing”, Pearson,3/E,2007.
[5] Schwarz, Michael W.; Cowan, William B.; Beatty, John C. “An Experimental Comparison of RGB, YIQ, LAB, HSV, and Opponent Color Models,” ACM Transactions on Graphics, vol. 6, no. 2, pp. 123-158, April 1987.
[6] Aapo Hyvärinen, Juha Karhunen, Erkki Oja, “Independent Component Analysis”, Wiley, New York, 2001.
[7] Pearson,K, ”On Lines and Planes of Closest Fit to Systems of Points in Space” ,Philosophical Magazine, 1901.
[8] “Local binary patterns,” Wikipedia, [Online]. Available: https://en.wikipedia.org/wiki/Local_binary_patterns
[9] Viola and Jones, “Rapid object detection using a boosted cascade of simple features,” IEEE Computer Society Conference on Computer Vision and Pattern Recognition, VOL.1, pp. 511-518,2001.
[10] Franklin, Crow. “Summed-area tables for texture mapping,” Computer Sciences Laboratory: Xerox Palo Alto Research Center, 18(3):207-212,1984.
[11] “OpenCV”, [Online]. Available: https://en.wikipedia.org/wiki/OpenCV
[12] “Thresholding,” Wikipedia, [Online]. Available: https://en.wikipedia.org/wiki/Thresholding_(image_processing)
[13] N. Otsu. “A Threshold Selection Method from Gray-Level Histograms,” IEEE Transactions on Systems, Man, and Cybernetics, vol. 9, no. 1, pp. 62-66, January 1979.
[14] “Sobel operator,” Wikipedia, [Online]. Available: https://en.wikipedia.org/wiki/Sobel_operator
[15] Pierre Soille. “Morphological Image Analysis; Principles and Applications”, Springer-Verlag Berlin Heidelberg, ISBN 3-540-65671-5(1999),2nd edition (2003).
[16] Lienhart, R. and Maydt, J., “An Extended set of Haar-like features for rapid object detection”, IEEE International Conference on Image Processing, pp. I:900-903,2002
[17] L.Sirovich and M. Kirby. “Low-dimensional procedure for the characterization of human faces,” Journal of Optical Society of America A, 4(3), pp. 519-524,1987.
[18] M. Turk and A. Pentland. “Face recognition using eigenfaces,” Proc. IEEE Conference on Computer Vision and Pattern Recognition: 586-591. 1991.
[19] 謝欣君,使用高斯濾波器及類神經網路之簽名辨識,國立高雄海洋科技大學碩士論,民104。
[20] “Python”, [Online]. Available: https://en.wikipedia.org/wiki/Python_(programming_language)
[21] “AT&T face database”,[Online],Available:
http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html

QR CODE