Build your own DiffuserCam: Tutorial

One of the best things about DiffuserCam is that it is easy to build your own! We provide a guide on how to build your own lensless camera for 2D photography. We recommend using a Raspberry Pi camera with scotch tape as the diffuser. We will also walk you through the algorithms, step-by-step, in an iPython notebook.

Want a short overview of all of the steps? Check out our quick-start guide. See below for more detailed instructions and links to all resources.


Questions or feedback? We'd also love to hear about any projects that you create using this tutorial! Feel free to contact the authors, Camille Biscarrat (camei *at* berkeley *dot* edu), Shreyas Parthasarathy (shreyas *dot* partha *at* berkeley *dot* edu), Grace Kuo (gkuo *at* berkeley *dot* edu), and Nick Antipa (nick *dot* antipa *at* berkeley *dot* edu).

Instructions

Start by reading our guide to building your camera (below). Look at the other resources for more details on the modeling and algorithms.

Guide to building your camera (pdf)
Instructions on taking apart a Raspberry Pi camera, capturing raw data, and processing data with our provided python code.

Guide to modeling and algorithms (pdf)
Explanation of how we mathematically model image formation in our camera and then use that model to recover pictures from the raw data.

iPython Notebook: FISTA Algorithm (html) (.ipy)
A step-by-step walk though of how images can be recovered from the DiffuserCam raw data using the FISTA algorithm. We recommend that you explore this algorithm first. (Sample data is available in the Github respository)

iPython Notebook: ADMM Algorithm (html) (.ipy)
A step-by-step walk though of how images can be recovered from the DiffuserCam raw data using the ADMM algorithm. We recommend that you explore the FISTA algorithm (above) first since it's more intuitive. However, in this walk through, you'll see that ADMM can be much more efficient. (Sample data is available in the Github respository)

Github Repository
Python code for capturing images on the Raspberry Pi and then processing the data to recover pictures. Includes iPython notebooks and sample data.
Note: Our code assumes images are black-and-white (1 channel, not 3 as in the typical RGB image). The down/upsampling also assumes that the image dimensions are even numbers. If you use our image capture code, both of these requirements should be automatically satisfied.

Appendix (pdf)
Step-by-step derivations and proofs that fill in the gaps for those who are looking for a deeper understanding of the theory used in the DiffuserCam project.