Image Filtering with GLSL
140 likes | 344 Vues
Image Filtering with GLSL. DI1.03 蔡依儒. Outline. Convolution Convolution implementation using GLSL Commonly used convolution filter Mean Filter Gaussian Filter Laplacian Filter Sharpness Filter. Convolution 1. Convolution
Image Filtering with GLSL
E N D
Presentation Transcript
Image Filtering with GLSL DI1.03 蔡依儒
Outline • Convolution • Convolution implementation using GLSL • Commonly used convolution filter • Mean Filter • Gaussian Filter • Laplacian Filter • Sharpness Filter
Convolution1 • Convolution • an operation in which the final pixel is the weighted sum of the neighboring pixels • Convolution kernel • a matrix which gives some weight to each one of the neighbor pixels • filter, mask, kernel, template, or window
Mean Filter • Most commonly used for the image noise elimination • eliminating pixel values which are unrepresentative of their surroundings
Gaussian Filter1 • A kind of Lowpass filters • Used to blur an image and remove detail and noise 1/16 2/16 1/16 2/16 4/16 2/16 2/16 1/16 1/16
Gaussian Filter3 • Results of smoothing with square filter masks of sizes n = 3, 5, 9, 15, and 35, respectively • The black squares at the top are of sizes 3, 5, 9, 15, 25, 35, 45, and 55 pixels, respectively
Laplacian Filter1 • Used for the image edges detection 0 1 0 1 -4 1 1 0 0
Sharpness Filter • Used to increase and to make stand out the details of an image 0 -1 0 -1 -1 -1 -1 -1 5 9 -1 -1 -1 -1 0 0 -1 -1
Reference • http://www.ozone3d.net/tutorials/image_filtering.php • http://www.cee.hw.ac.uk/hipr/html/filtops.html • Digital Image Processing 2nd Edition • by Gonzalez and Woods • Prentice Hall • http://big5.yesky.com/b5/www.yesky.com/SoftChannel/72342371928702976/20041028/1869312.shtml