This is a Matlab implementation of Depth from Defocus using your mobile phone. In addition I use a number of techniques such as graph cuts and matting laplacian to improve the results
This Repo is the implementation of the following paper:
- ImageMatting A Closed form solution to natural image matting
- WMF Constant Time Weighted Median Filtering for Stereo Matching and Beyond
- Download IAT tool box from following link:
https://sites.google.com/site/imagealignment/download
- i have provided graph cut library which does not belong to me.Follow instruction on gc-v.30 for any problems:
https://github.com/nsubtil/gco-v3.0
Two different datasets have been included in the repository. You can also create your own by getting a whole focal stack from your phones.
The following steps are performed:
Sample Image from Focal Stack
Sample Image Focus measure
Initial Focus Map
This project is licensed under the MIT License. For specific helper function used in this repository please see the license agreement of the Repo linked in Acknowledgement section
My implementation has been inspired from the following sources.
- gco-v3.0 : I do not own any part of this library included in my code