Cowryman / Depth-From-Defocus-Matlab

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Depth-From-Defocus-Matlab

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

Prerequisites

  1. Download IAT tool box from following link:
https://sites.google.com/site/imagealignment/download
  1. 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

Dataset

Two different datasets have been included in the repository. You can also create your own by getting a whole focal stack from your phones.

Steps

The following steps are performed:

Step1

Sample Image from Focal Stack

alt text

Step2

Sample Image Focus measure

alt text

Step3

Initial Focus Map

alt text

Step4

alt text

Step5

alt text

Step6

alt text

Step7

alt text

Step8

alt text

Step9

alt text

Step10

alt text

Step11

alt text

License

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

Acknowledgments

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

About

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


Languages

Language:C++ 71.2%Language:MATLAB 28.8%