您好,欢迎访问三七文档
clcclearall%Canny±ßÔµ¼ì²â%ori_im1=imread('E:\\13.png');%¶ÁȡͼÏñiflength(size(ori_im1))==3ori_im1=rgb2gray(ori_im1);%RGBͼת»¯Îª»Ò¶ÈͼÏñend%ori_im1=histeq(ori_im1,128);subplot(1,3,1);imshow(ori_im1);%ori_im1=medfilt2(ori_im1,[33]);%ÖÐÖµÂ˲¨%ori_im1=GaussFilter(double(ori_im1),5,3,1);%ori_im1=imadjust(ori_im1,[],[0.10.3])OUT2=ori_im1;J=find(ori_im1135);%·§ÖµÉ趨100OUT2(J)=0;J=find(ori_im1=135);OUT2(J)=255;subplot(1,3,2);imshow(OUT2,[]);[g,t]=edge(OUT2,'canny',[],'both');Subplot(1,3,3)imshow(g)
本文标题:canny算子程序
链接地址:https://www.777doc.com/doc-5258115 .html