Median Filter If the objective is to achieve noise reduction rather than blurring, an alternative approach is to use median filters. That is, the gray.

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

Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
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
Image Processing Lecture 4
Spatial Filtering.
Image Filtering. Outline Outline Concept of image filter  Focus on spatial image filter Various types of image filter  Smoothing, noise reductions 
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
CS 4487/9587 Algorithms for Image Analysis
APECE-505 Intelligent System Engineering Low-level Processing Md. Atiqur Rahman Ahad Reference books: - Computer Vision and Action Recognition, Md. Atiqur.
EE 4780 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Rank filtering From noise image Rank filtering mask (7 x 7 ) rank 4.
DTM Generation From Analogue Maps By Varshosaz. 2 Using cartographic data sources Data digitised mainly from contour maps Digitising contours leads to.
6/9/2015Digital Image Processing1. 2 Example Histogram.
Computer Vision Group Edge Detection Giacomo Boracchi 5/12/2007
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
Low Pass Filtering Spatial frequency is a measure of how rapidly brightness or colour varies as we traverse an image. Figure 7.11a shows that an image.
EE663 Image Processing Edge Detection 2 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
2007Theo Schouten1 Enhancements Techniques for editing an image such that it is more suitable for a specific application than the original image. Spatial.
Processing Digital Images. Filtering Analysis –Recognition Transmission.
MSU CSE 803 Stockman Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute.
Digital Image Processing
Edge Detection Lecture 2: Edge Detection Jeremy Wyatt.
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
1 Lecture 12 Neighbourhood Operations (2) TK3813 DR MASRI AYOB.
MSU CSE 803 Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute some result.
Image Filtering. Problem! Noise is a problem, even in images! Gaussian NoiseSalt and Pepper Noise.
Chapter 3 (cont).  In this section several basic concepts are introduced underlying the use of spatial filters for image processing.  Mainly spatial.
Chapter 10: Image Segmentation
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Spatial Filtering: Basics
Digital Image Processing Image Enhancement Part IV.
Digital Image Processing
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Image processing.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Joon Hyung Shim, Jinkyu Yang, and Inseong Kim
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
Chapter 10, Part I.  Segmentation subdivides an image into its constituent regions or objects.  Image segmentation methods are generally based on two.
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
Lecture 5 Mask/Filter Transformation 1.The concept of mask/filters 2.Mathematical model of filtering Correlation, convolution 3.Smoother filters 4.Filter.
Digital Image Processing Lecture 10: Image Restoration
Spatial Filtering.
Spatial Filtering (Applying filters directly on Image) By Engr. Muhammad Saqib.
Image Subtraction Mask mode radiography h(x,y) is the mask.
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
October 1, 2013Computer Vision Lecture 9: From Edges to Contours 1 Canny Edge Detector However, usually there will still be noise in the array E[i, j],
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
EE 7730 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Lecture Seven Figures from Gonzales and Woods, Digital Image Processing, Copyright 2002.
September 26, 2013Computer Vision Lecture 8: Edge Detection II 1Gradient In the one-dimensional case, a step edge corresponds to a local peak in the first.
Sliding Window Filters Longin Jan Latecki October 9, 2002.
Non-linear filtering Example: Median filter Replaces pixel value by median value over neighborhood Generates no new gray levels.
Image Processing Lab Section 28/3/2016 Prepared by Mahmoud Abdelsatar Demonstrator at IT Dep. Faculty of computers and information Assuit University.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Digital Image Processing
Computer Vision Lecture 9: Edge Detection II
Geometric and Point Transforms
a kind of filtering that leads to useful features
a kind of filtering that leads to useful features
Edge Detection Speaker: Che-Ming Hu Advisor: Jian-Jiun Ding
Non-local Means Filtering
Linear Operations Using Masks
Enhancement.
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Presentation transcript:

Median Filter If the objective is to achieve noise reduction rather than blurring, an alternative approach is to use median filters. That is, the gray level of each pixel is replaced by the median of the gray levels in a neighbourhood of that pixel, instead of by the average.

This method is particularly effective when the noise pattern consists of strong, spike-like components and the characteristic to be preserved is edge sharpness. The median m of a set of values is such that half the values in the set are less than m and half are greater than m. In order to perform median filtering in a neighbourhood of a pixel, we first sort the values of the pixel and its neighbours, determine the median, and assign this value to the pixel.

For example, in a 3 X 3 neighbourhood the median is the 5th largest value, in a 5 x 5 neighbourhood the 13th largest value, and so on. When several values in a neighbourhood are the same, all equal values have to be grouped. For example, suppose that a 3 X 3 neighbourhood has values (10, 20, 20, 20, 15, 20, 20, 25,100). These values are sorted as (10, 15, 20, 20, 20, 20, 20, 25, 100), which results in a median of 20.

Thus the principal function of median filtering is to force points with distinct intensities to be more like their neighbours, actually eliminating intensity spikes that appear isolated in the area of the filter mask.

(b)(c)(a) Fig.7.28 Noise suppression. (a) Original image corrupted by 5% impulse noise (b) Result of 3 x 3 mean filtering (c) Result of 3 x 3 median filtering.

Fig.7.29 A 3 x 3 neighbourhood within a portion of the image in Fig.7.28(a)

The new value obtained for this pixel using a 3 x 3 mean filter is ( )/9=128 So mean filtering has not removed the noise completely. To apply a median filter, we place the grey levels from the neighbourhood in a list, {64,64,64,64,255,255,64,64,255}, and sort the list into ascending order {64,64,64,64,64,64,255,255,255}.

The median from this set of values is 64. The noisy values have migrated to the end of the list. Clearly, median filtering can eliminate the impulse noise only if the noisy pixels occupy less than half the area of the neighbourhood.

Edge detection One of the major applications for convolution is in edge detection. Edges can be defined loosely as locations in an image where there is a sudden variation in the grey level of pixels. The contours of solid objects, surface markings, shadows, etc. all generate intensity or colour edges.

The most common method in edge detection is based on the estimation of grey level gradient at a pixel. The gradient is used frequently in industrial application, either to aid humans in the detection of defects or, as a preprocessing step in automated inspection.

Fig (a) A 3 x 3 region of an image (the z’s are grey level values); (b) Prewitt masks; (c) Sobel masks used to compute the gradient at point labelled z 5. z1z1 z2z2 z3z3 z4z4 z5z5 z6z6 z7z7 z8z8 z9z9 (a)

(b) Prewitt operator

(c) Sobel operator

For Prewitte operator, the gradient magnitude g is given by g ≈ |(z 7 + z 8 + z 9 ) - (z 1 + z 2 + z 3 )| + |(z 3 + z 6 + z 9 ) - (z 1 + z 4 + z 7 )| For Sobel operator, g is given by g ≈ |(z 7 + 2z 8 + z 9 ) - (z 1 + 2z 2 + z 3 )| + |(z 3 + 2z 6 + z 9 ) - (z 1 + 2z 4 + z 7 )|

Fig Optical image of contact lens (note defects on the boundary at 4 and 5 o’clock). (a) original image (b) result of Sobel gradient (a)(b)