Computer vision
Download
1 / 39

computer vision - PowerPoint PPT Presentation


  • 199 Views
  • Updated On :

Computer Vision. Spring 2006 15-385,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm. Aliasing - Really bad in video. Text Aliasing. Edge Detection Lecture #7. Edge Detection. Convert a 2D image into a set of curves Extracts salient features of the scene

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'computer vision' - ostinmannual


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Computer vision

Computer Vision

Spring 2006 15-385,-685

Instructor: S. Narasimhan

Wean 5403

T-R 3:00pm – 4:20pm




Edge detection lecture 7

Edge Detection

Lecture #7


Edge detection
Edge Detection

  • Convert a 2D image into a set of curves

    • Extracts salient features of the scene

    • More compact than pixels


Origin of edges
Origin of Edges

  • Edges are caused by a variety of factors

surface normal discontinuity

depth discontinuity

surface color discontinuity

illumination discontinuity



Edge types
Edge Types

Step Edges

Line Edges

Roof Edge


Real edges
Real Edges

  • Edge Magnitude

  • Edge Orientation

  • High Detection Rate and Good Localization

Noisy and Discrete!

We want an Edge Operator that produces:


Gradient
Gradient

  • Gradient equation:

  • Represents direction of most rapid change in intensity

  • Gradient direction:

  • The edge strength is given by the gradient magnitude


Theory of edge detection

Ideal edge

Unit step function:

Image intensity (brightness):

Theory of Edge Detection


Theory of edge detection1

  • Squared gradient:

Edge Magnitude:

(normal of the edge)

Edge Orientation:

Rotationally symmetric, non-linear operator

Theory of Edge Detection

  • Image intensity (brightness):


Theory of edge detection2

  • Laplacian:

Rotationally symmetric, linear operator

zero-crossing

Theory of Edge Detection

  • Image intensity (brightness):


Discrete edge operators
Discrete Edge Operators

  • How can we differentiate a discrete image?

Finite difference approximations:

Convolution masks :


Discrete edge operators1

  • Laplacian :

Convolution masks :

or

Discrete Edge Operators

(more accurate)


The sobel operators
The Sobel Operators

  • Better approximations of the gradients exist

    • The Sobel operators below are commonly used


Comparing edge operators
Comparing Edge Operators

Good Localization

Noise Sensitive

Poor Detection

Gradient:

Roberts (2 x 2):

Sobel (3 x 3):

Sobel (5 x 5):

Poor Localization

Less Noise Sensitive

Good Detection


Effects of noise

Where is the edge??

Effects of Noise

  • Consider a single row or column of the image

    • Plotting intensity as a function of position gives a signal


Solution smooth first

Look for peaks in

Solution: Smooth First

Where is the edge?


Derivative theorem of convolution
Derivative Theorem of Convolution

…saves us one operation.


Laplacian of gaussian log
Laplacian of Gaussian (LoG)

Laplacian of Gaussian

Laplacian of Gaussian operator

Where is the edge?

Zero-crossings of bottom graph !


2d gaussian edge operators
2D Gaussian Edge Operators

Gaussian

Derivative of Gaussian (DoG)

Laplacian of Gaussian

Mexican Hat (Sombrero)

  • is the Laplacian operator:


Canny edge operator
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)


Non maximum suppression
Non-maximum Suppression

  • Check if pixel is local maximum along gradient direction

    • requires checking interpolated pixels p and r


The canny edge detector
The Canny Edge Detector

original image (Lena)


The Canny Edge Detector

magnitude of the gradient


The canny edge detector1
The Canny Edge Detector

After non-maximum suppression


Canny edge operator1
Canny Edge Operator

original

Canny with

Canny with

  • The choice of depends on desired behavior

    • large detects large scale edges

    • small detects fine features


Difference of gaussians dog
Difference of Gaussians (DoG)

  • Laplacian of Gaussian can be approximated by the

    difference between two different Gaussians


Dog edge detection

(a)

(b)

DoG Edge Detection

(b)-(a)


Gaussian image filter
Gaussian – Image filter

Fourier Transform

Gaussian

delta function


Unsharp masking
Unsharp Masking

=

+ a

=


Matlab demo
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)


Edge thresholding
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.


Edge relaxation
Edge Relaxation

  • 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)


Edge relaxation1
Edge Relaxation

  • Vertex Types (continued):

(2)

(3)


Edge relaxation algorithm
Edge Relaxation Algorithm

Leave as is

Increment

  • Action Table:

Decrement

0 - 1

0 - 0

1 - 1

2 - 2

0 - 2

1 - 2

Edge Type

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.



Next class
Next Class

  • Image Resampling

  • Multi-resolution Image Pyramids


ad