Borrar filtros
Borrar filtros

Getting Error in code

1 visualización (últimos 30 días)
Poonam
Poonam el 14 de Mzo. de 2013
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

Respuestas (1)

Walter Roberson
Walter Roberson el 14 de Mzo. de 2013
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.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by