![]() |
关于MATLAB提取图像边界的问题
图像格式为512*512的bmp格式,利用MATLAB提取图像中阴影部分的面积。代码如下,但求得的结果有错误,请高人指点。
p=imread('C:\Documents and Settings\speedshi\桌面\0.bmp'); %读入图像 j=1; %以下程序是提取切片的边界 for i=1:512 q=find(p(i,: )==0); if ~isempty(q) j=j+1; [q1,q2]=size(q); e0(j,: )=[i,q(1),q(2)]; end end e=[e0(:,[1,2]);e0(:,[1,3])]; plot(e(:,2),e(:,1)) %画出所提取的边界 |
所有时间均为北京时间。现在的时间是 11:14。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.