harris角点检测与ncc匹配(harris point detection and ncc match)

harris角点检测与ncc匹配(harris point detection and ncc match)

ID:16497530

大小:31.00 KB

页数:9页

时间:2018-08-10

harris角点检测与ncc匹配(harris point detection and ncc match)_第1页
harris角点检测与ncc匹配(harris point detection and ncc match)_第2页
harris角点检测与ncc匹配(harris point detection and ncc match)_第3页
harris角点检测与ncc匹配(harris point detection and ncc match)_第4页
harris角点检测与ncc匹配(harris point detection and ncc match)_第5页
资源描述:

《harris角点检测与ncc匹配(harris point detection and ncc match)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、harris角点检测与ncc匹配(HarrispointdetectionandNCCmatch)harris角点检测与ncc匹配(HarrispointdetectionandNCCmatch)HarriscornerdetectionandNCCmatchingFile1:--------------------------------------------------------------------------------------Function,[y1,Y2,R,c]=harris(X)%cornerd

2、etectionusingtheHarrisalgorithm%outputisanimage%[result,CNT,R,c]=harris(X)%CLC,clearall;%filename='qiao1.bmp';%X=imread('filename.bmp');%readstheimage%Info=imfinfo(filename);%;thisiscustomary%f=rgb2gray(X);F=X;%Ori_im=double(f)/255;%unit8isconvertedto64doubleprec

3、isiondouble64FX=[-2,-101,2],%Xdirectiongradientoperator(forHarriscornerextractionalgorithm)Ix=Filter2(FX,ori_im);%xdirectionalfilteringisgoodatusingfilter%FY=[585;000;-5,-8,-5];%Gaussfunction,firstorderdifferential,Ydirection(forimprovedHarriscornerextractionalgo

4、rithm)FY=[-2;-1;0;1;2];%Ydirectiongradientoperator(usedinHarriscornerextractionalgorithm)Iy=Filter2(FY,ori_im);%ydirectionalfilteringIx2=Ix.^2;Iy2=Iy.^2;Ixy=Ix.*Iy;ClearIx;ClearIy=%eliminationvariablehaH=,fspecial('gaussian',[10,10],2);%producesGausswindowfunctio

5、nsof7*7,sigma=2Ix2=Filter2(h,Ix2);Iy2=Filter2(h,Iy2);Ixy=Filter2(h,Ixy);%Gaussfiltering,respectivelyHeight=size(ori_im,1);Width=size(ori_im,2);Result=zeros(height,width);%recordcornerposition,cornervalueis1,backgroundisblackhaR=zeros(height,width);Rmax=0;%themaxi

6、mumRvalueintheimageinordertosetthethresholdForI=1:heightForJ=1:widthM=[Ix2(I,J),Ixy(I,J);Ixy(I,J),Iy2(I,J)];%2*2matrixR(I,J)=det(M)-0.06*(trace(M))^2;%calculatesRandobtainsRMAX,whichappearstobethewhole,andthecornerresponsefunctionIfR(I,J)>RmaxRmax=R(I,J);End;End;

7、End;CNT=0;%recordcountForI=2:height-1ForJ=2:width-1%carryonnonmaximumsuppression,window3*3IfR(I,J)>0.01*Rmax&&R(I,J)>R(i-1,J-1)andR(I,J)>R(i-1,J)andR(I,J)>R(i-1,j+1)andR(I,J)(I,J-1>R)andR(I,J)>R(I,j+1)andR(I,J)>R(i+1,J-1)andR(I,J)>R(I+1J)andR(I,J)>R(i+1,j+1)Resul

8、t(I,J)=1;CNT=cnt+1;End;End;End;%%i=1;%forj=1:height%fork=1:width%ifresult(J,K)==1;%corners1(I,1)=j;%corners1(I,2)=k;%i=i+1;%end;%end;%end;[posr,posc]=find(resu

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。