项目作者: sepastian

项目描述 :
Docker container containing relight, for building RTI models.
高级语言: JavaScript
项目地址: git://github.com/sepastian/relight-docker.git
创建时间: 2021-03-03T14:29:43Z
项目社区:https://github.com/sepastian/relight-docker

开源协议:

下载


Purpose

Docker container for building RTI models using relight.

Screenshot

Building

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

  1. $ docker run -it --rm \
  2. -v $(pwd)/examples/ring:/data \
  3. -v $(pwd)/web:/out \
  4. sepastian/relight-docker \
  5. relight-cli /data /out
  6. Nsamples: 160000
  7. Done in: 6927ms

This creates the following new files in web.

  1. $ ls web
  2. info.json
  3. materials.png
  4. plane_0.jpg
  5. plane_1.jpg
  6. plane_2.jpg

Run an HTTP Server to view the resulting RTI model.

  1. # For example, using Python 3's built-in HTTP server.
  2. 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:

  1. $ docker run -it --rm sepastian/relight-docker relight-cli
  2. Create an RTI from a set of images and a set of light directions (.lp) in a folder.
  3. It is also possible to convert from .ptm or .rti to relight format and viceversa.
  4. Usage: relight-cli [-mrdqp]<input folder> [output folder]
  5. relight-cli [-q]<input.ptm|.rti> [output folder]
  6. relight-cli [-q]<input.json> [output.ptm]
  7. input folder containing a .lp with number of photos and light directions
  8. optional output folder (default ./)
  9. -b <basis>: rbf(default), ptm, lptm, hsh, yrbf, bilinear
  10. -p <int> : number of planes (default: 9)
  11. -q <int> : jpeg quality (default: 95)
  12. -y <int> : number of Y planes in YCC
  13. -n : extract normals
  14. -m : extract mean image
  15. -M : extract median image (7/8th quantile)
  16. -k <int>x<int>+<int>+<int>: Kropping extracts only the widthxheight+offx+offy part
  17. Ignore exotic parameters below here
  18. -r <int> : side of the basis function (default 8, 0 means rbf interpolation)
  19. -s <int> : sampling RAM for pca in MB (default 500MB)
  20. -S <float>: sigma in rgf gaussian interpolation default 0.125 (~100 img)
  21. -R <float>: regularization coeff for bilinear default 0.1
  22. -B <float>: range compress bits for planes (default 0.0) 1.0 means compress
  23. -c <float>: coeff quantization (to test!) default 1.5
  24. -C : apply chroma subsampling
  25. -e : evaluate reconstruction error (default: false)
  26. -E <int> : evaluate error on a single image (but remove it for fitting)
  27. Testing options, will use the input folder as an RTI source:
  28. -D <path> : directory to store rebuilt images
  29. -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.