
Distribution Version 1.1 -- 09/21/2014 by Qi Zhang Copyright 2014, The Chinese University of Hong Kong.

This executable is created based on the method described in the following paper:
[1] "100+ Times Faster Weighted Median Filter", Qi Zhang, Li Xu, Jiaya Jia, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014

The code and the algorithm are for non-comercial use only.

JointWMF.exe 
    This is the implementation of our method presented in this paper in the joint-histogram framework.

demo.bat: edge-aware image filtering
demo_jpeg_removal.bat: jpeg artifacts removal
demo_L0.bat: minimizing window-based L0 energy
ddemo_texture_smooth.bat: texture smoothing
demo_waterpaint.bat: waterpaint NPR

Usage of JointWMF.exe:

	 JointWMF -option1 value1 -option2 value2 ...

	 -i input image path (any channels)
	 -f feature image path (1-channel or 3-channel)
	 -o output image path
	 -r radius
	 -si range sigma [0,255]
	 -nF feature level
	 -t iteration
	 -w weight type: exp/inv1/inv2/cos/jac/off


Example:
	 JointWMF -i data/image1.png -r 10
	 JointWMF -i data/image1.png -f data/image1.png -o data/output.png -r 10 -si 25.5 -w exp -nF 256 -t 1


About Distance:
exp: exp(-|I1-I2|^2/(2*sigma^2)) /***Default***/
inv1: (|I1-I2|+sigma)^-1 /***For L0 smooth***/
inv2: (|I1-I2|^2+sigma^2)^-1
cos: dot(I1,I2)/(|I1|*|I2|)
jac: (min(r1,r2)+min(g1,g2)+min(b1,b2))/(max(r1,r2)+max(g1,g2)+max(b1,b2))
off: unweighted


