function [dataOut,info] = Augmentation(dataIn,info)

dataOut = cell([size(dataIn,1),2]);

for idx = 1:size(dataIn,1)
    temp = dataIn{idx,1};
%    temp = im2gray(temp);
%%Nahodny stin 
%     rx = randi([1 500]);
%     ry = randi([1 230]);
%    
%     if mod(idx,2) == 0
%     temp(ry:(ry+300),rx:(rx+300)) = temp(ry:(ry+300),rx:(rx+300))-100;
%     end
%Nahodne posunuti a natoceni
    tform = randomAffine2d('Rotation',[-2 2],'XTranslation',[-8 8],'YTranslation',[-6 6]);  %
    outputView = affineOutputView(size(temp),tform);
    temp = imwarp(temp,tform,'OutputView',outputView);
%Nahodna uprava konstrastu a jasu    
%     contrastFactor = 1-0.35*rand; 
%     brightnessOffset = 0.3*(rand-0.5); 
%     temp = temp.*contrastFactor + brightnessOffset;
%     temp = im2uint8(temp);
%   
%zmenseni snimku na pozadovanouvelikost
    temp = imresize(temp,[224 224]);
%Grayscale na RGB    
%     temp1 = temp;
%     temp(:,:,2) = temp1;
%     temp(:,:,3) = temp1;
%     if idx < 500
%Nahodny sum
%     temp = imgaussfilt(temp,1.5*rand);

    dataOut(idx,:) = {temp,info.Label(idx)};
end

end