Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.

Slides:



Advertisements
Similar presentations
Spatial Filtering (Chapter 3)
Advertisements

Topic 6 - Image Filtering - I DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Spatial Filtering.
Regional Processing Convolutional filters. Smoothing  Convolution can be used to achieve a variety of effects depending on the kernel.  Smoothing, or.
Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Sliding Window Filters and Edge Detection Longin Jan Latecki Computer Graphics and Image Processing CIS 601 – Fall 2004.
CS 4487/9587 Algorithms for Image Analysis
EDGE DETECTION.
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Multimedia communications EG 371Dr Matt Roach Multimedia Communications EG 371 and EE 348 Dr Matt Roach Lecture 6 Image processing (filters)
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
Lecture 4 Edge Detection
Lecture 4 Linear Filters and Convolution
EE663 Image Processing Edge Detection 2 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering
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)
Chapter 10 Image Segmentation.
The Segmentation Problem
Edge Detection Hao Huy Tran Computer Graphics and Image Processing CIS 581 – Fall 2002 Professor: Dr. Longin Jan Latecki.
Chapter 10: Image Segmentation
Digital Image Processing
University of Kurdistan Digital Image Processing (DIP) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Digital Image Processing Lecture 18: Segmentation: Thresholding & Region-Based Prof. Charlene Tsai.
SHINTA P. Juli What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program.
G52IVG, School of Computer Science, University of Nottingham 1 Edge Detection and Image Segmentation.
Image Processing Segmentation 1.Process of partitioning a digital image into multiple segments (sets of pixels). 2. Clustering pixels into salient image.
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.
Digital Image Processing Lecture 10: Image Restoration
Spatial Filtering.
CS654: Digital Image Analysis Lecture 24: Introduction to Image Segmentation: Edge Detection Slide credits: Derek Hoiem, Lana Lazebnik, Steve Seitz, David.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
EE 4780 Edge Detection.
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
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.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering March 9, 2004 Prof. Charlene Tsai.
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.
Computer Vision Image Features Instructor: Dr. Sherif Sami Lecture 4.
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Digital Image Processing
Digital Image Processing CSC331
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.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
EDGE DETECTION Dr. Amnach Khawne. Basic concept An edge in an image is defined as a position where a significant change in gray-level values occur. An.
Environmental Remote Sensing GEOG 2021
Miguel Tavares Coimbra
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.
Image Segmentation – Detection of Discontinuities
Digital Image Processing Lecture 10: Image Restoration
Detection of discontinuity using
Image Segmentation – Edge Detection
Computer Vision Lecture 9: Edge Detection II
ECE 692 – Advanced Topics in Computer Vision
Digital Image Processing
Image Segmentation Image analysis: First step:
Digital Image Processing
Feature Detection .
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Presentation transcript:

Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai

Digital Image ProcessingLecture 16 2 What is segmentation?  Dividing an image into its constituent regions or objects.  Heavily rely on one of two properties of intensity values:  Discontinuity  Similarity  Dividing an image into its constituent regions or objects.  Heavily rely on one of two properties of intensity values:  Discontinuity  Similarity Partition based on abrupt changes in intensity, e.g. edges in an image Partition based on intensity similarity, e.g. thresholding We’ll discuss both approaches. Starting with the first one.

Digital Image ProcessingLecture 16 3 Introduction  We want to extract 2 basic types of gray-level discontinuity:  Lines  Edges  What have we learnt in previous lectures to help us in this process?  CONVOLUTION!  We want to extract 2 basic types of gray-level discontinuity:  Lines  Edges  What have we learnt in previous lectures to help us in this process?  CONVOLUTION! Grayscale image Mask coefficient

Digital Image ProcessingLecture 16 4 Line Detection  Masks for lines of different directions:  Respond more strongly to lines of one pixel thick of the designated direction.  High or low pass filters?  Masks for lines of different directions:  Respond more strongly to lines of one pixel thick of the designated direction.  High or low pass filters?

Digital Image ProcessingLecture 16 5 (con’d)  If interested in lines of any directions, run all 4 masks and select the highest response  If interested only in lines of a specific direction (e.g. vertical), use only the mask associated with that direction.  Threshold the output.  The strongest responses for lines one pixel thick, and correspond closest to the direction defined by the mask.  If interested in lines of any directions, run all 4 masks and select the highest response  If interested only in lines of a specific direction (e.g. vertical), use only the mask associated with that direction.  Threshold the output.  The strongest responses for lines one pixel thick, and correspond closest to the direction defined by the mask.

Digital Image ProcessingLecture 16 6

