Nevron .NET Vision
Framework / Presentation Layer / Graphics / Appearance Styles / Image Filters Style / Image Filters Overview

In This Topic
    Image Filters Overview
    In This Topic

    Nevron Graphics provides built-in support for image filters (or per pixel operations). All elements that have an associated fill style object (practically all visual objects) support this feature. This greatly increases the visual quality of the generated image and is a must have feature for applications requiring high presentation quality. Note however that image filters albeit optimized are computationally expensive. The following sections will give you a basic idea on how image filters work internally in order to better understand the settings exposed by each filter.

     Convolution Matrix

    The core of image filters processing are the convolution filters. The idea behind convolution is that each pixel in the image is converted by using a 2D matrix where the center matrix value represents the pixel that is currently being processed and the values that surround it represent how the neighboring pixels affect the value of the pixel in the resulting image. For example consider the following matrix:

    0 0 0
    0 1 0
    0 0 0

    It is called an identity matrix, because the image is not changed by passing through it and is also normalized because the sum of its elements is 1. The identity matrix is the most simple convolution kernel. Larger convolution kernels are more computationally expensive to process because each pixel has to be weighted against more pixels.

    For example a convolution kernel with size 3x3 will roughly require 10 computations (9 for processing each neighboring pixel value and adding it to the total sum plus 1 for dividing the result to the number of cells in the matrix). In contrast a 5x5 kernel will require 26 computations. Therefore it is recommended to set smaller values to the properties of the image filters that reflect the size of the kernel (like Size in the NBlurImageFilter class, or Depth in the case of the NLightingImageFilter class).

     Image Channel
    Another common word used in image processing is the image channel. Each image can be broken in several planes corresponding to the color components of each pixel color. The rendering engine behind image filters uses 4 image channels - one for the alpha, red, green and blue components of the image.