edge

© All Rights Reserved

1 views

edge

© All Rights Reserved

- Artificial Intelligence M1
- Canny's Filter for Edge Detection: a Java Implementation
- Evermotion Archexteriors Vol 4 PDF
- aipresentation2-171219131633
- Sutton-Barto.pdf
- Segmentation and Classification of Skin Lesions Based on Texture Features
- Preliminary Exercise
- AIPS
- Fourth International Conference on Soft Computing, Artificial Intelligence and Applications (SCAI-2015)
- Cover Letter Google
- 0020 HDRI Max English
- Dr.hussein-353_353
- Independence Day Rubric
- CourseAssignment2014-15 - Sem1+2
- Video Stabilization
- Final Presentation MIS
- Goal Evaluation of Segmentation Algorithms for Traffic Sign Recognition
- ai
- Application of CART and IBL for Image Retrieval
- blob detection

You are on page 1of 52

Fall 2012

Univ. of Central Florida

Edge Detection

Lecture-3

Example

An Application

What is an object?

How can we find it?

Edge Detection in Images

What is an Edge?

Edge models

Step

Step Ramp

Roof

Ramp

Spike

Roof Spike

Detecting Discontinuities

Image derivatives

f f x f x f f x n 1 f x

lim

x 0

x x

Convolve image with

Forward difference

derivative filters

[1 -1]

Central difference [-1 0 1]

Alper Yilmaz, Mubarak Shah Fall 2012UCF

Derivative in Two-Dimensions

Definition

f x , y f x , y f x , y f x , y f x , y f x , y

lim lim

x 0

y 0

f x , y

Approximation f x , y f x , ym f x , y f x n , y m 1 f x n , y m

n 1 m n

x x y x

f x 1 1 1

fy

Convolution kernels 1

Alper Yilmaz, Mubarak Shah Fall 2012UCF

Image Derivatives

1

Image I I x I * 1 1 Iy I *

1

Derivatives and Noise

obvious reason: image Neighboring pixels look

noise results in pixels alike

that look very different Pixel along an edge look

from their neighbors alike

Image smoothing should

The larger the noise is the help

stronger the response Force pixels different to

their neighbors (possibly

noise) to look like

Alper Yilmaz, neighbors

Mubarak Shah Fall 2012UCF

Derivatives and Noise

Increasing noise

Image Smoothing

Relatively few reflectance changes

Generally expect noise to be independent

from pixel to pixel

Smoothing suppresses noise

Gaussian Smoothing

