Giter VIP home page Giter VIP logo

python-tools's Introduction

Collection of support scripts to read/write/process light field data.

Please don't hesitate to contact us for any kind of questions, feedback, wishes, or bug reports.

Importing the light field data

You may use the provided Python scripts to read light fields, parameter files, disparity maps and depth maps as follows:

import file_io.py
data_folder = "some_path/training/dino"

LF = file_io.read_lightfield(data_folder)
param_dict = file_io.read_parameters(data_folder)
depth_map = file_io.read_depth(data_folder, highres=True)
disparity_map = file_io.read_disparity(data_folder, highres=False)

Note that there are no public depth or disparity maps for the test scenes.

General file io for PFM files

You may use the general IO methods read_pfm() and write_pfm() to process single channel PFM files such as the provided disparity maps. Call write_pfm(disp_map, file_path) to save your algorithm results.

Creating visualizations and converting to hdf5

You may use our scripts to create figures or convert the data to hdf5. We assume that the data and the scripts are placed in the same directory:

|-- visualize_scenes.py
|-- convert2hdf5.py
|-- training
    |-- dino    
    |-- boxes    
|-- additional
|-- stratified
|-- test

To convert/visualize all downloaded scenes, run:

$ python convert2hdf5.py
$ python visualize_scenes.py

To convert/visualize specific scenes, run e.g.

$ python convert2hdf5.py -d "training/boxes,training/dino"
$ python visualize_scenes.py -d "training/boxes,training/dino"

Dependencies

The scripts are tested with Python 2.7 and the dependencies as listed in the requirements.txt The modules h5py and matplotlib are optional. They are only required for the conversion/visualization.

License

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.

Authors: Katrin Honauer & Ole Johannsen

Website: www.lightfield-analysis.net

The 4D Light Field Benchmark was jointly created by the University of Konstanz and the HCI at Heidelberg University. If you use any part of the benchmark, please cite our paper "A dataset and evaluation methodology for depth estimation on 4D light fields". Thanks!

@inproceedings{honauer2016benchmark, title={A dataset and evaluation methodology for depth estimation on 4D light fields}, author={Honauer, Katrin and Johannsen, Ole and Kondermann, Daniel and Goldluecke, Bastian}, booktitle={Asian Conference on Computer Vision}, year={2016}, organization={Springer} }

python-tools's People

Contributors

katr-in avatar lightfield-benchmark 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.