Giter VIP home page Giter VIP logo

image-filter's Introduction

some mainstream image filter: boxfilter, fast guided filter, fast bilateral filter, permutohedral bilateral filter and propagated filter

  1. boxfilter
  2. fast guided filter
  3. fast bilateral filter
  4. permutohedral bilateral filter
  5. propagated filter

All original dependencies have been removed. Code could be run independently.

BOXFILTER Simple Interface

@param src         				image,single channel.

@param dst      				output image,single channel.

@param w           				width of image.

@param h           				height of image.

@param c      					channel of image, only c = 1.

@param r      					local window radius.

@return            				0:ok; 1:error

int BoxfilterFilter(unsigned char *src, unsigned char *dst, int w, int h, int c, int r);

Fast Guided Filter Simple Interface

@param src         				image,single channel.

@param guidance           		guided image,single channel.

@param dst      				output image,single channel.

@param w           				width of image.

@param h           				height of image.

@param c      					channel of image, only c = 1.

@param r      					local window radius.

@param rp      					regularization parameter:eps.

@param sr      					subsampling ratio, sr>1:downscale; 0<sr<1:upscale.

@return            				0:ok; 1:error

int FastGuidedFilter(unsigned char *src, unsigned char *guidance, unsigned char *dst, int w, int h, int c, int r, float rp, float sr);

FastBilateralFilter Simple Interface

@param src         				input image.

@param guidance           		guided image,single channel, only single channel is valid; invalid parameter in three channels.

@param dst      				output image.

@param w           				width of image.

@param h           				height of image.

@param c      					channel of image, only c = 1 or c = 3.

@param sigma_s      			filter sigma in the coordinate space. A larger value of the parameter means that farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace.

@param sigma_r      			filter sigma in the color space. A larger value of the parameter means that farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting in larger areas of semi-equal color.

@return            				0:ok; 1:error

int FastBilateralFilter(unsigned char *src, unsigned char *guidance, unsigned char *dst, int w, int h, int c, float sigma_s, float sigma_r);

PermutohedralBilateralFilter Simple Interface

@param src         				input image.

@param guidance           		guided image. 

@param dst      				output image.

@param w           				width of image.

@param h           				height of image.

@param c      					channel of image, only c = 1 or c = 3.

@param sigma_s      			filter sigma in the coordinate space. A larger value of the parameter means that farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace.

@param sigma_r      			filter sigma in the color space. A larger value of the parameter means that farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting in larger areas of semi-equal color.

@return            				0:ok; 1:error

int PermutohedralBilateralFilter(unsigned char *src, unsigned char *guidance, unsigned char *dst, int w, int h, int c, float sigma_s, float sigma_r);

PropagatedFilter Simple Interface

@param src         				input image.

@param guidance           		guided image. 

@param dst      				output image.

@param w           				width of image.

@param h           				height of image.

@param c      					channel of image, only c = 1 or c = 3.

@param r      					local window radius.

@param sigma_s      			filter sigma in the coordinate space. A larger value of the parameter means that farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace.

@param sigma_r      			filter sigma in the color space. A larger value of the parameter means that farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting in larger areas of semi-equal color.

@return            				0:ok; 1:error

int PropagatedFilter(unsigned char *src, unsigned char *guidance, unsigned char *dst, int w, int h, int c, int r, float sigma_s, float sigma_r);

Filter implementations are described in the paper:

Adams, Andrew, Jongmin Baek, and Myers Abraham Davis. "Fast High‐Dimensional Filtering Using the Permutohedral Lattice." Computer Graphics Forum. Vol. 29. No. 2. Blackwell Publishing Ltd, 2010.

He, Kaiming, Jian Sun, and Xiaoou Tang. "Guided image filtering." European conference on computer vision. Springer Berlin Heidelberg, 2010.

He K, Sun J. Fast guided filter[J]. arXiv preprint arXiv:1505.00996, 2015.

Paris, Sylvain, and Frédo Durand. "A fast approximation of the bilateral filter using a signal processing approach." European conference on computer vision. Springer Berlin Heidelberg, 2006.

Durand, Frédo, and Julie Dorsey. "Fast bilateral filtering for the display of high-dynamic-range images." ACM transactions on graphics (TOG). Vol. 21. No. 3. ACM, 2002.

Rick Chang, Jen-Hao, and Yu-Chiang Frank Wang. "Propagated image filtering." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2015.

Copyright (c) 2016-2017 Frotms([email protected])

image-filter's People

Contributors

curiositykilledfrotms avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.