91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 10.23MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-11-12
  • 語言: Matlab
  • 標簽:

資源簡介

這是在MATLAB exchange下載的基于主動輪廓模型(ASM)的MATLAB二維圖像分割代碼,自己已經(jīng)對代碼進行了詳細注釋。里面也有數(shù)據(jù)采集的代碼,可以直接運行,大家也可以在MATLAB exchange上對原始代碼進行下載。

資源截圖

代碼片段和文件信息

%?This?script?shows?an?example?of?an?working?basic?Active?Shape?Model
%?with?a?few?hand?pictures.
%
%?Literature?used:?Ginneken?B.?et?al.?“Active?Shape?Model?Segmentation?
%?with?Optimal?Features“?IEEE?Transactions?on?Medical?Imaging?2002.
%
%?Functions?are?written?by?D.Kroon?University?of?Twente?(February?2010)
clear?all;?clc;?close?all;
%?Add?functions?path?to?matlab?search?path
functionname=‘ASM_2D_example.m‘;?functiondir=which(functionname);
functiondir=functiondir(1:end-length(functionname));
addpath([functiondir?‘Functions‘])
addpath([functiondir?‘ASM?Functions‘])
addpath([functiondir?‘InterpFast_version1‘])

%?Try?to?compile?c-files
cd([functiondir?‘InterpFast_version1‘])
try
????mex(‘interp2fast_double.c‘‘image_interpolation.c‘);
catch?ME
????disp(‘compile?c-files?failed:?example?will?be?slow‘);
end
cd(functiondir);


%%?Set?options
%?Number?of?contour?points?interpolated?between?the?major?landmarks.
%?在主要特征點之間插值的輪廓點的數(shù)量
options.ni=20;
%?Length?of?landmark?intensity?profile
%?強度剖面的特征點的長度
options.k?=?8;?
%?Search?length?(in?pixels)?for?optimal?contourpoint?position?
%?為了優(yōu)化特征點位置,尋找像素的長度??
%?in?both?normal?directions?of?the?contourpoint.
%?在輪廓點的法向方向的兩邊
options.ns=6;
%?Number?of?image?resolution?scales
%?圖像分辨率尺度
options.nscales=2;
%?Set?normal?contour?limit?to?+-?m*sqrt(?eigenvalue?)
%?設置輪廓法線??誤差為正負m*sqrt(?eigenvalue?)????那個正負根3namda
options.m=3;
%?Number?of?search?itterations
%?搜索迭代次數(shù)
options.nsearch=40;
%?If?verbose?is?true?all?debug?images?will?be?shown.
%?如果verbose是真,所有調試圖像都顯示???
options.verbose=true;
%?The?original?minimal?Mahanobis?distance?using?edge?gradient?(true)
%?使用邊界梯度初始最初的最小馬氏距離
%?or?new?minimal?PCA?parameters?using?the?intensities.?(false)
%?或者用強度作為新的最小PCA參數(shù)
options.originalsearch=false;??

