There are two major parts in this project.
- Caustic-Design - handles Optimal-Transport and corresponding tasks
- Target Optimization - handles 3D Optimization
Note: This step is optional.. qmake is not fully functional in the current version. Please see the Build-Section for details.
Import in QT-Creator
- Open QT-Creator
- Choose File > Open File or Project
- Navigate to Caustic_Design folder
- Choose Caustic_Design.pro and confirm Dialog with 'Open'
Following dependencies are needed for the Caustic_Designer:
- cmake
- libqt4-dev (needs to be tested)
- libcgal-dev
- libcgal-qt4-dev (needs to be tested, too)
- libblas-dev
- liblapack-dev
- libtbb-dev
- libmetis-dev
- libsuitesparse-dev (or manually via: http://faculty.cse.tamu.edu/davis/suitesparse.html)
- liblbfgs-dev
- libtinyxml-dev
Debian dependencies as one-liner:
sudo apt-get install cmake libqt4-dev libcgal-dev libcgal-qt4-dev libblas-dev liblapack-dev libtbb-dev libmetis-dev libsuitesparse-dev liblbfgs-dev libtinyxml-dev
We suggest using cmake to build the project. To do so, simple:
- Create Build Directory (e.g.
mkdir build-Caustic_Design
) - Run cmake in the build directory (e.g.
cd build-Caustic_Design && cmake ../Caustic_Design/
)
You may also use qmake instead of cmake if you prefer qmake. But in the current version, suitesparse does not seem to be set correctly when installing it via apt-get
.
Following sections describe the usage of the different steps for the caustic-design project.
To run the optimal transport, a source-image as well as a target-image needed. The rest of the steps are done automatically.
Loading source- and target-image
- Via code: In window.cpp uncomment the lines
//open(QString("/home/p/Pictures/einstein_small.png"), false);
and//open(QString("/home/p/Pictures/white_small.png"), true);
and replace the strings with the path to the target image and source image, respectively. - Via UI:
File > Load Image
to load target image andFile > Load Source Image
to load source image.
NOTE: Source- and Target-Image need to be of same ratio.
Configuration
All relevant values (amount of sites, multi-scale levels) can be configured in the config.h file.
Running To finally run the Optimal Transport:
Algorithm > Compute Optimal Transport
- When running Gradient Descent, ensure that
LEVEL_MAX
is set to1
// Assigned to: Cam
algorithm->compute interpolation to load the source image, and points (.dat) and weights (.weights) data from the OTM and run the interpolation
Following libraries are needed:
- ceres-solver: http://ceres-solver.org/building.html
- libassimp-dev
// Assigned to: Cam
Input
- Coordinates (xR) [4]
- Target Light Direction (calculated from [4])
- Surface Mesh
- Incoming Light Direction
Output
- 3D Mesh (target surface)
Computing the surface optomization
The code is located in target-surface-optimization folder
Prerequisits:
- openGL
- GLM header librairy
- glew
- glfw
- SOIL
- assimp
Debian dependencies as one-liner:
sudo apt-get install libglew-dev libsoil-dev