Git Product home page Git Product logo

light-field-renderer's Introduction

Light Field Renderer

This is a light field renderer that can synthesize new camera views from a collection of images.

The renderer is mainly based on the paper Dynamically Reparameterized Light Fields, but additional features such as a dynamic synthetic aperture and phase detection autofocus has also been implemented.

The program is written in C++ and uses OpenGL for hardware acceleration. The GUI is implemented using NanoGUI.

Usage

Screenshot

The image above is a screenshot of the program. Most of the settings are hopefully self-explanatory and some of them have explanatory tooltips. The WASD keys are used for movement, and mouse navigation can be performed by clicking and holding down a mouse button anywhere in the render window.

The mouse is used to rotate the camera in Free mode and to move the camera laterally in Target mode. Shift + Mouse click in the render window is used to autofocus at a point in the scene. The scroll wheel is used to cycle through focus distances.

Light Fields

The included light field was rendered in Blender using the simple script blender-exporter.py. The scene was created by Alex Treviño using concept by Anaïs Maamar.

The renderer is also capable of rendering rectified light fields from the Stanford Lego Gantry, which can be downloaded here: http://lightfield.stanford.edu/lfs.html.

Config

The start values and ranges of sliders and such in the GUI can be modified by adding a config.cfg file to the light field folder that specifies the start, min and max value for different properties:

# [property name] [start value] [min value] [max value]
focal-length 50 10 100
focus-distance 16 10 50
f-stop 1.8 0.1 5.6

Unspecified properties uses the default values. All property names are available in config.cpp.

Building

The program uses CMake and it can be cloned and built using:

git clone --recursive https://github.com/linusmossberg/light-field-renderer
cd light-field-renderer
mkdir build
cd build
cmake ..

This will create build files for your platform that should work automatically, but a few additional packages are required on certain platforms. On Debian/Ubuntu, these can be installed using:

apt-get install xorg-dev libglu1-mesa-dev

and on Fedora:

sudo dnf install mesa-libGLU-devel libXi-devel libXcursor-devel libXinerama-devel libXrandr-devel xorg-x11-server-devel

light-field-renderer's People

Contributors

linusmossberg 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.