Why does Matlab duplicate the output image ?
Show older comments
Hello,
I tried to implement the thresholding technique in image processing to an image, it works but the image appears 3 times instead of one, Does anyone have an idea what went wrong?
code:
i=imread("jk.jpg");
[a,b]=size(i);
new=zeros(size(i));
n=input("Enter thresholding key");
for x=1:a
for y=1:b
if i(x,y)<=n
new(x,y)=0;
else
new(x,y)=255;
end
end
end
imshow(new);
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
