Giter Site home page Giter Site logo

relight-docker's Introduction

Purpose

Docker container for building RTI models using relight.

Screenshot

Building

docker build -t sepastian/relight-docker .

Usage

This repository includes test images in exmaples/ring. An RTI model has been build and placed in web. To rebuid the model follow these steps.

Prerequisite: build the Docker container first, see Building above.

Inside examples/ring are 64 images taken with an RTI dome and a corresponding lights.lp file, describing light positions. Note that the number of images must match with the number of lines in lights.lp; file names inside lights.lp must match with names of image files.

Next, use the container to build an RTI model from the images in examples/ring, save the results in web.

$ docker run -it --rm \
  -v $(pwd)/examples/ring:/data \
  -v $(pwd)/web:/out \
  sepastian/relight-docker \
  relight-cli /data /out
Nsamples: 160000
Done in: 6927ms

This creates the following new files in web.

$ ls web
info.json
materials.png
plane_0.jpg
plane_1.jpg
plane_2.jpg

Run an HTTP Server to view the resulting RTI model.

# For example, using Python 3's built-in HTTP server.
python -m http.server

Open http://localhost:8000 in a browser. You should see an image similar to the screenshot at the top of this site. Note: Firefox in Linux may not be able to display the results, use Chrome instead.

Options

To display relight's help message, run:

$ docker run -it --rm sepastian/relight-docker relight-cli
Create an RTI from a set of images and a set of light directions (.lp) in a folder.
It is also possible to convert from .ptm or .rti to relight format and viceversa.

Usage: relight-cli [-mrdqp]<input folder> [output folder]

       relight-cli [-q]<input.ptm|.rti> [output folder]

       relight-cli [-q]<input.json> [output.ptm]

	input folder containing a .lp with number of photos and light directions
	optional output folder (default ./)

	-b <basis>: rbf(default), ptm, lptm, hsh, yrbf, bilinear
	-p <int>  : number of planes (default: 9)
	-q <int>  : jpeg quality (default: 95)
	-y <int>  : number of Y planes in YCC

	-n        : extract normals
	-m        : extract mean image
	-M        : extract median image (7/8th quantile) 
	-k <int>x<int>+<int>+<int>: Kropping extracts only the widthxheight+offx+offy part

Ignore exotic parameters below here

	-r <int>  : side of the basis function (default 8, 0 means rbf interpolation)
	-s <int>  : sampling RAM for pca  in MB (default 500MB)
	-S <float>: sigma in rgf gaussian interpolation default 0.125 (~100 img)
	-R <float>: regularization coeff for bilinear default 0.1
	-B <float>: range compress bits for planes (default 0.0) 1.0 means compress
	-c <float>: coeff quantization (to test!) default 1.5
	-C        : apply chroma subsampling 
	-e        : evaluate reconstruction error (default: false)
	-E <int>  : evaluate error on a single image (but remove it for fitting)


Testing options, will use the input folder as an RTI source: 
	-D <path> : directory to store rebuilt images
	-L <x:y:z> : reconstruct only one image from light parameters, output is the filename

For further information, consult the relight project.

Credits

RTI viewer website based on the original relight project. Images in examples/ring produced by Nina Kunze, Uni Passau.

relight-docker's People

Contributors

sepastian avatar

Watchers

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