Pengolahan Citra - Effect Brightness dengan Matlab

function terang
x=imread('cameraman.tif');
y=x;
x=double(x);
[baris kolom]=size(x);
for i=1:baris,
for j=1:kolom,
x(i,j)=x(i,j)+100;
if x(i,j)>255;

x(i,j)=255;
elseif x(i,j)<0
x(i,j)=0;
else
x(i,j)=y(i,j);
end
end
end

out=uint8(x);
subplot(2,2,1), imshow(y);
subplot(2,2,2), imhist(y);
subplot(2,2,3), imshow(out);
subplot(2,2,4), imhist(out);



(pastikan gambar cameraman.tif terdapat pada direktori matlab)

No comments on "Pengolahan Citra - Effect Brightness dengan Matlab

Leave a Reply