How do I get rid of the blue screen while dilating an image?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!