第五章 演算法
6.5 未來發展
越來越發達的時代中,通訊佔人類的重要性越來越大,不只是網 際網路普遍化,多媒體的應用也與人們的生活幾乎已經結合在一起 了。犯罪手法也因為科技的進步而越來越防不勝防,因此監視系統不 能只靠錄影以及人工辨識來達到防止犯罪。經過這次實驗讓我們發覺 到,不同的演算法、偵測條件的多寡會大大影響到偵測效果。
因此,我們將朝著利用更多的人臉特徵,例如:人臉約略呈橢圓 形、眼睛與嘴唇略呈等腰三角形等。或是讓系統自行偵測環境,取得 所需的參數,減少人工部分讓系統更為自動化。更進一步,希望能夠 達到人臉追蹤,將追蹤到的人臉資訊能夠加以放大、解析或作到更多 的處理。最後,基於這些種種開發研究也是學生未來想達到的目標與 期望。
附 錄
程式 Canny edge detection
//**********************************************************
// Dilation (擴散)
//**********************************************************
int findmaximum(unsigned char *in) {
int findminimum(unsigned char *in) {
//**********************************************************
// Morphology Smoothing
//**********************************************************
void Morphology(unsigned char *org,unsigned char *postSmoothing) {
int i,j;
unsigned char a[Im_Height*Im_Width];
unsigned char b[Im_Height*Im_Width];
unsigned char c[Im_Height*Im_Width];
//---
//--- Dilation ---
*(c+i*Im_Width+j) = findmaximum(b+i*Im_Width+j);
}
*(postSmoothing+i*Im_Width+j) = findminimum(c+i*Im_Width+j);
}
void Canny(unsigned char *Gausian, unsigned char *postCanny) {
//---
//--- 計算梯度向量方向(角度:0~360度) ---
else if(sumX<0 && sumY>0) { sumX = -sumX;
ORIENT = 180 - ((atan((float)(sumY)/(float)(sumX))) * (180/M_PI)); } else if(sumX>0 && sumY<0) {
sumY = -sumY; else if(edgeDirection == 45){
leftPixel = (int)(Gausian[(r+1)*Im_Width + c - 1]);
else {
leftPixel = (int)(Gausian[(r-1)*Im_Width+c-1]);
rightPixel = (int)(Gausian[(r+1)*Im_Width+c+1]); }
if(SUM < leftPixel || SUM < rightPixel)
P4 > HighThreshold || P5 > HighThreshold || P6 > HighThreshold ||
P7 > HighThreshold || P8 > HighThreshold) SUM = 255;
else
SUM = 0; }}
postCanny[r*Im_Width+c] = (unsigned char)(SUM); }}
}
程式 color information detection
//**********************************************************
// color information 偵測
//**********************************************************
void HSI_processing (unsigned char *in , unsigned char *postHSI) {
//---
ans = sqrt(y*y+(S-S0)*(S-S0)+(I-I0)*(I-I0));
if (ans > R0) return 0;
else return 1;
}
//**********************************************************
程式 計算中心點(H0,S0,I0)和球半徑R0
//*********************************************************
// 計算中心點(H0,S0,I0)和球半徑R0
//*********************************************************
void __fastcall TForm1::Form1_Im2MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) {
int P,i,j,sum,m,H1,H2;
int R, G, B, R_H, R_S, R_I, R0;
float x,y,z,sita;
unsigned char H[C_Height*C_Width];
unsigned char S[C_Height*C_Width];
unsigned char I[C_Height*C_Width];
//---
TCColor c = Form1_Im3->Canvas->Pixels[i][j];
B = (int)c.Blue;
H[P] = (int)(360-sita);
//--- 計算S值---
for(i=0;i<C_Size;i++) {
H1 = H[i];
y = get_RH(H0,H1);
}
R_H = x*100/180;
//---
Label2->Caption = S0;
Label3->Caption = I0;
Label4->Caption = R0;
參 考 文 獻
◎文章資料
[1] Four Approaches to Face Detection 陳必衷 pp1.
[2] 利用三維形態分析診斷肺臟腫瘤之系統 葉嘉芬 pp26.
[3] 以邊為基礎之衛星影像中的車輛偵測 王彥棋(國立中央大學 資訊工程研究所碩士論文)
[4] 視訊監控系統之物件抽取研究 李俊儀 (國立雲林科技大學 電機工程系碩士論文)
[5] 文字辨識論文研討 第二章 pp13. (國立嘉義大學資訊工程所 洪燕竹)
[6] Introduction to Digital Image Processing with MATLAB pp234~277.
[7] http://www.me.ncu.edu.tw/teacher/Subject/B91_2/A/ME564/
Ch_5.doc
[8] http://www.cee.hw.ac.uk/hipr/html/sobel.html
[9] CCIR, Encoding parameters of digital television for studios, CCIR Recommendation 601- 2, Int. Radio Consult.Committee, Geneva, Swizerland,1990.
[10] Crowley, J. L. and Coutaz, J., “Vision for Man Machine Interaction,” Robotics and Autonomous Systems, Vol. 19, pp. 347-358 (1997).
[11] Cahi, D. and Ngan, K. N., “Face Segmentation Using Skin-Color Map in Videophone Applications,” IEEE Transaction on Circuit and Systems for Video Technology, Vol. 9, pp. 551-564 (1999).
[12] Kjeldsen, R. and Kender., J., “Finding Skin in Color Images,”
Proceedings of the Second International Conference on Automatic Face and Gesture Recognition, pp. 312-317 (1996).
[13] http://www.cse.iitk.ac.in/users/pg/
[14] Cai, J., Goshtasby, A. and Yu, C., “Detecting Human Faces in Color Images,” Proceedings of International Workshop on
Multi-Media Database Management Systems,pp. 124-131 (1998).
[15] Yang, J., Lu, W. and Waibel A., “Skin Color Modeling and Adaptation,” (CMUCS-97-146,) CS Department, CMU, PA,U.S.A. (1997).
[16] Yang, M. H. and Ahuja., N., “Detecting Human Faces in Color Images”, Proceedings of IEEE International Conference on Image Processing, Vol.1, pp. 127-130 (1998).
[17] Yang, M. H., Kriegman, J. and Ahuja, N.,“Detecting Faces in Images: A Survey,”IEEE Transaction on Pattern Analysis and Machine Intelligence, Vol. 24, pp. 34-58 (2002).
[18] http://www.csie.fju.edu.tw/~jykuo/semi/Face_Detection_
Report.ppt
[19] http://content.edu.tw/junior/computer/tp_ct/ch06/ch6-1/
graph27.htm
[20] http://andrew.csie.ncyu.edu.tw/DOC2/文字辨識.pdf
[21] A Robust Skin Color Based Face Detection Algorithm Sanjay Kr. Singh1, D. S. Chauhan2, Mayank Vatsa3, Richa Singh3*
[22] 數位影像處理,原著(Digital Imaging Processing, by R. C.
Gonzalez and E. Woods),繆紹綱編譯,2003 年,高立圖書公司。
[23] 利用環場及 PTZ 攝影機建構室內環境監控系統作臉部辨識 陳志銘 (國立中央大學資訊工程研究所碩士論文)
◎表格參考
▼表一:人臉檢測研究綜述梁路宏 艾海舟 徐光佑 張鈸 pp2.
(清華大學電腦系,智慧技術與系統國家重點實驗室,北京)
◎圖片來源
▲圖 3.1:http://www.me.ncu.edu.tw/teacher/Subject/B91_2/A/ME564 /Ch_5.doc
▲圖 3.2~3.4:Introduction to Digital Image Processing with Matlab pp237、243.
▲圖 3.5:http://nmlab.cs.nchu.edu.tw/index.php?blogid=1&archive= 2004-05 (國立中興大學資訊科學系-網路多媒體實驗室 嚴志軒)
▲圖 3.6 ~3.9:http://www.me.lhu.edu.tw/~tin/PPT/4-Grayscale/
43-GrayMorphology.files/frame.htm
▲圖 4.1、4.5、4.6:A Robust Skin Color Based Face Detection Algorithm Sanjay Kr. Singh1, D. S. Chauhan2, Mayank Vatsa3, Richa Singh3*
▲圖 4.2:http://neural.ee.ncku.edu.tw/Links/MTable/Course/Image/
Chapter06-Art.pdf