%%?Load?training?data???數(shù)據(jù)載入
%?First?Load?the?Hand?Training?DataSets?(Contour?and?Image)
%?首先載入手訓練數(shù)據(jù)集合(輪廓和圖像)
%?The?LoadDataSetNiceContour?not?only?reads?the?contour?points?but?
%?載入好的輪廓數(shù)據(jù)集合,不僅讀取輪廓點,也
%?also?resamples?them?to?get?a?nice?uniform?spacing?between?the?important
%?為得到一個好的統(tǒng)一的特征空間,在兩個重要的輪廓特征點之間對他們進行重采樣
%?landmark?contour?points.
%?數(shù)據(jù)變量初始化
TrainingData=struct;
for?i=1:10
????%?讀取Fotos文件夾里面的數(shù)據(jù),并開始初始化文件名
????is=num2str(i);?
????number?=?‘000‘;
????number(end-length(is)+1:end)=is;?
????%?filename=[‘..\images2D\contour‘?number?‘.mat‘];
????%?load(filename);
????%?讀取圖片
????filename=[‘Fotos/train‘?number?‘.jpg‘];
????%?將圖片數(shù)據(jù)變?yōu)楦↑c型并顯示
????I=im2double(imread(filename));??
????%?讀取該圖片對應的mat數(shù)據(jù)
????filename=[‘Fotos/train‘?number?‘.mat‘];
????%?繪制保存的mat數(shù)據(jù)插值后在圖像中的位置
????[VerticesLines]=LoadDataSetNiceContour(filenameoptions.nioptions.verbose);
????if(options.verbose)
????????t=mod(i-14);?
????????if(t==0)?
????????????figure;?
????????end
????????subplot(22t+1)?
????????imshow(I);?
????????hold?on;
????????%?P1中存放的是沒有插值的鼠標采集的點??P2中存放的是對采集的點插值后的點?
????????P1=Vertices(Lines(:1):);?P2=Vertices(Lines(:2):);
????????plot([P1(:2)?P2(:2)]‘[P1(

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-02-28?16:32??ASM_2D\
?????目錄???????????0??2017-01-19?17:11??ASM_2D\ASM?Functions\
?????文件????????6342??2017-01-19?17:16??ASM_2D\ASM?Functions\ASM_ApplyModel2D.m
?????文件?????????724??2017-01-19?16:42??ASM_2D\ASM?Functions\ASM_GetContourNormals2D.m
?????文件????????2852??2014-02-12?13:49??ASM_2D\ASM?Functions\ASM_MakeAppearanceModel2D.m
?????文件????????1234??2017-01-19?16:24??ASM_2D\ASM?Functions\ASM_MakeShapeModel2D.m
?????文件????????1001??2017-01-19?16:21??ASM_2D\ASM?Functions\ASM_align_data2D.m
?????文件?????????343??2017-01-19?16:38??ASM_2D\ASM?Functions\ASM_align_data_inverse2D.m
?????文件????????2028??2017-01-19?16:56??ASM_2D\ASM?Functions\ASM_getProfileAndDerivatives2D.m
?????文件????????5215??2017-01-19?17:15??ASM_2D\ASM_2D_example.m
?????目錄???????????0??2017-01-19?14:36??ASM_2D\Fotos\
?????文件???????11264??2014-02-12?13:49??ASM_2D\Fotos\Thumbs.db
?????文件???????23898??2014-02-12?13:49??ASM_2D\Fotos\test001.jpg
?????文件???????21022??2014-02-12?13:49??ASM_2D\Fotos\train001.jpg
?????文件??????792862??2014-02-12?13:49??ASM_2D\Fotos\train001.mat
?????文件???????32785??2014-02-12?13:49??ASM_2D\Fotos\train002.jpg
?????文件?????1240485??2014-02-12?13:49??ASM_2D\Fotos\train002.mat
?????文件???????25816??2014-02-12?13:49??ASM_2D\Fotos\train003.jpg
?????文件??????935188??2014-02-12?13:49??ASM_2D\Fotos\train003.mat
?????文件???????31684??2014-02-12?13:49??ASM_2D\Fotos\train004.jpg
?????文件?????1277713??2014-02-12?13:49??ASM_2D\Fotos\train004.mat
?????文件???????32044??2014-02-12?13:49??ASM_2D\Fotos\train005.jpg
?????文件?????1284249??2014-02-12?13:49??ASM_2D\Fotos\train005.mat
?????文件???????22160??2014-02-12?13:49??ASM_2D\Fotos\train006.jpg
?????文件??????815440??2014-02-12?13:49??ASM_2D\Fotos\train006.mat
?????文件???????21454??2014-02-12?13:49??ASM_2D\Fotos\train007.jpg
?????文件??????787937??2014-02-12?13:49??ASM_2D\Fotos\train007.mat
?????文件???????24265??2014-02-12?13:49??ASM_2D\Fotos\train008.jpg
?????文件??????889927??2014-02-12?13:49??ASM_2D\Fotos\train008.mat
?????文件???????22379??2014-02-12?13:49??ASM_2D\Fotos\train009.jpg
?????文件??????965003??2014-02-12?13:49??ASM_2D\Fotos\train009.mat
............此處省略31個文件信息

評論

共有 條評論

相關資源