CODE
% thresholding
clf;
clc;
clear all;
close all;
i=imread('camera.bmp');
subplot(1,2,1);
imshow(i);
title('original image');
r1=100;
[r c]=size(i);
for x=1:c
for y=1:r
if (i(y,x)
else
i(y,x)=255;
end
end
end
subplot(1,2,2)
imshow(i);
title('thresholding image');
No comments:
Post a Comment