Digital Image ProcessingLecture 16 7 Edge Detection  Far more practical than line detection.  We’ll discuss approaches based on  1 st -order digital derivative  2 nd -order digital derivative  Far more practical than line detection.  We’ll discuss approaches based on  1 st -order digital derivative  2 nd -order digital derivative

Digital Image ProcessingLecture 16 8 What is an edge?  A set of connected pixels that lie on the boundary between two regions.  Local concept  A set of connected pixels that lie on the boundary between two regions.  Local concept Ideal/step edgeRamp-like (in real life) edge Any point could be an edge point Edge point

Digital Image ProcessingLecture st Derivative  Positive at the points of transition into and out of the ramp, moving from left to right along the profile  Constant for points in the ramp  Zero in areas of constant gray Level  Magnitude for presence of an edge at a point in an image (i.e. if a point is on a ramp)  Positive at the points of transition into and out of the ramp, moving from left to right along the profile  Constant for points in the ramp  Zero in areas of constant gray Level  Magnitude for presence of an edge at a point in an image (i.e. if a point is on a ramp)

Digital Image ProcessingLecture nd Derivative  Positive at the transition associated with the dark side of the edge  Negative at the transition associated with the bright side of the edge  Zero elsewhere  Producing 2 values for every edge in an image.  Center of a thick edge is located at the zero crossing  Positive at the transition associated with the dark side of the edge  Negative at the transition associated with the bright side of the edge  Zero elsewhere  Producing 2 values for every edge in an image.  Center of a thick edge is located at the zero crossing Zero crossing

Digital Image ProcessingLecture Effect of Noise  Corrupted by Random Gaussian noise of mean 0 and standard deviation of  (a) 0  (b) 0.1  (c) 1.0  Conclusion???  Sensitivity of derivative to noise  Corrupted by Random Gaussian noise of mean 0 and standard deviation of  (a) 0  (b) 0.1  (c) 1.0  Conclusion???  Sensitivity of derivative to noise (a) (b) (c) grayscale 1 st derivative 2 nd derivative

Digital Image ProcessingLecture Some Terminology  An edge element is associated with 2 components:  magnitude of the gradient, and  and edge direction, rotated with respect to the gradient direction by -90 deg.  An edge element is associated with 2 components:  magnitude of the gradient, and  and edge direction, rotated with respect to the gradient direction by -90 deg.

Digital Image ProcessingLecture st Derivative (Gradient)  The gradient of an image f(x,y) at location (x,y) is defined as

Digital Image ProcessingLecture Finite Gradient - Approximation  Central differences (not usually used because they neglect the impact of the pixel (x,y) itself)  h is a small integer, usually 1.  h should be chosen small enough to provide a good approximation to the derivative, but large enough to neglect unimportant changes in the image function.  Central differences (not usually used because they neglect the impact of the pixel (x,y) itself)  h is a small integer, usually 1.  h should be chosen small enough to provide a good approximation to the derivative, but large enough to neglect unimportant changes in the image function.

Digital Image ProcessingLecture Convolution of Gradient Operators Better noise-suppression

Digital Image ProcessingLecture Illustration (errors in Gonzalez)

Digital Image ProcessingLecture nd Derivative: Laplacian Operator  Review: The Laplace operator ( ) is a very popular operator approximating the second derivative which gives the gradient magnitude only.  We discussed this operator in lecture 5 (spatial filtering)  It is isotropic  Review: The Laplace operator ( ) is a very popular operator approximating the second derivative which gives the gradient magnitude only.  We discussed this operator in lecture 5 (spatial filtering)  It is isotropic 4-neighborhood8-neighborhood

Digital Image ProcessingLecture Issues with Laplacian  Problems:  Unacceptably sensitive to noise  Magnitude of Laplacian results in double edges  Does not provide gradient  Fixes:  Smoothing  Using zero-crossing for edge location  Not for gradient direction, but for establishing whether a pixel is on the dark or light side of and edge  Problems:  Unacceptably sensitive to noise  Magnitude of Laplacian results in double edges  Does not provide gradient  Fixes:  Smoothing  Using zero-crossing for edge location  Not for gradient direction, but for establishing whether a pixel is on the dark or light side of and edge

Digital Image ProcessingLecture Smoothing for Laplacian  Our goal is to get a second derivative of a smoothed 2D function  We have seen that the Laplacian operator gives the second derivative, and is non-directional (isotropic).  Consider then the Laplacian of an image smoothed by a Gaussian.  This operator is abbreviated as LoG, from Laplacian of Gaussian:  The order of differentiation and convolution can be interchanged due to linearity of the operations:  Our goal is to get a second derivative of a smoothed 2D function  We have seen that the Laplacian operator gives the second derivative, and is non-directional (isotropic).  Consider then the Laplacian of an image smoothed by a Gaussian.  This operator is abbreviated as LoG, from Laplacian of Gaussian:  The order of differentiation and convolution can be interchanged due to linearity of the operations:

