vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
apply a forward/backward n-pole recursive filter to an image More...
#include <iostream>
#include <stdlib.h>
#include <vspline/general_filter.h>
#include <vigra/stdimage.hxx>
#include <vigra/imageinfo.hxx>
#include <vigra/impex.hxx>
Go to the source code of this file.
Typedefs | |
typedef vigra::RGBValue< float, 0, 1, 2 > | pixel_type |
typedef vigra::MultiArray< 2, pixel_type > | target_type |
Functions | |
int | main (int argc, char *argv[]) |
apply a forward/backward n-pole recursive filter to an image
vspline has some code which isn't useful only for b-splines. One example is the application of a filter to a MultiArrayView. With vspline's multithreaded SIMD code, this is done efficiently. This example program will apply an n-pole forward/backward recursive filter with the given pole values along the horizontal and vertical. You can pass an arbitrarily long sequence of pole values after an image file name, but bear in mind that some pole values can lead to infinite results.
compile with: ./examples.sh iir.cc
invoke passing an image file and the pole values. the result will be written to 'iir.tif'
positive pole values will blur the image. Don't exceed 1.0. Negative values will sharpen the image. blurring with a single positive pole value close to 1.0 is a very efficient way to affect a strong blur quickly.
TODO: compare the result of this filter with a standard gaussian
Definition in file iir.cc.
typedef vigra::RGBValue< float , 0 , 1 , 2 > pixel_type |
typedef vigra::MultiArray< 2 , pixel_type > target_type |