function terang1
x=imread('moon.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;
else
if x(i,j)
x(i,j)=0;
else
x(i,j)=x(i,j);
end
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);
x=imread('moon.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;
else
if x(i,j)
x(i,j)=0;
else
x(i,j)=x(i,j);
end
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);
ConversionConversion EmoticonEmoticon