This repository contains the code for the method presented in the following paper:
Hossein Javidnia, Peter Corcoran, "Application of preconditioned alternating direction method of multipliers in depth from focal stack," Journal of Electronic Imaging 27(2), 023019 (6 April 2018). https://doi.org/10.1117/1.JEI.27.2.023019.
The code is written and compiled in MATLAB R2017a x64.
To run the code please follow these instructions:
- Download the repository.
- Extract the "opencv_imgproc310d.zip" file and copy the "opencv_imgproc310d.dll" file to the main directory, next to the other dlls.
- Run the "Run.m" file in MATLAB.
A sample focal stack set is located in the "Data" folder.
To generate focal stack samples from .LFR light-field sets, please follow these instructions:
- Download the .LFR files from EPFL Light-Field Image Dataset.
- Download and install Lytro Desktop Software.
- Open the LFR file in Lytro Software.
- Go to the "Animate" section on the left hand side.
- Select and remove the first keyframe.
- Modify the focus point of last frame (click on the furthest point of the scene).
- Add a keyframe at the begining and modify the focus point (click on the closest point of the scene).
- From the "Export" option in the "File" menu, save the png series.
Please cite the following papers when you are using this code:
Hossein Javidnia, Peter Corcoran, "Application of preconditioned alternating direction method of multipliers in depth from focal stack," Journal of Electronic Imaging 27(2), 023019 (6 April 2018). https://doi.org/10.1117/1.JEI.27.2.023019.
If you are using the EPFL Light-Field Image Dataset please cite:
Rerabek M, Ebrahimi T. New light field image dataset. Paper presented at: 8th International Conference on Quality of Multimedia Experience (QoMEX)2016.