% script bilder.m

%% Kvantisering av gråskalebild

im=double(imread('cameraman.png'));
%im=double(imread('park2.jpg'));
figure(10);colormap(gray);
imagesc(im);

b=3;

imq=liu_quantize(im,256,b,'unipolar');
figure(11);colormap(gray);
imagesc(imq);

%% Nedsampling

im=double(imread('JavaBW.jpg'));
figure(10);colormap(gray);
imagesc(im);

n = 2^5;

ims = im(1:n:end,1:n:end);

figure(12);colormap(gray);
imagesc(ims);

%%
