function dedublicate

img_dir = 'J:\Research\CVPR10_ori\Dataset\NewDataset\WithNorm\With_Erhu\';

fnames = dir(fullfile(img_dir, '*.jpg'));
num_files = size(fnames, 1);

for i = 1 : num_files
 %   i
    im1 = imread([img_dir fnames(i).name]);
    hist1 = [imhist(im1(:,:,1)); imhist(im1(:,:,2)); imhist(im1(:,:,3))];
    for j = i + 1 : num_files
        im2 = imread([img_dir fnames(j).name]);
        hist2 = [imhist(im2(:,:,1)); imhist(im2(:,:,2)); imhist(im2(:,:,3))];
        v = sum(abs(hist1 - hist2));
        
%        if v < 65000
        if v < 60000
            [fnames(i).name '  ' fnames(j).name '  ' sprintf('%d', v)]
        end
    end
end