A set of routines for running kernel-based filters on images. They convolve an arbitrary image of an arbitrary pixel type with an arbitrary kernel and kernel anchor point, allowing to choose between different policies for handling the borders of the image.
The functionality is similar to OpenCV's filter2D (see http://docs.opencv.org/2.4/modules/imgproc/doc/filtering.html); the focus here is on a polymorphic object-oriented approach designed to maximize extensibility with new edge-handling policies.
Currently, three policies are implemented: wrap, extend and crop. Wrap and extend are analogous to OpenCV's BORDER_WRAP and BORDER_REPLICATE. Crop simply crops out the borders.
This code relies on OpenCV2 for input/output, basic structures and functions for handling images.
- Go to "build/"
- Run "cmake ." to create Makefile
- Run "make" to create executables
- Executables are placed in "bin/"
Examples of usage can be found in example/example.cpp. After building, executing bin/example will run different filters on a given input image and write the results in a given location. For instance, the images in example/output were obtained by running ./bin/example example/input/messi.jpg example/output/.