/plenopticam

Light-field imaging application

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

PlenoptiCam

Description

PlenoptiCam is an open-source software (macOS, Win or Linux) for scientific light field computation with cross-platform compatibility, few dependencies and a lean graphical user interface. Raw exposures from a plenoptic camera require four-dimensional image alignment in order to be decoded as a light field. Provided software addresses this by its ability to calibrate an image taken by a plenoptic camera and extract sub-aperture images or synthetically focused photographs. This application is meant for researchers, developers, beginners and other fiddlers who like to experiment with light field technology. Its scope comprises custom-types of plenoptic cameras and is thus not limited to Lytro's image data.

release License Code size Repo size Downloads

Installation

  • executable:
    1. download bundled apps for macOS, Win or Linux
    2. extract archive
    3. run executable (may take a while on first start-up)
    4. user interface will show up (see below)

  • from source:
    1. install Python from https://www.python.org/
    2. download the source using $ git clone https://github.com/hahnec/plenopticam.git
    3. go to the root directory $ cd plenopticam
    4. install with $ sudo python setup.py install from root directory
    5. if installation ran smoothly, enter $ sudo plenopticam -g to the command line after which a lean user interface will pop up (see below)

Usage

Application

Note

"Pick folder" checkbox is useful to point to a directory containing calibration archive files of Lytro Illum cameras. In such case, the white image calibration file corresponding to the Lytro Illum image is found automatically.


  1. Download a dataset if you don't call a plenoptic camera your own, e.g.:

  1. Choose your light field photograph using upper Browse button. Supported file types are:
    • bmp, jpg or png file from custom-built plenoptic camera
    • lfr, lfp and raw files from Lytro Illum
    • Lytro 1st Generation (to come)

  1. Choose calibration source data using lower Browse button. Supported file types are:
    • bmp, jpg or png file from custom-built plenoptic camera
    • tar archive or respective raw file from Lytro Illum
    • tick "Pick folder" and point to a directory containing all tar files or extracted folders (calibration file will be found automatically)
    • Lytro 1st Generation (to come)

Note

If you are using your own Lytro Illum camera, you first need to extract camera calibration data as a tar archive. To do so, please follow the instructions guide.


  1. Adjust configuration using Settings button:
    • Micro image patch size: default is estimated maximum
    • Refocusing range: range for shift and sum synthesis
    • Force re-calibration: option to re-run calibration
    • Automatic white balance: option for white balancing
    • Refocus refinement: option for sub-pixel precise refocusing
    • Scheimpflug: option to mimic tilted sensor

  1. Press Process to start the computation.

Command Line

For computing a stack of light-field images, it may be convenient to iterate through them. This can be done by:

$ sudo plenopticam -f '/Users/../Folder/' -c 'Users/../caldata-B5144000XXX.tar' --awb

with necessary write privileges on Unix Systems. A Windows-equivalent command would be as follows:

plenopticam --file="C:\\..\\Folder\\" --cali="C:\\..\\caldata-B5144000XXX.tar" --awb

More information on optional arguments, can be found using the help parameter

plenopticam -h

Results

Results can be found inside a folder named after your light field file which is located in the same directory path. Depending on provided files and settings, your results folder may contain the following data:

  • sub-aperture images (see viewpoints_xxx folder) and view animation given as gif
  • refocused images (see refo_xxx folder) and refocus animation given as gif
  • raw image file given as tiff
  • aligned light field as pkl (pickle) file
  • light field metadata as json file (in case of Lytro image file)
  • scheimpflug focus file

Exemplary view animations can be seen below (image quality due to lower resolution and limited gif colours)

OpEx dataset INRIA dataset
plenoptic camera built at Univ. of Bedfordshire Lytro Illum camera image from raw capture

Credits

Contributors

Christopher Hahne

Sponsors


under Grant EU-FP7 ICT-2010-248420 Institute for Research in Applicable Computing (IRAC)

Citation

If you find this work helpful for your research, please cite as appropriate:

Further information

  • check out PlenoptiCam's partner project PlenoptiSign capable of estimating metric light field geometries
  • visit plenoptic.info for technical details, animated figures and theoretical background