Skip to content

A set of routines for running kernel-based filters on images.

Notifications You must be signed in to change notification settings

shaiperson/kernel-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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.

Building and usage

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

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/.

Original image

alt text

Blur

alt text

Sharpen

alt text

Edge detection

alt text

About

A set of routines for running kernel-based filters on images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages