HomeOfVapourSynthEvolution / VapourSynth-waifu2x-opt

waifu2x image super-resolution/denoise filter for VapourSynth, based on the waifu2x-opt library
GNU General Public License v3.0
29 stars 8 forks source link

VapourSynth-waifu2x-opt

Copyright© 2015 mawen1250

waifu2x image super-resolution/denoise filter for VapourSynth, based on the waifu2x-opt library

This plugin is deprecated, use VapourSynth-Waifu2x-w2xc or VapourSynth-Waifu2x-caffe instead.

Description

It's a high quality image restoration filter for anime, mainly for super-resolution, also contains 2 denoising modes.

This plugin employs waifu2x-opt library and zimg library v1.1 for scaling related stuffs. Thanks for their works!

Note that the waifu2x-opt is dynamic linked while the zimg is static linked.

Also the waifu2x-opt requires 3 model files in the same folder of vs_waifu2x.dll.

Thus there're totally 5 files you need to put into a same folder (such as the VapourSynth plugin auto-load folder):

namespace: waifu2x

functions: Denoise, Resize

Important Note

Usage

Denoising filter

This filter applies denoising to the Y channel, and keeps UV channels unchanged.
For RGB input, it is automatically converted to YUV for processing, then converted back to RGB for output.

waifu2x.Denoise(clip input[, int mode=1, int matrix=6, bint full, int block_width=1280, int block_height=1280, int threads=1])

Super-resolution filter

This filter applies scaling in YUV color space.
For RGB input, it is automatically converted to YUV for processing, then converted back to RGB for output.
The Y channels is first scaled to 2x using nearest-neighborhood interpolation, then waifu2x is applied to convert the low-resolution image to the high-resolution one (though the image size is unchanged). If any custom scaling parameter (width, height, shift_w, shift_h, subwidth, subheight) is set, a post-scaling is applied to the high-resolution image to get the final output image.
The UV channels are scaled using Catmull-Rom (Bicubic, b=0, c=0.5) by default.

waifu2x.Resize(clip input[, int width=input.width*2, int height=input.height*2, float shift_w=0, float shift_h=0, float subwidth=input.width, float subheight=input.height, string filter="bicubic", float filter_param_a=0, float filter_param_b=0.5, string filter_uv="bicubic", float filter_param_a_uv=0, float filter_param_b_uv=0.5, int subsample_w=input.format.subsampling_w, int subsample_h=input.format.subsampling_h, string chroma_loc_in="mpeg2", string chroma_loc_out=chroma_loc_in, int matrix=6, bint full, int block_width=1280, int block_height=1280, int threads=1])