五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【圖像拼接】基于Harris角點(diǎn)檢測實(shí)現(xiàn)圖像拼接含Matlab源碼

2022-09-10 11:00 作者:Matlab工程師  | 我要投稿

1 簡介

Harris 角點(diǎn)檢測算法是由?C.Harris 和 J.Stephens 在 1988 年提出,此算法的原理是建立在?Moravec 算法的基礎(chǔ)上進(jìn)行大幅改進(jìn)的,相比之前的算法更具明顯的優(yōu)勢。Moravec如上文中的介紹說明,相比?Harris?檢測算法而言,

Moravec 檢測算法僅僅只是是在水平、垂直、對角線和反對角線四個方向上對灰度變化的信息進(jìn)行處理,而 Harris 檢測算法受到數(shù)學(xué)理論泰勒(Taylor

)級數(shù)的啟發(fā),以此展開思路,已不只是限定于四個方向,而是計(jì)算窗口內(nèi)沿任意方向的灰度變化情況,最終利用數(shù)學(xué)解析式進(jìn)一步確定所需特征點(diǎn)。并且算法引入高斯平滑算子,更加優(yōu)化了算法自身的魯棒性。不僅如此,Harris?

檢測算法還受到信號處理中自相關(guān)函數(shù)的啟迪,從而使用了自相關(guān)函數(shù)相關(guān)聯(lián)的 M?矩陣。

該算法中 M?矩陣的特征值即自相關(guān)函數(shù)的一階求導(dǎo)函數(shù),判斷該點(diǎn)是否為特征點(diǎn)即看此處像素點(diǎn)的曲率值是否夠高。

2 部分代碼

function [imgout]=warpTheImage(H,img1,img2)tform = maketform('projective',H');img21 = imtransform(img2,tform); % reproject img2% [M1 N1 dim] = size(img1);[M2 N2 dimk1] = size(img2);% do the mosaicpt = zeros(3,4);pt(:,1) = H*[1;1;1];pt(:,2) = H*[N2;1;1];pt(:,3) = H*[N2;M2;1];pt(:,4) = H*[1;M2;1];x2 = pt(1,:)./pt(3,:);y2 = pt(2,:)./pt(3,:);up = round(min(y2));Yoffset = 0;if up <= 0 ?Yoffset = -up+1; ?up = 1;endleft = round(min(x2));Xoffset = 0;if left<=0 ?Xoffset = -left+1; ?left = 1;end[M3 N3 dimk2] = size(img21);rowBegin=max(up,Yoffset+1); %overlap AreacolumnBegin=max(left,Xoffset+1);rowEnd=min(up+M3-1,Yoffset+M1);columnEnd=min(left+N3-1,Xoffset+N1);imgout(up:up+M3-1,left:left+N3-1,:) = img21;overlapAreaP2=imgout(rowBegin:rowEnd,columnBegin:columnEnd,:);%pixel values of overlap area from P2% img1 is above img21imgout(Yoffset+1:Yoffset+M1,Xoffset+1:Xoffset+N1,:) = img1;overlapAreaP1=imgout(rowBegin:rowEnd,columnBegin:columnEnd,:); overlapArea=imgout(rowBegin:rowEnd,columnBegin:columnEnd); [overRowLength,overColumnLength]=size(overlapArea);%overlap Row and Column length distFromBound1OneLine=(overColumnLength-1:-1:0);%this is just one line distFromBound1=repmat(distFromBound1OneLine,overRowLength,1); ?%Replicate and tile it to the size of the overlapArea. Because the same column has the same distance to the boundary distFromBound2OneLine=(0:overColumnLength-1); distFromBound2=repmat(distFromBound2OneLine,overRowLength,1);%this the dist from boundary 2 % blending% ?blendingImg(:,:,:)=(overlapAreaP2(:,:,:).*distFromBound2+overlapAreaP1(:,:,:).*distFromBound1)/(overColumnLength-1);% imshow(blending)overlapAreaP2=double(overlapAreaP2);overlapAreaP1=double(overlapAreaP1);blendingImg=zeros(overRowLength,overColumnLength,3);for i=1:3blendingImg(:,:,i)=(overlapAreaP2(:,:,i).*distFromBound2+overlapAreaP1(:,:,i).*distFromBound1)/(overColumnLength-1);endblendingImg=uint8(blendingImg);% imshow(blendingImg);title('after blending'); imgout(rowBegin:rowEnd,columnBegin:columnEnd,:)=blendingImg;end

3 仿真結(jié)果

4 參考文獻(xiàn)

[1]賈瑩. 基于Harris角點(diǎn)檢測算法的圖像拼接技術(shù)研究[D]. 吉林大學(xué).

博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機(jī)、圖像處理、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。

部分理論引用網(wǎng)絡(luò)文獻(xiàn),若有侵權(quán)聯(lián)系博主刪除。



【圖像拼接】基于Harris角點(diǎn)檢測實(shí)現(xiàn)圖像拼接含Matlab源碼的評論 (共 條)

分享到微博請遵守國家法律
微博| 互助| 海安县| 大足县| 若羌县| 勃利县| 阳新县| 苏尼特左旗| 隆林| 留坝县| 大同县| 新巴尔虎左旗| 抚宁县| 满城县| 云林县| 麻栗坡县| 天柱县| 东源县| 蓬莱市| 佳木斯市| 竹北市| 洱源县| 荆门市| 扬州市| 黎城县| 玛纳斯县| 小金县| 亳州市| 安新县| 中宁县| 即墨市| 九龙坡区| 陕西省| 松溪县| 弋阳县| 泾川县| 虹口区| 都匀市| 浑源县| 成安县| 宁都县|