資源簡介
壓縮包中包含的具體內容:
對給定數據中的6個不同場景圖像,進行全景圖拼接操作,具體要求如下:
(1)?尋找關鍵點,獲取關鍵點的位置和尺度信息(DoG檢測子已由KeypointDetect文件夾中的detect_features_DoG.m文件實現;請參照該算子,自行編寫程序實現Harris-Laplacian檢測子)。
(2)?在每一幅圖像中,對每個關鍵點提取待拼接圖像的SIFT描述子(編輯SIFTDescriptor.m文件實現該操作,運行EvaluateSIFTDescriptor.m文件檢查實現結果)。
(3)?比較來自兩幅不同圖像的SIFT描述子,尋找匹配關鍵點(編輯SIFTSimpleMatcher.m文件計算兩幅圖像SIFT描述子間的Euclidean距離,實現該操作,運行EvaluateSIFTMatcher.m文件檢查實現結果)。
(4)?基于圖像中的匹配關鍵點,對兩幅圖像進行配準。請分別采用最小二乘方法(編輯ComputeAffineMatrix.m文件實現該操作,運行EvaluateAffineMatrix.m文件檢查實現結果)和RANSAC方法估計兩幅圖像間的變換矩陣(編輯RANSACFit.m 文件中的ComputeError()函數實現該操作,運行TransformationTester.m文件檢查實現結果)。
(5)?基于變換矩陣,對其中一幅圖像進行變換處理,將其與另一幅圖像進行拼接。
(6)?對同一場景的多幅圖像進行上述操作,實現場景的全景圖拼接(編輯MultipleStitch.m文件中的makeTransformToReferenceFrame函數實現該操作)。可以運行StitchTester.m查看拼接結果。
(7)?請比較DoG檢測子和Harris-Laplacian檢測子的實驗結果。圖像拼接的效果對實驗數據中的幾個場景效果不同,請分析原因。
已經實現這些功能,并且編譯運行均不報錯!
代碼片段和文件信息
function?H?=?ComputeAffineMatrix(?Pt1?Pt2?)
%ComputeAffineMatrix?
%???Computes?the?transformation?matrix?that?transforms?a?point?from
%???coordinate?frame?1?to?coordinate?frame?2
%Input:
%???Pt1:?N?*?2?matrix?each?row?is?a?point?in?image?1?
%???????(N?must?be?at?least?3)
%???Pt2:?N?*?2?matrix?each?row?is?the?point?in?image?2?that?
%???????matches?the?same?point?in?image?1?(N?should?be?more?than?3)
%Output:
%???H:?3?*?3?affine?transformation?matrix?
%???????such?that?H*pt1(i:)?=?pt2(i:)
????N?=?size(Pt11);
????if?size(Pt1?1)?~=?size(Pt2?1)
????????error(‘Dimensions?unmatched.‘);
????elseif?N<3
????????error(‘At?least?3?points?are?required.‘);
????end
????
????%?Convert?the?input?points?to?homogeneous?coordintes.
????P1?=?[Pt1‘;ones(1N)];
????P2?=?[Pt2‘;ones(1N)];
????%?Now?we?must?solve?for?the?unknown?H?that?satisfies?H*P1=P2
????%?But?MATLAB?needs?a?system?in?the?form?Ax=b?and?A\b?solves?for?x.
????%?In?other?words?the?unknown?matrix?must?be?on?the?right.
????%?But?we?can?use?the?properties?of?matrix?transpose?to?get?something
????%?in?that?form.?Just?take?the?transpose?of?both?sides?of?our?equation
????%?above?to?yield?P1‘*H‘=P2‘.?Then?MATLAB?can?solve?for?H‘?and?we?can
????%?transpose?the?result?to?produce?H.
????
????H?=?[];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%??????????????????????????????????????????????????????????????????????????????%
%????????????????????????????????YOUR?CODE?HERE:???????????????????????????????%
%????????Use?MATLAB‘s?“A\b“?syntax?to?solve?for?H_transpose?as?discussed???????%
%?????????????????????above?then?convert?it?to?the?final?H????????????????????%
%??????????????????????????????????????????????????????????????????????????????%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
????
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%???????END?OF?YOUR?CODE??????????????????????????????????????????????%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
????
????%?Sometimes?numerical?issues?cause?least-squares?to?produce?a?bottom
????%?row?which?is?not?exactly?[0?0?1]?which?confuses?some?of?the?later
????%?code.?So?we‘ll?ensure?the?bottom?row?is?exactly?[0?0?1].
????H(3:)?=?[0?0?1];
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????207??2013-10-02?19:11??圖像拼接作業\checkpoint\Affine_ref.mat
?????文件?????987133??2013-10-02?19:23??圖像拼接作業\checkpoint\Match_input.mat
?????文件????????255??2013-10-02?19:27??圖像拼接作業\checkpoint\Match_ref.mat
?????文件??????76813??2013-10-06?12:46??圖像拼接作業\checkpoint\SIFT_ref.mat
?????文件???????2346??2013-10-06?10:50??圖像拼接作業\ComputeAffineMatrix.m
?????文件?????178270??2018-04-17?14:50??圖像拼接作業\data\building_01.jpg
?????文件?????136247??2018-04-17?14:50??圖像拼接作業\data\building_02.jpg
?????文件?????154376??2018-04-17?14:50??圖像拼接作業\data\building_03.jpg
?????文件?????177695??2018-04-17?14:50??圖像拼接作業\data\building_04.jpg
?????文件????2817144??2018-04-23?08:24??圖像拼接作業\data\campus_00.jpg
?????文件????2944043??2018-04-23?08:24??圖像拼接作業\data\campus_01.jpg
?????文件????2996977??2018-04-23?08:24??圖像拼接作業\data\campus_02.jpg
?????文件????3254177??2018-04-23?08:24??圖像拼接作業\data\campus_03.jpg
?????文件????3183675??2018-04-23?08:24??圖像拼接作業\data\campus_04.jpg
?????文件?????108679??2013-10-06?11:17??圖像拼接作業\data\pine1.jpg
?????文件?????128952??2013-10-06?11:18??圖像拼接作業\data\pine2.jpg
?????文件?????126069??2013-10-06?11:18??圖像拼接作業\data\pine3.jpg
?????文件?????120636??2013-10-06?11:18??圖像拼接作業\data\pine4.jpg
?????文件?????195037??2009-10-10?12:37??圖像拼接作業\data\trees_000.jpg
?????文件?????230526??2009-10-10?12:49??圖像拼接作業\data\trees_001.jpg
?????文件?????253284??2009-10-10?12:37??圖像拼接作業\data\trees_002.jpg
?????文件?????267269??2009-10-10?12:37??圖像拼接作業\data\trees_003.jpg
?????文件?????255429??2018-04-23?16:23??圖像拼接作業\data\watering_cart_00.jpg
?????文件?????219885??2018-04-23?16:24??圖像拼接作業\data\watering_cart_01.jpg
?????文件?????173547??2018-04-23?16:24??圖像拼接作業\data\watering_cart_02.jpg
?????文件?????165564??2018-04-23?16:24??圖像拼接作業\data\watering_cart_03.jpg
?????文件?????203176??2009-10-11?14:14??圖像拼接作業\data\yosemite1.jpg
?????文件?????199756??2009-10-11?14:14??圖像拼接作業\data\yosemite2.jpg
?????文件?????183602??2009-10-11?14:14??圖像拼接作業\data\yosemite3.jpg
?????文件?????253504??2009-10-11?14:14??圖像拼接作業\data\yosemite4.jpg
............此處省略60個文件信息
評論
共有 條評論