function [images, filenames] = loadImagesColor (path,selection, ext);
filenames = []
files = dir([path  '\*.' ext]);
if size(selection)==0
   selection = [1:size(files)]
end

if (path(1,size(path,1)) ~= '\')
    path = strcat(path, '\');
end    

for (i = 1:size(selection,2))
   %if (selection(i)<size(files)-1 || selection(i)>0)

        
       file_name = strcat(path,  files(selection(i)).name);
       disp ([int2str(i) , '. ', file_name])
       
       if (ext == 'bmt')
            [img_src, img_tmp, low_border, hi_border] = get_temperature_matrix(file_name);
%            [img_tmp] = (img_tmp);
            
            
                    %img_tmp = img_tmp-mean(mean(img_tmp));
                    %img_tmp = img_tmp./std2(img_tmp);
                    %img_tmp = img_tmp.*exp((img_tmp./max(max(img_tmp))));
            
            %img_tmp = im2uint8(img_tmp);
            
       else
           [img_tmp] = uint8((imread(file_name)));
       end
   %else
    %   disp(strcat(selection(i), '-ty obrazek neexistuje'))
   %end
   if (i == 1)
       images = zeros(size(img_tmp, 1), size(img_tmp,2),size(img_tmp,3), size(selection,2));
       rows = size(img_tmp, 1);
       cols = size(img_tmp, 2);
   end
   images(:,:,:,i) = img_tmp(:,:,:)   ;
%    
%    H = fspecial('gaussian',[19,19],0.3);
%    images(:,:,:,i) = imfilter(images(:,:,:,i),H,'replicate');
   
end
