Image Filtering Spatial filtering

Slides:



Advertisements
Similar presentations
Boundary Detection - Edges Boundaries of objects –Usually different materials/orientations, intensity changes.
Advertisements

Spatial Filtering (Chapter 3)
Edges and Contours– Chapter 7
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.
EDGE DETECTION.
Edge and Corner Detection Reading: Chapter 8 (skip 8.1) Goal: Identify sudden changes (discontinuities) in an image This is where most shape information.
Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.
EE663 Image Processing Edge Detection 1
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Lecture 4 Edge Detection
Filtering and Edge Detection
Canny Edge Detector.
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
Lecture 3: Edge detection, continued
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.
Segmentation (Section 10.2)
Lecture 2: Image filtering
Lecture 4: Edge Based Vision Dr Carole Twining Thursday 18th March 2:00pm – 2:50pm.
Announcements Since Thursday we’ve been discussing chapters 7 and 8. “matlab can be used off campus by logging into your wam account and bringing up an.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Introduction to Image Processing Grass Sky Tree ? ? Sharpening Spatial Filters.
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
Introduction to Image Processing
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
CSE 185 Introduction to Computer Vision Edges. Scale space Reading: Chapter 3 of S.
Sejong Univ. Edge Detection Introduction Simple Edge Detectors First Order Derivative based Edge Detectors Compass Gradient based Edge Detectors Second.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
Chapter 9: Image Segmentation
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.
Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,
Lecture 04 Edge Detection Lecture 04 Edge Detection Mata kuliah: T Computer Vision Tahun: 2010.
Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Instructor: Mircea Nicolescu Lecture 7
Lecture 8: Edges and Feature Detection
Digital Image Processing CSC331
Sliding Window Filters Longin Jan Latecki October 9, 2002.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Winter in Kraków photographed by Marcin Ryczek
Miguel Tavares Coimbra
Edge Detection slides taken and adapted from public websites:
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering Northern Arizona University.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Detection of discontinuity using
ECE 692 – Advanced Topics in Computer Vision
Edge Detection CS485/685 Computer Vision Dr. George Bebis.
Edge Detection CS 678 Spring 2018.
Corners and Interest Points
Fitting Curve Models to Edges
Edge Detection The purpose of Edge Detection is to find jumps in the brightness function (of an image) and mark them.
Jeremy Bolton, PhD Assistant Teaching Professor
Computer Vision Lecture 9: Edge Detection II
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Detection of Regions of Interest
Edge Detection Today’s reading
Lecture 2: Edge detection
Canny Edge Detector.
Feature Detection .
Enhancement.
Edge Detection Today’s reading
CS 565 Computer Vision Nazar Khan Lecture 9.
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Lecture 2: Edge detection
Winter in Kraków photographed by Marcin Ryczek
IT472 Digital Image Processing
IT472 Digital Image Processing
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Presentation transcript:

Image Filtering Spatial filtering Low-pass filtering mask (image blurring, smoothing) Median filter High-pass filter (sharpening, edge enhancement)

Image smoothing Mask: mm Convolution:

Image smoothing (Cont’d) Low-pass filtering: -- box-filter Operation: Sliding mask on the image g(x,y)=convolution(f, M)/Sum(M)

Image smoothing (Cont’d) EXAMPLE: PIXSUM(M) = 1 FILTER(f,M)[i,j]= SUM_u,v[TRAN(M; (i,j)] * f(u,v)

Image smoothing (Cont’d) Median filter: -- remove the salt-and-pepper noise, keep edges clear -- Sort the pixel values, choose the median value to replace the pixel in question -- E.g., Mask size: N=5 (1-D) 80 90 200 110 120 Sort: 80 90 110 120 200

Image smoothing (Cont’d) Median filter: -- 2D mask example: * * * * * * * * or * * * * *

Image sharpening Edge enhancement for blurred images (e.g., caused by camera focus, narrow bandwidth, etc.) -- Image pixel derivative 1st derivative: df/dx = f(x+1) – f(x) 2nd derivative: d2f/dx2 = [f(x+1) – f(x)] – [f(x) – f(x-1)] = f(x+1) + f(x-1) – 2f(x)

Image sharpening (cont’d) Original f(x) blurred df/dx d2f/dx2 f(x)- d2f/dx2 1-D 1st derivative 1-D 2nd derivative

Image sharpening (cont’d) 2-D Laplatian operator Sharpening: Laplatian Mask: 0 1 0 1 1 1 1 -4 1 1 -8 1 0 1 0 1 1 1

Image sharpening (cont’d) Edge enhancement Sharpening mask: 0 -1 0 (enhance edges in horizontal and -1 4 -1 vertical direction) 0 -1 0 -1 -1 -1 (enhance edges in horizontal, -1 8 -1 vertical and two diagonal directions) -1 -1 -1

Image sharpening (cont’d) Sharpening = original image + edges (or contours) Sharpening mask: 0 -1 0 (enhance edges in horizontal and -1 5 -1 vertical direction) 0 -1 0 -1 -1 -1 (enhance edges in horizontal, -1 9 -1 vertical and two diagonal directions) -1 -1 -1

Image sharpening (cont’d) Unsharp masking: fs(x,y) = f(x,y) – fb(x,y) g(x,y) = Af(x,y) + alpha fs(x,y)

Image sharpening (cont’d) Gradient operators  

Image sharpening (cont’d) Roberts operators Sobel operator Prewitt operator Robinson compass masks

Edge detection Edge detection by image gradient -- analysis of difference in local contrast Image  Gradient magnitude operator  Threshold  Edge image

Edge detection (cont’d) Property of the second derivative of edge (e.g., Laplatian) -- noise sensitive -- double edge produced -- zero crossing

Edge detection (cont’d) Laplatian of Gaussian (LOG) Image  Gaussian Smoothing for noise removal  Laplatian filter  Zero crossing  Edge image

Edge detection (cont’d) Simplified 2D LOG representation  The shape of the curve looks like “Mexican Hat”

Edge detection (cont’d) Scale Space – multiscaling -- In the zero-crossing algorithm, different scale  will generate different level of details of edges.

Scale Space Theory Scale Space – Definition -- For any N-dimentional signal f: RN, its scale-space representation L is defined by Where g denotes the Gaussian kernel The variance t of this kernel is referred to as the scale parameter

Scale Space Scale Space – Definition -- Equivalently, the scale-space family can be obtained as the solution to the (linear) diffusion equation Then, based on this representation, scale-space derivatives at any scale t are defined by

Scale Space a) The main idea of a scale-space representation is to generate a one-parameter family of derived signals in which the fine-scale information is successively suppressed. This figure shows a signal which has been successively smoothed by convolution with Gaussian kernels of increasing width. (b) Since new zero-crossings cannot be created by the diffusion equation in the one-dimensional case, the trajectories of zero-crossings in scale-space (here, zero-crossings of the second derivative) form paths across scales that are never closed from below.

