フィルターのクリア

Getting Error in code

1 回表示 (過去 30 日間)
Poonam
Poonam 2013 年 3 月 14 日
function[g,nr,si,ti]=regiongrow(f,s,t)
f=double(f);
if numel(s)==1
si=f==s;
s1=s;
else
si=bwmorph(s,'shrink',inf);
j=find(si);
s1=f(j); % Logical indexing is better than find
end
ti=false(size(f));
for k=1:length(s1)
seedvalue=s1(k);
s=abs(f-seedvalue)<=t;
ti=ti|s;
end
[g,nr]=bwlabel(imreconstruct(si,ti));
Getting Error
j=find(si);
s1=f(j); % Logical indexing is better than find
Please Help

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 3 月 14 日
That is not an error, it is advice. You can improve your code speed by using
s1 = f(si);
Note: I suspect that your code is not correct for this case, but I do not understand it well enough to be sure.

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by