function [dataset,warps] = readDataset(dirName)
% Hassan Nahas
%This function reads the images in a directory along with their warps and
%stores them in cells.
srcFiles = dir(strcat(dirName,'frames/*.png'));
dataset = cell(1, length(srcFiles));

for i = 0 : (length(srcFiles)-1)
    filename = strcat(dirName,sprintf('frames/frame_%d.png',i))
    dataset{i+1} = double(imread(strcat(filename)));
end

srcFileswarp =dir(strcat(dirName,'pngwarps/*.png'));  % the folder in which ur images exists
warps = cell(length(dataset), length(dataset));
for i = 0 : (length(srcFiles)-1)
    for j = 0 : (length(srcFiles)-1)
        if ( i == j)
           continue 
        end
        filename = strcat(dirName,sprintf('pngwarps/warp_%d_%d.png',i,j));
        warps{i+1,j+1}=imread(strcat(filename));
    end
end
 
end

