欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
MATLAB程序 Harris角點檢測算法
[打印本頁]
作者:
51hei小小
時間:
2017-6-3 01:45
標題:
MATLAB程序 Harris角點檢測算法
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%特征點的匹配,主要應用 harris 角點的檢測,match單向匹配 函數(shù)
%適合于有白邊的圖像,因為,在加窗濾波的時候,沒有限定范圍的哈,盡量保證角點不在邊上
clc,clear all;
filename1 = '..\.\photo9\cal1-L.txt';
filename2 = '..\.\photo9\cal1-R.txt';
b1 = imread('..\.\photo9\cal1-L.bmp');
b2 = imread('..\.\photo9\cal1-R.bmp'); %double的作用很大的啊
a1 = imadjust(b1);
a2 = imadjust(b2);
%subplot(1,2,1);
%imshow(a1);
%subplot(1,2,2);
%imshow(a2);
%title('原來的圖像');
[result1,cnt1,c1,r1]=harris(a1);%角點檢測,得到原始的焦點位置圖result
[result2,cnt2,c2,r2]=harris(a2);
figure;
subplot(1,2,1);
imshow(a1);
hold on;
plot(r1,c1,'g.');
subplot(1,2,2);
imshow(a2);
hold on;
plot(r2,c2,'g.');
title('圖1,2的角點圖');
l=[r1 c1];
r=[r2 c2];
fid1=fopen(filename1,'wt');
for i=1:cnt1
for j=1:2
if j==2
fprintf(fid1,'%g\n',l(i,j));
else
fprintf(fid1,'%g\t',l(i,j));
end
end
end
fclose(fid1);
fid2=fopen(filename2,'wt');
for i=1:cnt2
for j=1:2
if j==2
fprintf(fid2,'%g\n',r(i,j));
else
fprintf(fid2,'%g\t',r(i,j));
end
end
end
fclose(fid2);
%res2=match(a1,cnt1,r1,c1,a2,cnt2,r2,c2);%從result1中開始搜索在result2中可能達到的
%[r22,c22]=find(res2==1);
%[m22,n22]=size(r22);
%cnt22=m22;
%res1=match(a2,cnt22,r22,c22,a1,cnt1,r1,c1);%反向搜索res2--result1
%res1=and(res1,result1); %保證反向匹配不會出現(xiàn)不可能的點
%[r11,c11]=find(res1==1);
%[m11,n11]=size(r11);
%cnt11=m11;
%res22=match(a1,cnt11,r11,c11,a2,cnt22,r22,c22);%從res1中開始搜索在res2中可能達到的
……………………
…………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼
完整版本下載:
http://www.raoushi.com/bbs/dpj-86571-1.html
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1