ts_threshold = .0001; % based on the Eudlidean metric between original 
                      % and compressed image. value 
rate = 1; % how much more emphasized the higher frequencies are
          % e.g., rate = 10, means the highest frequency have 
f1 = figure;
set(f1, 'Name', 'Lenna Part 1');
compress('lenna.gif', ts_threshold, rate);
% for part 2
rate = 10;
f2 = figure;
set(f2, 'Name', 'Lenna Part 2');
compress('lenna.gif', ts_threshold, rate);

rate = 1;
f3 = figure;
set(f3, 'Name', 'Harbour Part 1');
compress('harbour.gif', ts_threshold, rate);
% for part 2
rate = 10;
f4 = figure;
set(f4, 'Name', 'Harbour Part 2');
compress('harbour.gif', ts_threshold, rate);

rate = 1;
f5 = figure;
set(f5, 'Name', 'Baboon Part 1');
compress('baboon.pgm', ts_threshold, rate);
% for part 2
rate = 10;
f6 = figure;
set(f6, 'Name', 'Babbon Part 2');
compress('baboon.pgm', ts_threshold, rate);



