Home Utilities Tutorials 3D Demos Graphics Cards Forums About

 GeeXLab
Current version: 0.45.1
>GeeXLab homepage

 FurMark
Current version: 1.30.0
>FurMark homepage

 GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

 GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage

 Blogs
>JeGX's HackLab

 Geeks3D's Articles
>GPU Memory Speed Demystified

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

 PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

 TessMark
Current version: 0.3.0
>TessMark homepage

Current version: 0.3.0

 Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Libraries and Plugins
>Demos
>Codes Samples

Image Filtering with GLSL - Convolution Kernels

By Jérôme 'JeGX' Guinot - jegx [at] ozone3d [dot] net

Initial draft: December 8, 2005
Last update: January 8, 2006

Translated from french by Samir Fitouri

[ Index ]

ï¿½Next Page

| | | |

 1 - Introduction2 - Gaussian Filter3 - Mean Filter4 - Laplacian Filter5 - Emboss Filter6 - Sharpness Filter7 - Further Reading8 - Downloads

1 - Introduction

In this tutorial, we will see how to implement in GLSL (OpenGL Shading Language) the filters usually used in image processing: blur (Gaussian Filter), de-dusting (Mean Filter), edegs detection (Laplacian Filter), emboss and sharpness. All these filters are found in all image processing softwares (Photoshop, Paintshop Pro...).

The convolution is an operation in which the final pixel is the weighted sum of the neighboring pixels. This convolution operation is based on a matrix which gives some weight to each one of the neighbor pixels. This matrix is called convolution kernel. This matrix is a square 3x3, 5x5 or 7x7 dimension matrix (or more depending on filters). In this tutorial, we will use 3 dimension kernels.

The convolution kernel is also called linear filter.

The image which will be used to illustrate the operation of the various filters is the following one:

Fig.1 - Basic image.

And now, let us see the filters codes.

[ Index ]

ï¿½Next Page

 GeeXLab demos

GLSL - Mesh exploder

PhysX 3 cloth demo

Normal visualizer with GS