waifu2x(original : https://github.com/nagadomi/waifu2x) re-implementation in C++ using OpenCV
C++ C Makefile Lua CMake Python Other
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 394 commits ahead of WL-Amigo:master.
Latest commit f89dd61 Jun 23, 2016
Failed to load latest commit information.
appendix update appendix/hints-jp.md Jun 1, 2015
build pie Nov 3, 2015
dists cpuid Jun 18, 2015
docs/internals added some docs Jul 19, 2015
include add TCLAP header files May 25, 2015
models cuda v3 Jun 14, 2015
models_rgb added rgb model Jun 28, 2015
src Fix memory leak again Jan 29, 2016
w32-apps j Jun 23, 2016
.gitattributes updated some jp translations Oct 22, 2015
.gitignore added improved simd routine Oct 31, 2015
CMakeLists.txt added w2xcr config dialog Jan 1, 2016
LICENSE Update LICENSE May 25, 2015
README.md updated binary link Nov 29, 2015
conv.c added w2mat Oct 24, 2015
dist.sh added w2xcr config dialog Jan 1, 2016
rm.c increased local size (disabled) May 31, 2015


waifu2x (converter only version)

This is a reimplementation of waifu2x (original) converter function, in C++, using OpenCV. This is also a reimplementation of waifu2x python version by Hector Martin. You can use this as command-line tool of image noise reduction or/and scaling.

Prebuilt binary-form release

works using waifu2x-converter

  • waifu2x_win_koroshell
    • waifu2x-converter GUI frontend that is easy to use, and so cute. You need only drag&drop to convert your image. (and also you can set converting mode, noise reduction level, scale ratio, etc..., on GUI)
    • Both waifu2x-converter x86 and x64 are included this package, and GUI see your windows architecture(x86|x64) and selects automatically which to use.
    • For windows only.



  • Ubuntu
  • Mac OS X?
  • Windows

(This program probably can be built under MacOSX, because OpenCV and other libraries support OS X)


  • OpenCV(C++, version 3.0.0 rc1)

This programs also depends on libraries shown below, but these are already included in this repository. CUDA Support in OpenCV is optional, since not required. (in version 1.0.0, CUDA Support is not used.)

How to build

for Ubuntu

Sorry, under construction...

These are hints for building :

  • I recommend to install OpenCV from sources. (build instruction is found here)
  • include path : include/ (/path/to/opencv/installed/directory)/include
  • library path : (/path/to/opencv/installed/directory)/lib
    • if you have built and installed OpenCV from source, and have changed install directory(by using CMAKE_INSTALL_PREFIX), you may need to set environment variable LD_LIBRARY_PATH for your OpenCV installed directory.
  • libraries to link : opencv_core opencv_imgproc opencv_imgcodecs opencv_features2d
  • standard of C++ : c++11


Usage of this program can be seen by executing this with --help option.

(My native language is not English, then I'm sorry for my broken English.)

modifided by tanakamura

  • Added CUDA, OpenCL(AMD GPU), x86 FMA, x86 AVX Support (That is selected automatically at runtime)
  • OpenCL(AMD GPU) version achieves 40% of peak performance (291GFLOPS @ A10-7850K)
  • Added CMakeLists.txt
  • You can build it by cmake ($ cmake -D OPENCV_PREFIX=<OpenCV include/lib dir>)
  • DLL interface
  • You can use waifu2x as library. include w2xconv.h & link w2xc.lib.