Digital Image ProcessingLecture Laplacian of Gaussian (LoG)  Let’s make the substitution where r measures distance from the origin.  Now we have a 1D Gaussian to deal with  Laplacian of Gaussian becomes  Let’s make the substitution where r measures distance from the origin.  Now we have a 1D Gaussian to deal with  Laplacian of Gaussian becomes Normalize the sum of the mask elements to 0

Digital Image ProcessingLecture Laplacian of Gaussian (LoG)  Because of its shape, the LoG operator is commonly called a Mexican hat.

Digital Image ProcessingLecture Laplacian of Gaussian (LoG)  Gaussian smoothing effectively suppresses the influence of the pixels that are up to a distance from the current pixel; then the Laplace operator is an efficient and stable measure of changes in the image.  The location in the LoG image where the zero level is crossed corresponds to the position of the edges.  The advantage of this approach compared to classical edge operators of small size is that a larger area surrounding the current pixel is taken into account; the influence of more distant points decreases according to  Gaussian smoothing effectively suppresses the influence of the pixels that are up to a distance from the current pixel; then the Laplace operator is an efficient and stable measure of changes in the image.  The location in the LoG image where the zero level is crossed corresponds to the position of the edges.  The advantage of this approach compared to classical edge operators of small size is that a larger area surrounding the current pixel is taken into account; the influence of more distant points decreases according to

Digital Image ProcessingLecture Remarks  LoG kernel become large for larger (e.g. 40x40 for )  Fortunately, there is a separable decomposition of the LoG operator that can speed up computation considerable.  The practical implication of Gaussian smoothing is that edges are found reliably.  If only globally significant edges are required, the standard deviation of the Gaussian smoothing filter may be increased, having the effect of suppressing less significant evidence.  Note that since the LoG is an isotropic filter, it is not possible to directly extract edge orientation information from the LoG output, unlike Roberts and Sobel operators.  LoG kernel become large for larger (e.g. 40x40 for )  Fortunately, there is a separable decomposition of the LoG operator that can speed up computation considerable.  The practical implication of Gaussian smoothing is that edges are found reliably.  If only globally significant edges are required, the standard deviation of the Gaussian smoothing filter may be increased, having the effect of suppressing less significant evidence.  Note that since the LoG is an isotropic filter, it is not possible to directly extract edge orientation information from the LoG output, unlike Roberts and Sobel operators.

Digital Image ProcessingLecture Illustration  One simple method for approximating zero-crossing:  Setting all + values to white, - values to black.  Scanning the thresholded image and noting the transition between black and white.  One simple method for approximating zero-crossing:  Setting all + values to white, - values to black.  Scanning the thresholded image and noting the transition between black and white. originalLoGthresholdedzero crossing Closed loops (spaghetti effect)

Digital Image ProcessingLecture LoG variant - DoG  It is possible to approximate the LoG filter with a filter that is just the difference of two differently sized Gaussians. Such a filter is known as a DoG filter (short for `Difference of Gaussians').  Similar to Laplace of Gaussian, the image is first smoothed by convolution with Gaussian kernel of certain width  With a different width, a second smoothed image can be obtained:  It is possible to approximate the LoG filter with a filter that is just the difference of two differently sized Gaussians. Such a filter is known as a DoG filter (short for `Difference of Gaussians').  Similar to Laplace of Gaussian, the image is first smoothed by convolution with Gaussian kernel of certain width  With a different width, a second smoothed image can be obtained:

Digital Image ProcessingLecture DoG  The difference of these two Gaussian smoothed images, called difference of Gaussian (DoG), can be used to detect edges in the image.  The DoG as an operator or convolution kernel is defined as  The difference of these two Gaussian smoothed images, called difference of Gaussian (DoG), can be used to detect edges in the image.  The DoG as an operator or convolution kernel is defined as

Digital Image ProcessingLecture DoG  The discrete convolution kernel for DoG can be obtained by approximating the continuous expression of DoG given above. Again, it is necessary for the sum or average of all elements of the kernel matrix to be zero.

Digital Image ProcessingLecture Summary  Line detection  Edge detection based on  First derivative  Provides gradient information  2 nd derivative using zero-crossing  Indicates dark/bright side of an edge  Line detection  Edge detection based on  First derivative  Provides gradient information  2 nd derivative using zero-crossing  Indicates dark/bright side of an edge