Skip to content

Demo code to the paper "Stylized Image Triangulation", Computer Graphics Forum, 2018.

License

Notifications You must be signed in to change notification settings

fau-vc/image-triangulation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This is a demo implementation of the image triangulation described in:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Stylized Image Triangulation
Kai Lawonn and Tobias Günther
Computer Graphics Forum, vol. 38, no. 1, pages 221-234, 2019.
https://doi.org/10.1111/cgf.13526

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Installation Guidelines on Windows for Visual Studio
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

1. Dependencies:
================

1.1 Download Eigen3 
- see here: http://eigen.tuxfamily.org/index.php?title=Main_Page

1.2 Install the latest Windows SDK
- see here: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
- if the SDK is not found by CMake, you have to add your version number in line 18 of cmake/FindDirectX.cmake  (this will be necessary for SDKs newer than 10.0.18362.0)

1.3 Install Matlab
- tested for Matlab 2019a


2. Compiling:
=============

2.1 Generate the project files with CMake
- see here: https://cmake.org/
- Cmake will ask you to enter the path to your Eigen download

2.2 Open Visual Studio and compile the library/executable
- imagetri_fx  (this will compile the shaders)
- main  (this will compile all other depending projects automatically per build dependency


3. Setting Properties:
======================

3.1 Working directory
- When running from Visual Studio, the program looks for compiled shader files (fxo) in the working directory, which is by default $(ProjectDir). Currently, the compiled shaders are stored in the $(OutDir), thus change in the project settings, under "Debugging" the working directory to $(OutDir).

3.2 Path variables
- The project needs the Matlab binaries libeng.dll and libmx.dll. Either add the Matlab binary path to your PATH variable or do this locally in Visual Studio by setting in the project settings under "Debugging" the Environment to: PATH=%PATH;C:\Program Files\MATLAB\R2018a\bin\win64   (adjust the path according to your path and version of Matlab).


4. Running Examples:
====================

- Run main.exe and pass the path to the image that you want to triangulate as command line argument (e.g., in the project settings under "Debugging"). 
- An optional second command argument specifies the desired approximation error (which is 1 by default).


5. Usage:
=========

- On startup, the program creates an initial triangulation which is refined for 100 iterations. Afterwards, refinement is turned off and only the vertex positions are optimized.
- The UI is initial minimized. Click the icon in the bottom left to open the parameter and the help bars.

About

Demo code to the paper "Stylized Image Triangulation", Computer Graphics Forum, 2018.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.4%
  • C 9.3%
  • Other 1.3%