Image warper based on generalized barycentric coordinates.
C++ QMake
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
inc
materials
meshes
polygons
screenshots
src
textures
ui
.gitignore
LICENSE
README.md
VERSION
warpit.pro
warpit.sublime-project

README.md

Image warper (warpit) Ver. 1.0.0

Description

This program allows you to morph a 2D image as shown in the screenshots section below. The implementation of the warper is based on subdivision of the mesh underlying a polygon around the image and generalized barycentric coordinates.

NOTE: This code/program has been tested only on Mac OS!

Run the code

In order to run the program, do the following:

A. Preparation:

Mac OS:
  1. Install macports, then open terminal and type:
sudo port install qt5-mac
sudo port install qt5-creator-mac
  1. Open warpit.pro and edit the paths to the corresponding folders on the lines 26 and 34-35.
Windows:
  1. Install Qt 5 and Qt Creator from here, when installing choose the version with Open GL.
  2. Open warpit.pro and edit the paths to the corresponding folders on the lines 29 and 38-39.
NOTE: For Windows uncomment the corresponding lines and comment the Mac OS related lines!

B. Compilation:

Mac OS:

First method (open terminal):

cd path_to/warpit/
mkdir bin
cd bin
qmake ..
make -j7
open warpit.app

Second method (go the project folder):

a. Configure the file warpit.pro with Qt Creator (just open it and follow the instructions)
b. Choose Release vesion in the left bottom corner
c. Build and run the program (cmd + R)

Windows:

a. Go to the project folder
b. Configure the file warpit.pro with Qt Creator (just open it and follow the instructions)
c. Choose Release version in the left bottom corner
d. Build and run the program (ctrl + R)

NOTE: The program can crash if you choose too many subdivision steps due to the lack of the available memory!

Screenshots

Main window with the loaded texture
Screenshot 1

Load the source polygon
Screenshot 2

Load the target polygon and morph the image
Screenshot 3

An example with the shown mesh on the target polygon
Screenshot 4

Bugs

If you find any bugs, please report them to me, and I will try to fix them as soon as possible!