Scale Space Different levels in the scale-space representation of a two-dimensional image at scale levels t = 0, 2, 8, 32, 128 and 512 together with grey-level blobs indicating local minima at each scale. (Courtesy of Tony Lindeberg)

Automatic Scale Selection Although the scale-space theory presented so far provides a well-founded framework for representing and detecting image structures at multiple scales, it does not address the problem of how to select locally appropriate scales for further analysis. Whereas the problem of finding ``the best scales'' for handling a given real-world data set may be regarded as intractable unless further information is available, there are many situations in which a mechanism is required for generating hypotheses about interesting scales. A general methodology for feature detection with automatic scale selection is based on the evolution over scales of (possibly non-linear) combinations of normalized derivatives defined by

Automatic Scale Selection  is a free parameter to be tuned to the task at hand. The basic idea proposed in the abovementioned sources is to apply the feature detector at all scales, and then select scale levels from the scales at which normalized measures of feature strength assume local maxima with respect to scale. Intuitively, this approach corresponds to the selection of the scales at which the operator response is as strongest. (Courtesy of Tony Lindeberg)

Automatic Scale Selection (Courtesy of Tony Lindeberg)

Scale Space References Yuille, A. L. Poggio, T. A. 1986, `Scaling theorems for zero-crossings', IEEE-PAMI 8, 15-25. Lindeberg, T. 1996, Feature detection with automatic scale selection, Technical Report ISRN KTH/NA/P-96/18-SE, KTH, Stockholm, Sweden. Witkin, A. P. 1983, Scale-space filtering, in `8th IJCAI', pp. 1019-1022.

Canny Edge Detector Filter image with derivative of Gaussian 2. Find magnitude and orientation of gradient 3. Non-maximum suppression: • Thin wide “ridges” down to single pixel width 4. Linking and thresholding (hysteresis): • Define two thresholds: low and high • Use the high threshold to start edge curves and the low threshold to continue them Reference: J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986. MATLAB: edge(image, ‘canny’);

Canny Edge Detector Noise Reduction (smoothing) Gaussian Filtering (for example σ = 1.4), 5×5 filter

Canny Edge Detector gradient 2. Gradient magnitude and direction For example: using Sobel operator Or for example: first derivative

Canny Edge Detector 3. Non-Maximum suppression (for thinning) Thick edges Disconnected edges Problem of Single Thresholding 3. Non-Maximum suppression (for thinning) Rounding the angle ’ to one of four directions 0◦, 45◦, 90◦, or 135◦. The “non-maximum suppression” step keeps only those pixels on an edge with the highest gradient magnitude. For example, if pixel (x, y) has the highest gradient magnitude of the three pixels examined, the pixel (x, y) is kept as edge; Otherwise, the (x, y) is discarded.

Canny Edge Detector 3. Non-Maximum suppression (continued) If no rounding the angle ’ to one of four directions, we have to use interpolated pixels for gradient check

Canny Edge Detector 4. Hysteresis Thresholding (Two stage thresholding) Problem: simple threshold may actually remove valid parts of a connected edge, leaving a disconnected final edge image. Hysteresis is one way of solving this problem - Instead of choosing a single threshold, two thresholds T-High and T-Low are used. Pixels with a gradient magnitude D < T-Low are discarded immediately. However, pixels with T-Low D < T-High are only kept if they form a continuous edge line with pixels with high gradient magnitude (i.e., above T-High).

Canny Edge Detector 4. Hysteresis Thresholding (continued) For example:

Canny Edge Detector 4. Hysteresis Thresholding (continued) Source: courtesy of L. Fei Fei

Canny Edge Detector Example of all processing stages