Introduction to Image Processing

Slides:



Advertisements
Similar presentations
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Filtering.
Advertisements

Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
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.
Spatial Filtering.
Chapter 3 Image Enhancement in the Spatial Domain.
Lecture 6 Sharpening Filters
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Digital Image Processing
Lecture 4 Edge Detection
6/9/2015Digital Image Processing1. 2 Example Histogram.
Announcements Mailing list: –you should have received messages Project 1 out today (due in two weeks)
EE663 Image Processing Edge Detection 2 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Edges and Scale Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski – From Sandlot ScienceSandlot.
Digital Image Processing
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
Introduction to Computer Vision CS / ECE 181B Thursday, April 22, 2004  Edge detection (HO #5)  HW#3 due, next week  No office hours today.
2-D, 2nd Order Derivatives for Image Enhancement
Lecture 2: Image filtering
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
Lecture 2. Intensity Transformation and Spatial Filtering
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
Spatial Filtering: Basics
Digital Image Processing
Introduction to Image Processing Grass Sky Tree ? ? Sharpening Spatial Filters.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski, Ch 4.1.2, From Sandlot.
SHINTA P. Juli What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program.
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 +
Chapter 10, Part I.  Segmentation subdivides an image into its constituent regions or objects.  Image segmentation methods are generally based on two.
Spatial Filtering.
EE 4780 Edge Detection.
Many slides from Steve Seitz and Larry Zitnick
Edge Detection and Geometric Primitive Extraction Jinxiang Chai.
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.
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.
Announcements Project 0 due tomorrow night. Edge Detection Today’s readings Cipolla and Gee (handout) –supplemental: Forsyth, chapter 9Forsyth For Friday.
Lecture 04 Edge Detection Lecture 04 Edge Detection Mata kuliah: T Computer Vision Tahun: 2010.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Instructor: Mircea Nicolescu Lecture 7
Sharpening Spatial Filters ( high pass)  Previously we have looked at smoothing filters which remove fine detail  Sharpening spatial filters seek to.
Lecture 8: Edges and Feature Detection
Digital Image Processing Week V Thurdsak LEAUHATONG.
Digital Image Processing CSC331
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.
Miguel Tavares Coimbra
Edge Detection slides taken and adapted from public websites:
Digital Image Processing CSC331
ECE 692 – Advanced Topics in Computer Vision
Lecture 2: Edge detection
Digital Image Processing
Jeremy Bolton, PhD Assistant Teaching Professor
Dr. Chang Shu COMP 4900C Winter 2008
Lecture 10 Image sharpening.
Edge Detection Today’s reading
Digital Image Processing
Edge Detection Today’s reading
Lecture 2: Edge detection
Edge Detection Today’s reading
Edge Detection Today’s readings Cipolla and Gee Watt,
Lecture 2: Edge detection
IT472 Digital Image Processing
IT472 Digital Image Processing
Presentation transcript:

Introduction to Image Processing Edge Detection and Sharpening Grass Sky Tree ?

Edge Detection and Sharpening The Basic Theory Properties of 1st and 2nd Derivatives Edge Detection gradient operators based on 1st derivatives Laplacian as the 2nd derivative operator Edge Sharpening composite Laplacian unsharp masking

Origin of Edges Edges are caused by a variety of factors depth discontinuity surface color discontinuity illumination discontinuity surface normal discontinuity Edges are caused by a variety of factors Source: Steve Seitz

Edge Detection Edge is marked by points at which image properties change sharply To detect changes in a digital 2D image intensity function, f(x, y), a continuous image can be reconstructed, followed by the differentiation operator OR We take the discrete derivative (finite difference) shown below:

The Basic Theory An intensity jump (edge) generates a peak in the 1st derivative, and the peak generates a zero-crossing in the 2nd derivative (when the first derivative is at a maximum, the second derivative is zero) Gradient methods detect edges by looking for the maximum and minimum in the first derivative of the image Laplacian methods search for zero crossings in the second derivative of the image to find edges

Alternative 1st and 2nd Derivatives Sharpening filters are based on computing spatial derivatives of an image. The first-order derivative of a one-dimensional function f(x) is The second-order derivative of a one-dimensional function f(x) is

Properties of the 1st and 2nd Derivatives

Profile for 1st Derivative 5 4 3 2 1 6 7 -1 6 -6 1 2 -2 7 8

Profile for 2nd Derivative 5 4 3 2 1 6 7 -1 1 6 -12 -4 7 -7 9

Computing 1st Derivative 0 1 2 x -1 1 -2 2 Derivative of function I at 1: I’(1) = (I(2) - I(0))/2 Rearranging it we have: 2*I’(1) = -1*I(0) + 0*I(1) + 1*I(2) Equivalent to local filter operation using -1 -2 1 2 1 2 -1 -2 The standard definition of the Sobel operator omits the 1/8 term doesn’t make a difference for edge detection the 1/8 term is needed to get the right gradient value, however -1 1

1st Derivative Gradient Operators Roberts cross-gradient operators Prewitt operators Sobel operators

1st Derivative Gradient Operators Prewitt masks for detecting diagonal edges Sobel masks for

Properties of Image Gradient First-order derivatives: The gradient of an image Gxy at location (x,y) is defined as the vector: The gradient points in the direction of most rapid increase in intensity The edge strength is given by the gradient magnituge O OR approx. The gradient direction is given by: How does this relate to the edge direction?

Gradients in 2D For an image function, I(x,y), the gradient direction, (x,y), gives the direction of steepest image gradient: (x,y)  atan(Gy/Gx) This gives the direction of a line perpendicular to the edge Gxy Gy  Gx

Sobel Operator Original Sobel

Gradient Operators: Examples

Gradient Operators: Examples

Gradient Operators: Examples

Important Observation Note that Prewitt operator is a box filter convolved with a derivative operator Also note a Sobel operator is a [1 2 1] filter convolved with a derivative operator

Computing 2nd Derivatives 0 1 2 x The theory can be carried over to 2D as long as there is a way to approximate the derivative of a 2D image I’’(1) = (I’(1.5) - I’(0.5))/1 I’(0.5) = (I(1) - I(0))/1 and I’(1.5) = (I(2) - I(1))/1 I’’(1) = 1*I(0) – 2*I(1) + 1*I(2) Equivalent to local filter operation with 1 -2

Laplacian Operator Development of the Laplacian method The two dimensional Laplacian operator for continuous functions: The Laplacian is a linear operator.

Laplacian Operator

Laplacian Operator Applying the Laplacian to an image we get a new image that highlights edges and other discontinuities Original Image Laplacian Filtered Image Laplacian Filtered Image Scaled for Display 23

But That Is Not Very Enhanced! Laplacian Filtered Image Scaled for Display The result of a Laplacian filtering is not an enhanced image We have to do more work in order to get our final image Subtract the Laplacian result from the original image to generate our final sharpened enhanced image 24

Laplacian Image Enhancement - = Original Image Laplacian Filtered Image Sharpened Image In the final sharpened image edges and fine detail are much more obvious 25

Simplified Image Enhancement The entire enhancement can be combined into a single filtering operation 26

Composite Laplacian Mask This gives us a new filter which does the whole job for us in one step -1 5 27

Composite Laplacian Mask

Unsharp Masking & Highboost Filtering to generate the mask: Subtract a blurred version of the image from itself add the mask to the original Highboost: k>1 gmask(x,y) = f(x,y) - f(x,y) g(x,y) = f(x,y) + k*gmask(x,y)

1st & 2nd Derivatives Comparisons Observations: 1st order derivatives generally produce thicker edges 2nd order derivatives have a stronger response to fine detail e.g. thin lines 2nd order derivatives produce a double response at step changes in grey level The 2nd derivative is more useful for image enhancement than the 1st derivative Stronger response to fine detail Simpler implementation Because these kernels approximate a second derivative measurement on the image, they are very sensitive to noise. To counter this, the image is often Gaussian smoothed before applying the Laplacian filter 30

Acknowlegements Slides are modified based on the original slide set from Dr Li Bai, The University of Nottingham, Jubilee Campus plus the following sources: Digital Image Processing, by Gonzalez and Woods http://www.comp.dit.ie/bmacnamee/materials/dip/lectures/ImageProcessing6-SpatialFiltering2.ppt