資源簡介
adaboost法人臉檢測,圖象庫自己添加。
代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%修改權值
%%變量結果:ht????????????????????????????????????????????弱分離器的判決結果
%%????????Zt??????????????????????????????????????歸一化參數
%%????????W???????????????????????????????????????權值結果
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function?[WhtalphZt]?=?changeweight(BClassifierdatalocatWnum)
alph?=?log((1-BClassifier.error)/BClassifier.error)/2;
feature?=?extract_features(datalocatnum);
sample_num?=?length(data.labels);
Zt?=?0;
threshold_matrix?=?zeros(1length(data.images));?
threshold_matrix(::)?=?BClassifier.threshold;
if?BClassifier.Ori?==?1
???
????ht?=?(feature?>=?threshold_matrix);
????ht?=?ht?+?ht?-?1;
else
????ht?=?(feature?<=?threshold_matrix);
????ht?=?ht?+?ht?-?1;
end
for?i?=?1?:?sample_num
????Zt=W(i)*exp(-alph*data.labels(i)*ht(i))+Zt;
end
for?i?=?1?:?sample_num
????W(i)?=?W(i)*exp(-alph*data.labels(i)*ht(i))/Zt;
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1021??2010-04-16?16:47??adaboost\changeweight.m
?????文件???????2164??2010-04-16?16:36??adaboost\extract_features.m
?????文件???????1750??2010-04-16?16:47??adaboost\judgment.m
?????文件????????292??2010-04-16?17:11??adaboost\manual.txt
?????文件???????3172??2010-04-16?16:34??adaboost\Preprocess.m
?????文件???????2576??2010-04-16?17:06??adaboost\Runme2.m
?????文件????????889??2010-04-10?15:10??adaboost\threshold.m
?????文件???????3116??2010-08-07?14:13??adaboost\Preprocess.asv
?????目錄??????????0??2012-11-05?21:27??adaboost
-----------?---------??----------?-----??----
????????????????14980????????????????????9
- 上一篇:聲紋識別
- 下一篇:BP Match 基于置信傳播的立體匹配算法
評論
共有 條評論