(x2 y2

g ( x, y) e 2 2

Scale of Gaussian

As increases, more pixels are involved in average

As increases, image is more blurred

As increases, noise is more effectively

Alper Yilmaz, Mubaraksuppressed

Shah Fall 2012UCF

Gaussian Smoothing (Examples)

Edge Detectors

Gradient operators

Prewit

Sobel

Laplacian of Gaussian (Marr-Hildreth)

Gradient of Gaussian (Canny)

Prewitt and Sobel Edge Detector

Compute derivatives

In x and y directions

Find gradient magnitude

Threshold gradient magnitude

Prewitt Edge Detector

smoothing in x filtering in x

1 1

1 1

1 1

1 1 and 1 0 1

1 0 1

1 0 1

smoothing in y filtering in y

1 1 1 1 1 1 1

1 1 0 0

1 1 and 0

1 1 1

Alper Yilmaz, Mubarak Shah Fall 2012UCF

Sobel Edge Detector

1 0 1

2 0 2 d

I

1 0 1 dx

*

Image I d

2

d

2 Threshold Edges

I I

dx dy

1 1 d

* 2 I

0 0 0

dy

1 2 1

Sobel Edge Detector

d

I

dx

d

I

dy

Sobel Edge Detector

2

d

2

d

I I

dx dy

Threshold 100

Marr Hildreth Edge Detector

Smooth image by Gaussian filter S

Apply Laplacian to S

Used in mechanics, electromagnetics, wave theory, quantum

mechanics and Laplace equation

Find zero crossings

Scan along each row, record an edge point at the location of

zero-crossing.

Repeat above step along each column

Marr Hildreth Edge Detector

Gaussian smoothing

x2 y2

smoothed image image

Gaussian filter g

1

e

2 2

S g * I 2

Find Laplacian

second order second order

is used for gradient (derivative)

derivative in x derivative in y

2 2 is used for Laplacian

2 S S S

x 2 y 2

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Marr Hildreth Edge Detector

2 S 2 g * I 2 g * I

x2 y2

1 x2 y2

2 g 2 e 2 2

2 3

2

Gaussian

Standard

deviation

x

-3 -2 -1 0 1 2 3

g(x)

2-D Gaussian

2-D Gaussian

LoG Filter

x2 y2

1 x2 y2

2G 2 e 2 2

2 3

2

Y

0.0008 0.0066 0.0215 0.031 0.0215 0.0066 0.0008

0.0066 0.0438 0.0982 0.108 0.0982 0.0438 0.0066

0.0215 0.0982 0 -0.242 0 0.0982 0.0215

0.031 0.108 -0.242 -0.7979 -0.242 0.108 0.031 X

0.0215 0.0982 0 -0.242 0 0.0982 0.0215

0.0066 0.0438 0.0982 0.108 0.0982 0.0438 0.0066

0.0008 0.0066 0.0215 0.031 0.0215 0.0066 0.0008

Finding Zero Crossings

Four cases of zero-crossings :

{+,-}

{+,0,-}

{-,+}

{-,0,+}

Slope of zero-crossing {a, -b} is |a+b|.

To mark an edge

compute slope of zero-crossing

Apply a threshold to slope

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

On the Separability of LoG

Two-dimensional Gaussian can be separated into

2 one-dimensional Gaussians

h ( x, y ) I ( x, y ) * g ( x, y ) n2 multiplications

h ( x , y ) I ( x , y ) * g 1 ( x ) * g 2 ( y ) 2n multiplications

.011

.13

x2

.6

2

2

g (x) e

g 2 g ( y) 1

.6

g1 g ( x ) .011 .13 .6 1 .6 .13 .011 .13

.011

On the Separability of LoG

2 S 2 g * I 2 g * I I * 2 g

Requires n2 multiplications

2 S I g xx ( x ) g ( y ) I g yy ( y ) g ( x )

Requires 4n multiplications

Seperability

Gaussian Filtering

Image g(x) g(y) I g

gxx(x) g(y)

Image + 2 S

gyy(y) g(x)

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Example

I

I * 2 g Zero crossings of 2 S

Example

6

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Algorithm

Compute LoG

2 g ( x, y )

Use 2D filter g ( x ), g xx ( x ), g ( y ), g yy ( y)

Use 4 1D filters

Find zero-crossings from each row

Find slope of zero-crossings

Apply threshold to slope and mark edges

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Quality of an Edge

Robust to noise

Localization

Too many or too less responses

Quality of an Edge

edge to noise localization responses

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Canny Edge Detector

Criterion 1: Good Detection: The optimal detector must

minimize the probability of false positives as well as false

negatives.

be as close as possible to the true edges.

one point only for each edge point.

Canny Edge Detector Steps

2. Compute derivative of filtered image

3. Find magnitude and orientation of gradient

4. Apply Non-maximum Suppression

5. Apply Hysteresis Threshold

Canny Edge Detector

First Two Steps

Smoothing 1

x2 y2

g ( x, y) 2 2

e

S I g ( x, y) g ( x, y) I 2

Derivative

S g I g I g

gx

g gx g

gx gx I y

S I g I y

g

y y

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Canny Edge Detector

Derivative of Gaussian

g x ( x, y)

g y ( x, y)

g ( x, y)

Canny Edge Detector

First Two Steps

I Sx

Sy

Canny Edge Detector

Third Step

( S x , S y ) Gradient Vector

magnitude ( S x2 S y2 )

Sy

direction tan 1

Sx

Canny Edge Detector

Fourth Step

We wish to mark points along the curve where the magnitude is largest. We can do this by

looking for a maximum along a slice normal to the curve (non-maximum suppression).

These points should form a curve. There are then two algorithmic issues: at which point is

the maximum, and where is the next one?

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Canny Edge Detector

Non-Maximum Suppression

local maximum

S x , y if S x , y S x , y

x , y

M x , y & S x , y S x , y

x , y

0 otherwise

x , y

x and x are the neighbors of x along

normal direction to an edge

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Canny Edge Detector

Non-Maximum Suppression

S S x2 S 2

y M

M Threshold 25

Canny Edge Detector

Hysteresis Thresholding

above High, declare it as an edge pixel

below Low, declare it as a non-edge-pixel

between low and high

Consider its neighbors iteratively then declare it an

edge pixel if it is connected to an edge pixel directly

or via pixels between low and high.

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Canny Edge Detector

Hysteresis Thresholding

Connectedness

x x x

Canny Edge Detector

Hysteresis Thresholding

Gradient High

magnitude

low

Canny Edge Detector

Hysteresis Thresholding

The gradient magnitude at a pixel is above a high

threshold declare that as an edge point

Then recursively consider the neighbors of this

pixel.

If the gradient magnitude is above the low threshold

declare that as an edge pixel.

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Canny Edge Detector

Hysteresis Thresholding

regular

M M 25

Hysteresis

High 35

Low 15

Alper Yilmaz, Mubarak Shah Fall 2012, UCF

Suggested Reading

Verri, "Introductory Techniques for 3-D

Computer Vision"

Chapter 2, Mubarak Shah, Fundamentals of

Computer Vision

- Artificial Intelligence M1Uploaded byAkanshaJain
- Canny's Filter for Edge Detection: a Java ImplementationUploaded byjimiranda
- Evermotion Archexteriors Vol 4 PDFUploaded byKathy
- aipresentation2-171219131633Uploaded byQUICK INDIA
- Sutton-Barto.pdfUploaded byvxvarum
- Segmentation and Classification of Skin Lesions Based on Texture FeaturesUploaded byAnonymous 7VPPkWS8O
- Preliminary ExerciseUploaded byianleeuk301668
- AIPSUploaded bypraveenv_kumar
- Fourth International Conference on Soft Computing, Artificial Intelligence and Applications (SCAI-2015)Uploaded byCS & IT
- Cover Letter GoogleUploaded byMakhyan Jibril
- 0020 HDRI Max EnglishUploaded byRoshan Lama
- Dr.hussein-353_353Uploaded byUbiquitous Computing and Communication Journal
- Independence Day RubricUploaded byShekaydra Green
- CourseAssignment2014-15 - Sem1+2Uploaded byRawal Khirodkar
- Video StabilizationUploaded bygoldenstone
- Final Presentation MISUploaded byHaseeb Shad
- Goal Evaluation of Segmentation Algorithms for Traffic Sign RecognitionUploaded byAhmad Kurniawan Cah Bansel
- aiUploaded byARUN KUMAR V
- Application of CART and IBL for Image RetrievalUploaded byvamsidhar2008
- blob detectionUploaded byrannywulandari
- edge detection2.pdfUploaded bySantosh
- AI GouthamUploaded bydisina
- task 2 - feedback formUploaded byapi-267659060
- Geometric Modelling[1]Uploaded byRupaliPandey
- Optical fiber a Photonics journal portionUploaded byArone Asadas
- A Survey on Road Sign Detection and ClassificationUploaded byAnonymous kw8Yrp0R5r
- 2018ratesrhershey_(15494120).pdfUploaded byjwlovell
- FashionDesign-2010.pdfUploaded byhenny heryani
- project_proposals.pdfUploaded byIssmat Shah Masoodi
- RUBRIC Poster MakingUploaded byMelanie Ducalang

- (Www.entrance-exam.net)-Cochin University B. Tech in IT 7th Sem - Digital Image Processing Sample Paper 1Uploaded byAchu
- Enhancement and Segmentation of Historical RecordsUploaded byCS & IT
- Image Fusion PptUploaded byanshul
- [IJCST-V5I2P17]:Sunita Janoriya, Prof. M.P. ParsaiUploaded byEighthSenseGroup
- Samsung PN51E550 CNET review calibration resultsUploaded byDavid Katzmaier
- DipUploaded bySwarna Latha
- CT Image Enhancement for ICH ClassificationUploaded byandi
- Rasterization TextureUploaded byJoel Myers
- Sharpening with Adobe Photoshop CS5Uploaded byChristopher Watts
- Wavelets for Edge DetectionUploaded byIon C. Andronache
- image processing projectUploaded byKartik Kumar
- RT41043112016.pdfUploaded byJanardhan Ch
- IJFTET - Vol. 4-Issue 1_IMPROVED OTSU’S THRESHOLDING TECHNIQUES FOR HSI COLOR IMAGE SEGMENTATIONUploaded byIJFTET
- 3D Display Methods97-03Uploaded byishantn
- Computer Graphics 3D Display MethodsUploaded bySyedkareem_hkg
- CPDprogram_radtech92217Uploaded byPRC Board
- Review of Object Segmentation and Identification Using Edge Detection and Feature Matching TechniqueUploaded byeditor3854
- Referensi Medscape Kidney Angiomyolipoma Imaging.docxUploaded byYunita D
- Advance Portrait Retouch in 1Uploaded byبنیاد پرست
- Execution Discerption of DWT-SVD Watermarking Algorithm by Various AttacksUploaded byAdvanced Research Publications
- BioJVA Comparison With MRI and CTUploaded byBioRESEARCH Assoc. Inc
- Jackowski06_VIRTOPSY_Maximum Intensity Projection of Cranial ComputedUploaded bybenaldain
- Quran PNGs (Verse by Verse Format)Uploaded byjaved
- Forensic Photogrammetric Analysis for Photo and Photo Scanned Images Using Wavelet TransformationUploaded bysugavanamkr
- FPGA Implementation for Image Edge Detection using Xilinx System GeneratorUploaded byEditor IJRITCC
- hsvUploaded byTabithaDsouza
- HTML Notes in HindiUploaded byFerose Khan
- Image Processing Using Matlab - IITUploaded byengamro85
- Spatio-Temporal Up Sampling on the GPUUploaded byDae-young Kim
- Image InterpolationUploaded byphanibhamidipati

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.