close all;

para.prefix = '.\data\Video_Retargeting';
para.RT_method = 'seam carving';
para.Refer_method = 'Uniform';
para.Sample_str = 'only_test04';
para.display = false;
prefix = para.prefix;
RT_method = para.RT_method;
Refer_method = para.Refer_method;
Sample_str = para.Sample_str;

path1 = sprintf('%s\\%s\\%s\\', prefix, RT_method, Sample_str);
refPath1 = sprintf('%s\\%s\\%s\\', prefix, Refer_method, Sample_str);
rsPath1 = '.\result\';
dx1 = dir([path1 '*.bmp']);
refDx1 = dir([refPath1 '*.bmp']);

im1 = imread([path1 dx1(1).name]);
[row,col,c]=size(im1);
pat1 = im2col(rgb2gray(im1), [8 8], 'distinct');

[a1, rs] = computingSpatialScore(para);

rs1 = uint8(abs(rs) * 50);
figure(1),
subplot(1,2,2);
imshow(rs1);
figure(1),
subplot(1,2,1);
imshow(im1);

Th1 = 25;
rs1 = imresize(rs1, size(im1(:,:,1)));
rs1(rs1<Th1) = 0;
im2 = im1;
for i=1:size(rs1,1)
    for j=1:size(rs1,2)
        if (rs1(i,j)>=Th1)
            im2(i,j,2) = im1(i,j,2) + 40;
        end
    end
end

figure(2), imshow(im2);