Course Website: Digital Image Processing Image Enhancement (Spatial Filtering 1)

Slides:



Advertisements
Similar presentations
3-D Computer Vision CSc83020 / Ioannis Stamos  Revisit filtering (Gaussian and Median)  Introduction to edge detection 3-D Computater Vision CSc
Advertisements

Spatial Filtering (Chapter 3)
Topic 6 - Image Filtering - I DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Digital Image Processing
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Digital Image Processing
Course Website: Digital Image Processing Image Enhancement (Histogram Processing)
انجمن دانشجویان ایران – مرجع دانلود کتاب ، نمونه سوال و جزوات درسی دانلود جزوات کارشناسی ارشد نرم افزار علوم تحقیقات البرز دانشگاه آزاد کرج Karaj.unicloob.ir.
Multimedia communications EG 371Dr Matt Roach Multimedia Communications EG 371 and EE 348 Dr Matt Roach Lecture 6 Image processing (filters)
Digital Image Processing: Revision
Course Website: Digital Image Processing Image Segmentation: Thresholding.
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
Digital Image Processing
Course Website: Digital Image Processing Morphological Image Processing.
Digital Image Processing
1 Image filtering Hybrid Images, Oliva et al.,
Lecture 2. Intensity Transformation and Spatial Filtering
Chapter 3 (cont).  In this section several basic concepts are introduced underlying the use of spatial filters for image processing.  Mainly spatial.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Spatial Filtering: Basics
Image Restoration and Reconstruction (Noise Removal)
Digital Image Processing Image Enhancement Part IV.
Digital Image Processing
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
Digital Image Processing (DIP)
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering Prof. Charlene Tsai.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Image Processing is replacing Original Pixels by new Pixels using a Transform rst uvw xyz Origin x y Image f (x, y) e processed = v *e + r *a + s *b +
انجمن دانشجویان ایران – مرجع دانلود کتاب ، نمونه سوال و جزوات درسی
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Digital Image Processing Lecture 10: Image Restoration
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Intelligent Vision Systems ENT 496 Image Filtering and Enhancement Hema C.R. Lecture 4.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering March 9, 2004 Prof. Charlene Tsai.
Non-linear Filters Non-linear filter (nelineární filtr) –spatial non-linear operator that produces the output image array g(x,y) from the input image array.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods.
Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Digital Image Processing Spatial Domain Filtering: Part I.
Digital Image Processing
Sharpening Spatial Filters ( high pass)  Previously we have looked at smoothing filters which remove fine detail  Sharpening spatial filters seek to.
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Digital Image Processing Lecture 10: Image Restoration
ECE 692 – Advanced Topics in Computer Vision
Digital Image Processing
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Digital Image Processing
Digital Image Processing
Digital Image Processing
Digital Image Processing
Digital Image Processing
Digital Image Processing
Digital Image Processing
Spatial operations and transformations
Digital Image Processing
Lecture: Image manipulations (2) Filters and kernels
Digital Image Processing Week IV
Interesting article in the March, 2006 issue of Wired magazine
Digital Image Processing
Digital Image Processing
Lecture 7 Spatial filtering.
Fundamentals of Spatial Filtering
Image Enhancement in Spatial Domain: Neighbourhood Processing
Spatial operations and transformations
Presentation transcript:

Course Website: Digital Image Processing Image Enhancement (Spatial Filtering 1)

2 of 19 Contents In this lecture we will look at spatial filtering techniques: –Neighbourhood operations –What is spatial filtering? –Smoothing operations –What happens at the edges? –Correlation and convolution

3 of 19 Neighbourhood Operations Neighbourhood operations simply operate on a larger neighbourhood of pixels than point operations Neighbourhoods are mostly a rectangle around a central pixel Any size rectangle and any shape filter are possible Origin x y Image f (x, y) (x, y) Neighbourhood

4 of 19 Simple Neighbourhood Operations Some simple neighbourhood operations include: –Min: Set the pixel value to the minimum in the neighbourhood –Max: Set the pixel value to the maximum in the neighbourhood –Median: The median value of a set of numbers is the midpoint value in that set (e.g. from the set [1, 7, 15, 18, 24] 15 is the median). Sometimes the median works better than the average

5 of 19 Simple Neighbourhood Operations Example Original Image x y Enhanced Image x y

