2D Image Filters

2D filters are an important part of Image Processing Applications. To make life easier we provide a single generic filter function with CUVI to apply any linear filter to an image. Currently we support filter sizes of 3x3, 5x5 and 7x7. We have in-build flags for various famous filters and programmer can input his custom filter elements as well. It’s that simple:

CuviStatus cuvi.filter2D(inputImage,outputImage,FILTER_TYPE,CUSTOM_FILTER,ANCHOR);

Here are few of many in-built Filters of CUVI:

input-image
Original Image
average
Averaging Filter
sharpened-image
Sharpened Image

Sobel-Y
Sobel Y
prewitt-x
Prweitt X
high-boost
High Boost

User can also input his own custom filter in the form of a 1D array. The taps of the filter are placed in row major fashion as seen from the figure below. In most of the cases we place the center of the filter window on the pixel that corresponds to the current output location, that is Anchor Position = -1,-1 for 3x3 and -2,-2 for 5x5 filter and so on. You also have the freedom to change the default Anchor Position via input argument.

custom-filter