function main = shot_detection(aviFileName)
stra=strcat(aviFileName,'_im.mat');
load(stra);

stra=strcat(aviFileName,'_diffs.mat');
load(stra);

cutHist = cutDetect(hist_diffs);
cutPixel = cutDetect(pixel_diffs);
finalstra=strcat(aviFileName,'_final.mat');
save(finalstra,'cutHist','cutPixel');

close all;
figure;
plotnumber = 5;

if (aviFileName == 'hall_monitor.avi')
    plotnumber = 2;
end;
cutnum = size(cutHist,1);
for k=1:cutnum
        subplot(plotnumber,plotnumber,k);
        j=cutHist(k,1);
        image(I(:,:,:,j));
        axis off;
end;


figure;
cutnum = size(cutPixel,1);
for k=1:cutnum
       subplot(plotnumber,plotnumber,k);
       j=cutPixel(k,1);
       image(I(:,:,:,j));
       axis off;
end;

return;
