图像边缘检测、角点特征检测——2017.4.1

来源:互联网 发布:linux关闭oracle服务 编辑:程序博客网 时间:2024/06/05 21:13
I=imread(‘circuit.tif’); BW1=edge(I,’prewitt’); % 利用prewitt算子进行边缘检测 BW2=edge(I,’canny’); %利用canny算子进行边缘检测 subplot(1,2,1),imshow(BW1); subplot(1,2,2),imshow(BW2)


I=imread(‘pout.tif’); I=I(1:150,1:120); subplot(1,2,1); imshow(I); title(‘输入图像’); CM=cornermetric(I); %对图像进行Harris角点提取 corner_peaks=imregionalmax(CM);%查找矩阵中最大值并显示,CM-角点矩阵 corner_idx=find(corner_peaks==true); [r g b]=deal(I); r(corner_idx)=255; g(corner_idx)=255; b(corner_idx)=0; RGB=cat(3,r,g,b); subplot(1,3,3); imshow(RGB);title('图像中的角点');



0 0
原创粉丝点击