[求助]哪位大虾帮我看看错在哪里,关于图像前景提取
<P>rt<br><br>这是我的程序:<br>A=imread('F:\cs.bmp');<br>BWB=roipoly(A);<br>BWF=roipoly(A);<br>=size(A);<br>for(i=0:1:m)<br> for(j=0:1:n)<br> if BWB(i,j)==0&&BWF(i,j)==0;<br> C(i,j)=0;<br> else if BWB(i,j)==255&&BWF(i,j)==255;<br> C(i,j)=255;<br> else C(i,j)=100;<br> end<br> end<br> end<br>end<br>figure,imshow(C);<br><br>错误信息:<br>Attempted to access BWB(0,0); index must be a positive integer or logical.<br>Error in ==> GUI>pushbutton1_Callback at 86<br> if BWB(i,j)==0&&BWF(i,j)==0;</P><P>Error in ==> gui_mainfcn at 75<br> feval(varargin{:});</P>
<P>Error in ==> GUI at 44<br> gui_mainfcn(gui_State, varargin{:});</P>
<P>??? Error while evaluating uicontrol Callback.</P>
[此贴子已经被作者于2006-4-26 14:25:57编辑过]
页:
[1]