Git Product home page Git Product logo

pidiffusercam's Introduction

PiDiffuserCam

Quinn Okabayashi and Josh Vandervelde


Configure Software

  1. Follow the instructions here for configuring your Raspberry Pi for headless mode and connecting via SSH.

  2. Once connected via SSH, setup the project with the following command:

    $ source <(curl -s https://raw.githubusercontent.com/QnnOkabayashi/scripts/master/PiDiffuserCam/setup.sh)
    

    Warning: You should always verify that scripts from URLs are safe before running! Check out the source code below yourself.

    Source code

    This will:

    • Update the package manager
    • Install the required dependencies
    • Clone the project repo code to the home directory
    • Enable the PiCamera and RealVNC modules
    • Display VNC server address
    • Reboot, enabling the VNC server

    Note: Sometimes this code doesn't do anything for reasons beyond me. If it doesn't work at first, wait a minute and try again.

  3. On your local machine, install VNC Viewer.

  4. Open VNC Viewer and enter the VNC Server address the setup process displayed in step 2. This will open a window where the camera feed will display when we enable it.

  5. To start taking pictures, SSH into the Pi, navigate to ~/PiDiffuserCam/raspberrypi, and enter:

    $ python3 main.py
    

Copying captured images

The scp command can be used to transfer files over SSH. The following command transfers images from the Raspberry Pi to your desktop (executed from your local shell):

$ scp -rp [email protected]:/home/pi/PiDiffuserCam/raspberrypi/captures /Users/$(whoami)/Desktop

Note: This command will fail if no images have been captured


2D Reconstruction

  1. After transfering the images to your computer, convert them to .tif by renaming them.
  2. Clone the tutorial code repository into a Jupyter Notebook.
  3. Upload them to the Jupyter Notebook and edit the config block (shown below) by entering in the image file names:
    psfname = "./psf_file_name_here.tif"
    imgname = "./image_file_name_here.tif"
  4. You can also change the number of iterations for tweaking the clarity:
    # Number of iterations
    iters = 5
  5. Restart the kernel to execute script, and the reconstruction will display at the bottom.

pidiffusercam's People

Contributors

qnnokabayashi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.