colorwind0 发表于 2006-4-18 16:45

[求助] 那里出错了 出错的用红色标出来了 不知道为什么错了

SE=strel('square',2);<BR>%bw4=imerode(bw3,SE);<BR>bw5=imerode(bwycbcr,SE);<BR>figure,<BR>%subplot(2,2,1),imshow(bw4);<BR>subplot(2,2,2),imshow(bw5);<BR>I3=bwfill(bw5,'holes',8);<BR>%imshow(I3);<BR>I2=bwlabel(bw5,8);<BR>eul=bweuler(I3);%计算目标数目<BR>sum=1;<BR>I2=double(I2);<BR>bw5=double(bw5);<BR>bw6=zeros(m,n,eul);<BR>while sum&lt;(eul+1)<BR>    for i=1:m<BR>      for j=1:n<BR>         <FONT color=#f70909> </FONT><STRONG><EM><U><FONT color=#f70909>if I2(i,j)=sum</FONT><BR></U></EM></STRONG>               bw6(i,j,sum)=1;<BR>            else bw6(i,j,sum)=0;<BR>            end<BR>      end<BR>    end<BR>    sum=sum+1;<BR>end<BR>%区域的分离<BR>figure;<BR>for sum=1:eul<BR>subplot(4,4,sum),imshow(bw6(:,:,sum))<BR>end<BR><BR><FONT color=#a0a0a0><FONT color=#f76809>??? Error: File: G:\MATLAB6p1\work\fushi.m Line: 20 Column: 16<BR>Assignment statements cannot produce a result</FONT>.<BR><BR></FONT><BR>求助那里出错了   出错的用红色标出来了不知道为什么错了

_distance 发表于 2006-4-18 17:21

<STRONG><EM><U><FONT color=#f70909>应该是:if I2(i,j)<FONT color=#3809f7>==</FONT>sum<BR></FONT></U></EM></STRONG>               

colorwind0 发表于 2006-4-18 21:17

谢谢又一个低级错误
页: [1]
查看完整版本: [求助] 那里出错了 出错的用红色标出来了 不知道为什么错了