I use the following MATLAB code from here, you can modify according to the number of views you want. Current Light Field Toolbox provides function to read ESLf files. Download the toolbox from here. Other than this, from the Light Field forum:
The png files are the demosaiced raw images, also known as lenslet images, corresponding to a set of micro-images; you can render this lenslet image in form of multi-view sub-aperture images by putting together the pixels in the same position within each micro-image to create a rendered image for a specific viewpoint; So, basically what you get in the end is the same as the toolbox's output.
% generates 14x14 views and saves only 8x8 of those
% uses light-field-MATLAB toolbox
folders = dir('/path/to/ESLF/images');
dirFlags =[folders.isdir];
subFolders = folders(dirFlags);
imgNo=0;
for k = 1 : length(subFolders)
if subFolders(k).name ~= '.' | subFolders(k).name ~= '..'
currfolder=fullfile('/path/to/ESLF/images',subFolders(k).name,'raw');
fprintf("Working on : ")
fprintf(currfolder);
fprintf('\n')
files = dir(fullfile(currfolder,'*.png'));
for loop = 1:length(files)
imgNo = imgNo + 1;
file=files(loop).name;
f = fullfile(currfolder,file);
LF = LFReadESLF(f);
viewsfoldername = '/path/to/save/views';
newfolder=sprintf('%s/%d',viewsfoldername,imgNo);
mkdir(newfolder)
for i = 4:11
for j = 4:11
view = squeeze(LF(j,i,:,:,1:3));
filename = fullfile(newfolder, sprintf('view_%d_%d_%d.png',imgNo,j,i));
imwrite(view, filename);
end
end
end
end
end
It's an old question, but if you had experience with working with the files let me know if you figured out some other way.