权威认证
I1=im2bw(I);
subplot(1,3,2),imshow(I1); title('二值化图像'); axis([50,250,50,200]);
grid on; %显示网格线 axis on; %显示坐标系
I2=bwperim(I1); %获取区域的周长 subplot(1,3,3),imshow(I2); title('边界周长的二值图像'); axis([50,250,50,200]); grid on;
axis on; 20.形态学骨架提取
利用MATLAB实现如下: I=imread('xian.bmp'); subplot(2,2,1),imshow(I); title('原始图像');
axis([50,250,50,200]); axis on; I1=im2bw(I);
subplot(2,2,2),imshow(I1); title('二值图像');
axis([50,250,50,200]); axis on;
I2=bwmorph(I1,'skel',1); subplot(2,2,3),imshow(I2); title('1次骨架提取'); axis([50,250,50,200]); axis on;
I3=bwmorph(I1,'skel',2); subplot(2,2,4),imshow(I3); title('2次骨架提取'); axis([50,250,50,200]); axis on;
21.直接提取四个顶点坐标 I = imread('xian.bmp'); I = I(:,:,1); BW=im2bw(I); figure
imshow(~BW) [x,y]=getpts
权威认证
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库MATLAB - 图像处理几个实用代码(3)在线全文阅读。
相关推荐: