How do I get rid of the blue screen while dilating an image?
Mostra commenti meno recenti
Not being allowed to use imdilate for my code, I got no error when I ran my code to dilate the image, however it came up as a blue screen instead of the dilated image. Can anyone help me figure out where the problem is? Thanks
function [img_out] = myDilation(img_in, N)
[m,n]=size(img_in);
img_out= zeros(m,n);
for i=1:m
for j=1:n
if (img_in(i,j)==1)
for k=1:N
for l=1:N
if(img_in(k,l)==1)
c=i+k;
d=j+l;
img_out(c,d)=1;
end
end
end
end
end
end
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Images in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!