• Stars
    star
    162
  • Rank 232,284 (Top 5 %)
  • Language
    C++
  • License
    Other
  • Created almost 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Decomposing an input image into layers via "color unblending"

Unblending

Ubuntu macOS

Unblending is a C++ library for decomposing a target image into a set of semi-transparent layers associated with advanced color-blend modes (e.g., "multiply" and "color-dodge"). Output layers can be imported to Adobe Photoshop, Adobe After Effects, GIMP, Krita, etc. and are useful for performing complex edits that are otherwise difficult.

An example of image decomposition. Input image courtesy of David Revoy.

  • unblending is a library that provides the main functionality for the use from other programs.
  • unblending-cli is an executable with a command line interface to use the main functionality.
  • unblending-gui is an executable with a graphical user interface to use the main functionality with interactive specification of necessary input parameters.

Publication

Yuki Koyama and Masataka Goto. 2018. Decomposing Images into Layers with Advanced Color Blending. Comput. Graph. Forum 37, 7, pp.397--407 (2018). (a.k.a. Proceedings of Pacific Graphics 2018) DOI: https://doi.org/10.1111/cgf.13577

This library is provided mainly for researchers who want to use or extend the method described in the above paper. We also expect that this library is useful for developers who plan to use the method in their software.

Demo

Unblending Web App: https://unblending.ongaaccel.jp

Dependencies

Prerequisites

Eigen (3.x.x) and Qt (5.x.x) need to be installed beforehand.

macOS

brew install eigen qt@5

Ubuntu

sudo apt install qt5-default libeigen3-dev

Build Using CMake

Unblending is organized using cmake and is built by the following commands:

git clone https://github.com/yuki-koyama/unblending.git --recursive
mkdir build
cd build
cmake ../unblending
make

This process builds a static library (e.g., libunblending.a) and a command line interface (CLI) named unblending-cli.

The CLI can be used by the following command:

./unblending-cli/unblending-cli [-o <output-dir-path>] [-w <target-image-width>] <input-image-path> <layer-infos-path>

The GUI allows you to interactively specify necessary parameters. Currently the GUI is tested on macOS only (pull requests are highly appreciated).

GUI. Input image courtesy of David Revoy.

Build and Run Using Docker

If you use docker, you can easily build the CLI by docker build:

git clone https://github.com/yuki-koyama/unblending.git --recursive
cd unblending
docker build -t unblending-cli:latest .

Then, you can use the CLI by docker run:

docker run --rm --volume $(pwd):/tmp -it unblending-cli:latest [-o <output-dir-path>] [-w <target-image-width>] <input-image-path> <layer-infos-path>

For example, the following command generates results into a sub directory named output:

docker run --rm --volume $(pwd):/tmp -it unblending-cli:latest -o /tmp/output -w 120 /tmp/examples/magic.png /tmp/examples/magic.json

Note: this typically takes around 10--30 seconds with consumer-level laptops.

LayerInfos File Structure

See LayerInfos.md.

Licensing

Unblending is dual-licensed; You may use this software under either LGPLv3 or our commercial (proprietary) license. See the LICENSE files for details.

Contributing

Pull requests are highly welcome. Please be aware that any contribution to this repository will be licensed under the above license condition.

Authors

  • Yuki Koyama
  • Masataka Goto

Copyright

Copyright (c) 2018 National Institute of Advanced Industrial Science and Technology (AIST) - [email protected]

More Repositories

1

blender-cli-rendering

Blender Python scripts for rendering images directly from command-line interface
Python
692
star
2

elasty

A research-oriented elastic body simulator
C++
323
star
3

tinycolormap

A header-only, single-file library for colormaps written in C++11
C++
285
star
4

mathtoolbox

Mathematical tools (interpolation, dimensionality reduction, optimization, etc.) written in C++11 with Eigen
C++
245
star
5

bigger

bigg (bgfx + imgui + glfw + glm) + utils
C++
196
star
6

position-based-fluids

Position Based Fluids [SIGGRAPH 2013] in C++
C++
125
star
7

color-util

