Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructor: S. Narasimhan

Similar presentations


Presentation on theme: "Instructor: S. Narasimhan"— Presentation transcript:

1 Instructor: S. Narasimhan
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm

2 Aliasing - Really bad in video

3 Text Aliasing

4 Edge Detection Lecture #7

5 Edge Detection Convert a 2D image into a set of curves
Extracts salient features of the scene More compact than pixels

6 Origin of Edges Edges are caused by a variety of factors
surface normal discontinuity depth discontinuity surface color discontinuity illumination discontinuity Edges are caused by a variety of factors

7 How can you tell that a pixel is on an edge?

8 Edge Types Step Edges Roof Edge Line Edges

9 Real Edges Noisy and Discrete! We want an Edge Operator that produces:
Edge Magnitude Edge Orientation High Detection Rate and Good Localization

10 Gradient Gradient equation:
Represents direction of most rapid change in intensity Gradient direction: The edge strength is given by the gradient magnitude

11 Theory of Edge Detection
Ideal edge Unit step function: Image intensity (brightness):

12 Theory of Edge Detection
Image intensity (brightness): Partial derivatives (gradients): Squared gradient: Edge Magnitude: Edge Orientation: Rotationally symmetric, non-linear operator (normal of the edge)

13 Theory of Edge Detection
Image intensity (brightness): Partial derivatives (gradients): Laplacian: Rotationally symmetric, linear operator zero-crossing

14 Discrete Edge Operators
How can we differentiate a discrete image? Finite difference approximations: Convolution masks :

15 Discrete Edge Operators
Second order partial derivatives: Laplacian : Convolution masks : or (more accurate)

16 The Sobel Operators Better approximations of the gradients exist
The Sobel operators below are commonly used -1 1 -2 2 1 2 -1 -2

17 Comparing Edge Operators
Good Localization Noise Sensitive Poor Detection Gradient: Roberts (2 x 2): 1 -1 1 -1 Sobel (3 x 3): -1 1 1 -1 Sobel (5 x 5): -1 -2 2 1 -3 3 -5 5 1 2 3 5 -2 -3 -5 -1 Poor Localization Less Noise Sensitive Good Detection

18 Effects of Noise Where is the edge??
Consider a single row or column of the image Plotting intensity as a function of position gives a signal Where is the edge??

19 Solution: Smooth First
Where is the edge? Look for peaks in

20 Derivative Theorem of Convolution
…saves us one operation.

21 Laplacian of Gaussian (LoG)
Laplacian of Gaussian operator Where is the edge? Zero-crossings of bottom graph !

22 2D Gaussian Edge Operators
Derivative of Gaussian (DoG) Laplacian of Gaussian Mexican Hat (Sombrero) is the Laplacian operator:

23 Canny Edge Operator Smooth image I with 2D Gaussian:
Find local edge normal directions for each pixel Compute edge magnitudes Locate edges by finding zero-crossings along the edge normal directions (non-maximum suppression)

24 Non-maximum Suppression
Check if pixel is local maximum along gradient direction requires checking interpolated pixels p and r

25 The Canny Edge Detector
original image (Lena)

26 The Canny Edge Detector
magnitude of the gradient

27 The Canny Edge Detector
After non-maximum suppression

28 Canny Edge Operator The choice of depends on desired behavior original
Canny with Canny with The choice of depends on desired behavior large detects large scale edges small detects fine features

29 Difference of Gaussians (DoG)
Laplacian of Gaussian can be approximated by the difference between two different Gaussians

30 DoG Edge Detection (a) (b) (b)-(a)

31 Gaussian – Image filter
Fourier Transform Gaussian delta function

32 Unsharp Masking = + a =

33 MATLAB demo g = fspecial('gaussian',15,2); imagesc(g) surfl(g)
gclown = conv2(clown,g,'same'); imagesc(conv2(clown,[-1 1],'same')); imagesc(conv2(gclown,[-1 1],'same')); dx = conv2(g,[-1 1],'same'); imagesc(conv2(clown,dx,'same'); lg = fspecial('log',15,2); lclown = conv2(clown,lg,'same'); imagesc(lclown) imagesc(clown + .2*lclown)

34 Edge Thresholding Standard Thresholding:
Can only select “strong” edges. Does not guarantee “continuity”. Hysteresis based Thresholding (use two thresholds) Example: For “maybe” edges, decide on the edge if neighboring pixel is a strong edge.

35 Edge Relaxation a f e g b c h (1) (0)
Parallel – Iterative method to adjust edge values on the basis of neighboring edges. a f No Edge e g b Edge to be updated Edge c h (1) Vertex Types: (0)

36 Edge Relaxation Vertex Types (continued): (2) (3)

37 Edge Relaxation Algorithm
Action Table: Decrement Increment Leave as is 0 - 0 1 - 1 0 - 1 2 - 2 Edge Type 0 - 2 1 - 2 2 - 3 0 - 3 1 - 3 3 - 3 Algorithm: Step 0: Compute Initial Confidence of each edge e: Step 1: Initialize Step 2: Compute Edge Type of each edge e Step 3: Modify confidence based on and Edge Type Step 4: Test to see if all have CONVERGED to either 1 or 0. Else go to Step 2.

38 Edge Relaxation

39 Next Class Image Resampling Multi-resolution Image Pyramids


Download ppt "Instructor: S. Narasimhan"

Similar presentations


Ads by Google