資源簡介
國外一個課程資料,包含了AAM和ASM的使用例子以及算法實現文檔!還是很實用的!算法使用的圖片里面都有!是AAM和ASM使用的必備教程!

代碼片段和文件信息
%?This?script?shows?an?example?of?a?working?basic?Active?Appearance?Model?(AAM)
%?with?a?few?hand?pictures.
%
%?Literature?used:
%?-?T.F.?Cootes?G.J?Edwards?and?CJ.?Taylor?“Active?Appearance?Models“?
%???Proc.?European?Conference?on?Computer?Vision?1998
%?-?T.F.?Cootes?G.J?Edwards?and?CJ.?Taylor?“Active?Appearance?Models“?
%???IEEE?Transactions?on?Pattern?Analysis?and?Machine?Intelligence?2001
%
%?Functions?are?written?by?D.Kroon?University?of?Twente?(March?2010)
%Add?functions?path?to?matlab?search?path
functionname=‘AAM_example.m‘;?functiondir=which(functionname);
functiondir=functiondir(1:end-length(functionname));
addpath([functiondir?‘/AAM?Functions‘])
addpath([functiondir?‘/Functions‘])
%%?Set?options
%?Number?of?contour?points?interpolated?between?the?major?landmarks.
options.ni=20;
%?Set?normal?appearance/contour?limit?to?+-?m*sqrt(?eigenvalue?)
options.m=3;
%?Size?of?texture?appereance?image
options.texturesize=[100?100];
%?If?verbose?is?true?all?debug?images?will?be?shown.
options.verbose=true;
%?Number?of?image?scales
options.nscales=4;
%?Number?of?search?itterations
options.nsearch=15;
%%?Load?training?data
%?First?Load?the?Hand?Training?DataSets?(Contour?and?Image)
%?The?LoadDataSetNiceContour?not?only?reads?the?contour?points?but
%?also?resamples?them?to?get?a?nice?uniform?spacing?between?the?important
%?landmark?contour?points.
TrainingData=struct;
if(options.verbose)?figure?end
for?i=1:10
????is=num2str(i);?number?=?‘000‘;?number(end-length(is)+1:end)=is;
????filename=[‘Fotos/train‘?number?‘.mat‘];
%?Load?the?trianing?data
????[TrainingData(i).xTrainingData(i).yTrainingData(i).I]=LoadDataSetNiceContour(filenameoptions.nioptions.verbose);
%?Replace?the?grey?level?photo?by?color?photo
TrainingData(i).I=im2double(imread([filename(1:end-4)?‘.jpg‘]));
end
%?The?Active?Appearance?Model?is?constructed?for?multiple?image?scales.
%?During?search?first?the?coarse?scale?is?used?to?detect?the?object
%?followed?by?the?finer?scales?(larger?images).?This?makes?the?model?robust
%?against?initial?location?and?local?minima
%?The?structure?which?will?contain?the?AAM?model?for?4?image?scales
Data=cell(14);
for?scale=1:options.nscales
????%%?Shape?Model?%%
????%?Make?the?Shape?model?which?finds?the?variations?between?contours
????%?in?the?training?data?sets.?And?makes?a?PCA?model?describing?normal
????%?contours
????[ShapeDataTrainingData]?=?AAM_MakeShapeModel(TrainingData);
????
????%?Show?some?eigenvector?variations
????if(options.verbose)
????????figure
????????for?i=1:6
????????????xtest?=?ShapeData.x_mean?+?ShapeData.Evectors(:i)*sqrt(ShapeData.Evalues(i))*3;
????????????subplot(23i)?hold?on;
????????????plot(xtest(end/2+1:end)xtest(1:end/2)‘r‘);
????????????plot(ShapeData.x_mean(end/2+1:end)ShapeData.x_mean(1:end/2)‘b‘);
????????end
????end
????
????%%?Appearance?model?%%
????%?Piecewise?linear?image?transformation?is?used?to?align?a
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????984??2010-03-17?14:49??ASM\AAM?Functions\AAM_align_data.m
?????文件????????404??2010-03-17?14:49??ASM\AAM?Functions\AAM_align_data_inverse.m
?????文件???????1216??2010-03-19?14:25??ASM\AAM?Functions\AAM_Appearance2Vector.m
?????文件???????7841??2010-03-19?14:47??ASM\AAM?Functions\AAM_ApplyModel.m
?????文件???????1331??2010-03-17?14:57??ASM\AAM?Functions\AAM_CombineShapeAppearance.m
?????文件???????1908??2010-03-19?14:24??ASM\AAM?Functions\AAM_MakeAppearanceModel.m
?????文件???????6181??2010-03-17?15:34??ASM\AAM?Functions\AAM_MakeSearchModel.m
?????文件???????1285??2010-03-17?14:47??ASM\AAM?Functions\AAM_MakeShapeModel.m
?????文件????????155??2010-03-17?14:49??ASM\AAM?Functions\AAM_NormalizeAppearance.m
?????文件????????618??2010-03-19?14:34??ASM\AAM?Functions\AAM_Vector2Appearance.m
?????文件???????2350??2010-03-17?14:59??ASM\AAM?Functions\AAM_Weights.m
?????文件???????8099??2010-03-22?10:49??ASM\AAM_example.m
?????文件????????668??2011-04-07?13:57??ASM\ASM?Functions\ASM_align_data.m
?????文件????????232??2010-03-17?14:50??ASM\ASM?Functions\ASM_align_data_inverse.m
?????文件???????5652??2011-04-09?17:42??ASM\ASM?Functions\ASM_ApplyModel.m
?????文件????????612??2011-04-09?15:01??ASM\ASM?Functions\ASM_GetContourNormals.m
?????文件???????1560??2011-04-07?17:20??ASM\ASM?Functions\ASM_getProfileAndDerivatives.m
?????文件???????3654??2011-04-08?08:52??ASM\ASM?Functions\ASM_MakeAppearanceModel.m
?????文件???????1079??2011-04-07?15:40??ASM\ASM?Functions\ASM_MakeShapeModel.m
?????文件???????4656??2011-04-15?22:10??ASM\ASM_example.m
?????文件??????23898??2010-02-11?20:48??ASM\Fotos\test001.jpg
?????文件??????21022??2010-02-10?16:38??ASM\Fotos\train001.jpg
?????文件?????792862??2010-02-12?17:03??ASM\Fotos\train001.mat
?????文件??????32785??2010-02-10?16:38??ASM\Fotos\train002.jpg
?????文件????1240485??2010-02-12?17:01??ASM\Fotos\train002.mat
?????文件??????25816??2010-02-10?16:38??ASM\Fotos\train003.jpg
?????文件?????935188??2010-02-12?17:03??ASM\Fotos\train003.mat
?????文件??????31684??2010-02-10?16:38??ASM\Fotos\train004.jpg
?????文件????1277713??2010-02-12?17:03??ASM\Fotos\train004.mat
?????文件??????32044??2010-02-10?16:38??ASM\Fotos\train005.jpg
............此處省略27個文件信息
- 上一篇:三星手機固件 Tar 打包工具
- 下一篇:導彈制導和控制系統的分析與設計.pdf
評論
共有 條評論