필터 지우기
필터 지우기

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