6 of 19 The Spatial Filtering Process rst uvw xyz Origin x y Image f (x, y) e processed = v *e + r *a + s *b + t *c + u *d + w *f + x *g + y *h + z *i Filter Simple 3*3 Neighbourhood e 3*3 Filter abc def ghi Original Image Pixels * The above is repeated for every pixel in the original image to generate the filtered image

7 of 19 Spatial Filtering: Equation Form Filtering can be given in equation form as shown above Notations are based on the image shown to the left Images taken from Gonzalez & Woods, Digital Image Processing (2002)

8 of 19 Smoothing Spatial Filters One of the simplest spatial filtering operations we can perform is a smoothing operation –Simply average all of the pixels in a neighbourhood around a central value –Especially useful in removing noise from images –Also useful for highlighting gross detail 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 Simple averaging filter

9 of 19 Smoothing Spatial Filtering 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 Origin x y Image f (x, y) e = 1 / 9 * / 9 * / 9 * / 9 * / 9 * / 9 * / 9 * / 9 * / 9 *85 = Filter Simple 3*3 Neighbourhood /91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 1/91/9 3*3 Smoothing Filter Original Image Pixels * The above is repeated for every pixel in the original image to generate the smoothed image

10 of 19 Image Smoothing Example The image at the top left is an original image of size 500*500 pixels The subsequent images show the image after filtering with an averaging filter of increasing sizes –3, 5, 9, 15 and 35 Notice how detail begins to disappear Images taken from Gonzalez & Woods, Digital Image Processing (2002)

11 of 19 Image Smoothing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

12 of 19 Image Smoothing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

13 of 19 Image Smoothing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

14 of 19 Image Smoothing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

15 of 19 Image Smoothing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

16 of 19 Image Smoothing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

17 of 19 Weighted Smoothing Filters More effective smoothing filters can be generated by allowing different pixels in the neighbourhood different weights in the averaging function –Pixels closer to the central pixel are more important –Often referred to as a weighted averaging 1 / 16 2 / 16 1 / 16 2 / 16 4 / 16 2 / 16 1 / 16 2 / 16 1 / 16 Weighted averaging filter

18 of 19 Another Smoothing Example By smoothing the original image we get rid of lots of the finer detail which leaves only the gross features for thresholding Images taken from Gonzalez & Woods, Digital Image Processing (2002) Original Image Smoothed ImageThresholded Image

19 of 19 Averaging Filter Vs. Median Filter Example Filtering is often used to remove noise from images Sometimes a median filter works better than an averaging filter Original Image With Noise Image After Averaging Filter Image After Median Filter Images taken from Gonzalez & Woods, Digital Image Processing (2002)

20 of 19 Averaging Filter Vs. Median Filter Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

21 of 19 Averaging Filter Vs. Median Filter Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

22 of 19 Averaging Filter Vs. Median Filter Example Images taken from Gonzalez & Woods, Digital Image Processing (2002)

23 of 19 Simple Neighbourhood Operations Example x y

24 of 19 Strange Things Happen At The Edges! Origin x y Image f (x, y) e eee At the edges of an image we are missing pixels to form a neighbourhood e e e

25 of 19 Strange Things Happen At The Edges! (cont…) There are a few approaches to dealing with missing edge pixels: –Omit missing pixels Only works with some filters Can add extra code and slow down processing –Pad the image Typically with either all white or all black pixels –Replicate border pixels –Truncate the image –Allow pixels wrap around the image Can cause some strange image artefacts

26 of 19 Simple Neighbourhood Operations Example x y

27 of 19 Strange Things Happen At The Edges! (cont…) Original Image Filtered Image: Zero Padding Filtered Image: Replicate Edge Pixels Filtered Image: Wrap Around Edge Pixels Images taken from Gonzalez & Woods, Digital Image Processing (2002)

28 of 19 Strange Things Happen At The Edges! (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

29 of 19 Strange Things Happen At The Edges! (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

30 of 19 Strange Things Happen At The Edges! (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

31 of 19 Correlation & Convolution The filtering we have been talking about so far is referred to as correlation with the filter itself referred to as the correlation kernel Convolution is a similar operation, with just one subtle difference For symmetric filters it makes no difference e processed = v *e + z *a + y*b + x*c + w *d + u *e + t *f + s *g + r *h rst uvw xyz Filter abc dee fgh Original Image Pixels *

32 of 19 Summary In this lecture we have looked at the idea of spatial filtering and in particular: –Neighbourhood operations –The filtering process –Smoothing filters –Dealing with problems at image edges when using filtering –Correlation and convolution Next time we will looking at sharpening filters and more on filtering and image enhancement