GrIP: Graph-Based Image Processing

March 21st, 2013

GrIP: Graph-Based Image Processing

Post processing of image data is one possibility of achieving an improved image quality. Available methods cover filters for changing brightness and contrast of images as well as scaling algorithms based on different concepts. Adding data like depth or normal values to the original image information leads to a large amount of new possibilities for post processing. Based on a combination of these informations, it is e.g. possible to approximate illumination effects in screen space, which are usually calculated using physically based methods like path tracing. Also, it is possible to use depth information for simulation of depth of field or fog effects. Many more – artistic as well as realistic – effects are available, supporting the observer’s perception or enhancing the visual attractiveness of images.

The project’s goal was the implementation of a graph based framework for post processing filters, which is now called GrIP (for Graph-based Image Processing). By graph-based, the possibility of arranging and connecting compatible filters in a directed, acyclic graph is meant. This means that the construction of whole filter graphs should be possible through an external interface, avoiding the necessity of a recompilation cycle after changes in post processing. Filter graphs are implemented as XML files containing a collection of filter nodes with their parameters as well as linkage (dependency) information.

Another goal was the extensibility, so that new filters (filter nodes) could be developed and used in GrIP easily. This is done by providing a plugin system, which loads filters dynamically at runtime, while each filter is responsible for getting its own parameters from the framework. The latter is achieved by passing an instance of a wrapper class to each called node, wrapping the concrete graph information to a uniform interface, so other representations besides XML are also possible to implement by just implementing the wrapper class’ interface. All nodes were to be developed so that they are applicable in interactive applications and therefore executable at real-time frame rates. For this reason, NVIDIA CUDA was used for the proof-of-concept implementation of filter nodes.

Also, a visualization method for filter graphs was implemented using Graphviz. As a second GUI component, an automatically generated set of sliders for interactive manipulation of the nodes’ parameters has been implemented, useful for testing newly implemented filters as well as finding good combinations of parameters when a specific output result is desired.

Parameters for Depth Darkening, Depth of Field and Fog in a single Parameterizer GUI
Rendering of Sponza with Depth Darkening, Depth of Field and Fog using the Parameter Values from the GUI Screenshot


According Graph Visualization


Code Snippet Showing Parts of the XML-Based Filter Graph

Here are some Youtube videos showing GrIP in action:

Depth Darkening

Depth of Field

Directional Occlusion

Comments are closed.