A header-only C++11 library for colors; color space converters for RGB, HSL, XYZ, Lab, etc. and perceptual color difference calculators such as CIEDE2000
C++
89
star
8

sequential-line-search

A Preferential Bayesian optimization library for C++/Python [SIGGRAPH 2017]
C++
43
star
9

bvh11

A tiny C++11 library for reading BVH motion capture data
C++
36
star
10

optimo

Keyframe-based motion editing system using numerical optimization [CHI 2018]
C++
30
star
11

parallel-util

Simple header-only implementation of "parallel_for" and "parallel_map" for C++11
C++
30
star
12

btoon

Blender Addon for Toon Rendering
Python
21
star
13

sequential-gallery

Sequential Gallery for Interactive Visual Design Optimization [SIGGRAPH 2020]
C++
20
star
14

hello-bgfx

Hello-world project for bgfx + GLFW managed by CMake
C++
15
star
15

split-toning

A Blender addon for simulating the Split Toning effect in Adobe Lightroom/Photoshop
Python
14
star
16

real-time-example-based-elastic-deformation

Real-Time Example-Based Elastic Deformation [SCA 2012]
C
14
star
17

nlopt-util

A header-only wrapper library for calling NLopt optimization in a single line using Eigen::VectorXd
C++
14
star
18

visoptslider

Qt-based implementation of VisOpt Slider widget [UIST 2014] for C++ & Python
C++
12
star
19

nodelayout

A Blender add-on for automatic layout of nodes
Python
9
star
20

cc0assetsloader

A Blender add-on for loading CC0 assets (PBR textures, HDR images, etc.)
Python
8
star
21

enhancer

A C++11 / GLSL library for enhancing photographs (adjusting brightness, contrast, etc.)
C++
8
star
22

latexie

Utilities for writing papers with LaTeX
TeX
6
star
23

constrained-optimization-tests

Simple implementation of constrained optimization methods, including the penalty method and the augmented Lagrangian method
C++
5
star
24

rbf-interpolator

[deprecated] Radial Basis Function (RBF) Interpolation written in C++11. This can be used for fitting a non-linear function from scattered data.
C++
5
star
25

siggraph-jp-papers

SIGGRAPH Papers by Japanese Researchers
HTML
4
star
26

selph

Machine learning-based photo color enhancement system [CHI 2016]
C++
4
star
27

three-dim-util

A utility library for prototyping 3D applications based on Qt, Eigen, and legacy OpenGL
C++
4
star
28

armature-proxy-mesh

A Blender add-on for easy creation of proxy meshes for a selected armature object
Python
4
star
29

imagedistance

Given two images, calculate their distance in several criteria
C++
3
star
30

pycolormap

A self-contained colormap library for Python
Python
3
star
31

hello-tbb-cmake

A hello-world project for testing "parallel_for" in Intel TBB. The whole project (including TBB) is built using CMake.
C++
3
star
32

multidimensional-scaling

[deprecated] A header-only C++ library of the multidimensional scaling (MDS)
C++
2
star
33

academic-illustration-assets

Assets for creating illustrative figures (and video figures) released under CC0 (public domain)
2
star
34

filesystem-util

C++11 utility functions for handling files (currently only for UNIX/Linux)
C++
2
star
35

timer

Execution timer for measuring elapsed times for code blocks written in C++11
C++
1
star
36

cgi-2019-program

List of the papers presented at CGI 2019
Python
1
star
37

hello-alembic

Just a hello-world project to start learning the Alembic library
C++
1
star
38

pyenhancer

A tiny NumPy-based library for image color enhancement
Python
1
star
39

hello-trello-api

Toy Python scripts using Trello's REST API
Python
1
star
40

rand-util

Utility functions for <random> in c++11
C++
1
star
41

optimization-test-functions

A set of test functions to evaluate optimization algorithms written in C++11
C++
1
star
42

string-util

Utility functions for <string> in C++11
C++
1
star
43

qt-animated-layout-example

A custom animated layout example in Qt5
C++
1
star
44

easy-qhull

A helper repository to use qhull in cmake-based c++ projects
CMake
1
star