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

  • 大小: 10KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-20
  • 語言: 其他
  • 標簽: AANAP??APAP??圖像拼接??

資源簡介

該文件中包含了Adaptive as-natural-as-possible image stitching論文以及As-Projective-As-Possible Image Stitching with Moving DLT這兩種較為經(jīng)典的圖像拼接方法。具體包含了ransac算法、multi-GSsampling算法、求取單應性矩陣Homography的奇異矩陣算法、相似矩陣變換的求取、圖像翹曲、局部單應性矩陣權重占比、圖像融合等算法。具體過程為:1.利用sift算法提取特征點 2.利用ransac multi-gs算法求取單應性矩陣H 3.利用moving DLT求取reference image的翹曲 4.利用提到的線性單應性矩陣H_linear求取網(wǎng)格化后的局部單應性矩陣 5.圖像融合及拼接

資源截圖

代碼片段和文件信息

%**************************************************%
%?An?implementation?of?AANAP?below:
%
%?Lin?C?C?Pankanti?S?U?Ramamurthy?K?N?et?al.
%?Adaptive?as-natural-as-possible?image?stitching?[C]
%?2015?IEEE?Conference?on?Computer?Vision?and?Pattern?Recognition?(CVPR).?
%?IEEE?2015:?1155-1163.
%?
%?Just?for?fun!?For?commercial?purposes?please?contact?the?author.
%?by?YaqiLYU
%?https://www.zhihu.com/question/34535199/answer/135169187
%**************************************************%

close?all

run(‘vlfeat-0.9.14/toolbox/vl_setup‘);
addpath(‘modelspecific‘);
addpath(‘mexfiles‘);
addpath(‘multigs‘);

%%?Global?options
%?0?-?Bilinear?interpolation?implementation?by?MATLAB,slower?but?better
%?1?-?Nearest?neighbor?interpolationimplementation?by?C++?Faster?but?worse
fast_stitch?=?1;????
img_n?=?2;??%?only?support?two?image?stitching
in_name?=?cell(img_n1);
in_name{1}?=?‘images\images\P1010517.JPG‘;
in_name{2}?=?‘images\images\P1010520.JPG‘;
img_n?=?size(in_name?1);

gamma?=?0;
sigma?=?12.5;

%%?load?and?preprocessing
I?=?cell(img_n?1);
for?i?=?1?:?img_n
????I{i}?=?imread(in_name{i});
end

max_size?=?1000?*?1000;
imgw?=?zeros(img_n?1);
imgh?=?zeros(img_n?1);

for?i?=?1?:?img_n
????if?numel(I{i}(:?:?1))?>?max_size
????????I{i}?=?imresize(I{i}?sqrt(max_size?/?numel(I{i}(:?:?1))));
????end

????imgw(i)?=?size(I{i}?2);
????imgh(i)?=?size(I{i}?1);
end

img1?=?I{1};
img2?=?I{2};
img2?=?imresize(img2size(img11)/size(img21));

figure(4)
imshow(img1[]);
pause(0.3);
figure(5)
imshow(img2[]);
pause(0.3);

%%?User?defined?parameters?for?APAP
clear?global;
global?fitfn?resfn?degenfn?psize?numpar
fitfn?=?‘homography_fit‘;
resfn?=?‘homography_res‘;
degenfn?=?‘homography_degen‘;
psize???=?4;
numpar??=?9;

M?????=?500;
thr_g?=?0.1;

if?fast_stitch
????C1????=?100;
????C2????=?100;
else
????C1????=?200;
????C2????=?200;
end

%%?SIFT?keypoint?detection?and?matching.
[?kp1ds1?]?=?vl_sift(single(rgb2gray(img1))‘PeakThresh‘?0‘edgethresh‘500);
[?kp2ds2?]?=?vl_sift(single(rgb2gray(img2))‘PeakThresh‘?0‘edgethresh‘500);
[match_idxs?scores]?=?vl_ubcmatch(ds1ds2);
f1?=?kp1(:match_idxs(1:));
f2?=?kp2(:match_idxs(2:));

%%?Normalise?point?distribution?and?Outlier?removal?with?Multi-GS?RANSAC.
%?(x1;y1;1;x2;y2;1)
data_orig?=?[?kp1(1:2match_idxs(1:))?;?ones(1size(match_idxs2))?;
??????????????kp2(1:2match_idxs(2:))?;?ones(1size(match_idxs2))?];
[?dat_norm_img1T1?]?=?normalise2dpts(data_orig(1:3:));
[?dat_norm_img2T2?]?=?normalise2dpts(data_orig(4:6:));
data_norm?=?[?dat_norm_img1?;?dat_norm_img2?];

%?Multi-GS
%?rng(0);
[?~res~~?]?=?multigsSampling(100data_normM10);
con?=?sum(res<=thr_g);
[?~?maxinx?]?=?max(con);
inliers?=?find(res(:maxinx)<=thr_g);

%%?Global?homography?(H)?again.
[?HlAD1D2?]?=?feval(fitfndata_norm(:inliers));
Hg?=?T2\(reshape(Hl33)*T1);
Hg?=?Hg?/?Hg(33)

%%?Compute?Global?similarity
S?=?ransac_global_similarity(data_norm(:inliers)data_orig(:inliers)img1img2);
S?=?T2\(S*T1)

%%?Obtaining?size?of

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-11-17?03:54??AANAP-master\
?????文件????????7955??2017-11-17?03:54??AANAP-master\AANAP.m
?????文件????????1065??2017-11-17?03:54??AANAP-master\LICENSE
?????文件????????2465??2017-11-17?03:54??AANAP-master\README.md
?????文件?????????592??2017-11-17?03:54??AANAP-master\apply_mdlt_transform.m
?????文件?????????360??2017-11-17?03:54??AANAP-master\compute_weight.m
?????文件????????1280??2017-11-17?03:54??AANAP-master\homography_linearization.m
?????文件?????????628??2017-11-17?03:54??AANAP-master\image_blending_average.m
?????文件????????1919??2017-11-17?03:54??AANAP-master\image_blending_linear.m
?????文件????????1894??2017-11-17?03:54??AANAP-master\mdlt_warping.m
?????文件?????????579??2017-11-17?03:54??AANAP-master\mesh_warp.m
?????文件????????1520??2017-11-17?03:54??AANAP-master\ransac_global_similarity.m

評論

共有 條評論