edge detection via objective functions

30
Edge Detection via Objective functions Gowtham Bellala Kumar Sricharan

Upload: others

Post on 07-Jan-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Edge Detection via Objective functions

Edge Detection via Objective functions

Gowtham BellalaKumar Sricharan

Page 2: Edge Detection via Objective functions

Edge Detection – a quick recap!

Much of the “information” in an image is in the edges Edge detection is usually for the purpose of subsequent computerprocessingExamples : Image segmentation, object recognition, object detectionGeneral framework :

Page 3: Edge Detection via Objective functions

Concept

Page 4: Edge Detection via Objective functions

Approximate the derivative by finite differences

Page 5: Edge Detection via Objective functions

A Classical method - Sobel

Sobel’s method :Step 1: Utilizes masks Sx and Sy to obtain edge intensities Ex and Ey

Step 2: Thresholds the edge map to detect edge points.Disadvantage : Edges detected are thicker than actual edges.

Page 6: Edge Detection via Objective functions

Canny

Canny’s Method :Step 1: Apply a Gaussian filter to the imageStep 2: Gradient of the smoothed image is computed in x and y directionsStep 3: Edge and Direction maps are generatedStep 4: Non Maxima Suppression (NMS) is performedAdvantage over Sobel : Thinner edges

Page 7: Edge Detection via Objective functions

However, both Canny and Sobel methods obtain zero intensity if a line of one – pixel width passes through the mask.Resulting in double edges as shown below

True Image Sobel method Canny method

Page 8: Edge Detection via Objective functions

Objective function method

Algorithm follows an outline close to CannyEdge direction is decided by computing certain cost function

Page 9: Edge Detection via Objective functions
Page 10: Edge Detection via Objective functions

Non Maxima Suppression

Page 11: Edge Detection via Objective functions

Pseudo Code

Step 1 : Compute 4 objective function valuesStep 2 : Generate Edge map and Direction mapStep 3 : Apply NMS to the edge and direction maps and extract the edge points in the image.

Page 12: Edge Detection via Objective functions

Original Image Edge Detected Image

Page 13: Edge Detection via Objective functions

Drawbacks!

w0 and w1 are constants determined from empirical results, not specific to an Image – leads to problems

The algorithm outperforms Canny and Sobel edge detectors only in an ideal case.

Fails to work efficiently in presence of Noise

Page 14: Edge Detection via Objective functions

Performance of the algorithm in noise

Gaussian Noise Salt and Pepper Noise

Page 15: Edge Detection via Objective functions

Proposed Improvements

Page 16: Edge Detection via Objective functions

A New cost function

Original cost function depends on empirical estimates w0,w1Bad w0,w1 estimates will lead to poor edge detection We propose a more natural measure for inter-set and intra-set distances

Page 17: Edge Detection via Objective functions

Remodeling the cost function

Cost function f = Nf/Df

Nf =

Df =

These distance measures have been borrowed from theory of LDA

2( )S S SSN xμ −∑

21 ( )i SS i S

x μ∈

+ −∑∑

1S i

i SS

xN

μ∈

= ∑

1i

ix x

N= ∑

Page 18: Edge Detection via Objective functions

Edge detected image using modified objective function

Page 19: Edge Detection via Objective functions

Objective function for edge detection in noise

The drawback can be overcome by coming up with a clever choice of the objective function such that the existing framework can be used even in presence of noise

We consider two different cases

Case 1 : Image in presence of AWGN

Case 2 : Image in presence of Salt and Pepper noise

Page 20: Edge Detection via Objective functions

Gaussian Noise

How can I remove Gaussian noise?Averaging!But, we don’t want to blur the edgesAdaptive averaging – concept behind adaptive Wiener filtering

Incorporate this into the objective function

0

1

0 0

( , ) if ( , ) ( , )( , )

( , ) if ( , ) ( , )

i j i j x i j ax i j

x i j i j x i j a

μ μ

μ

⎧ − <⎪= ⎨− >⎪⎩

Page 21: Edge Detection via Objective functions

Modified cost function for Gaussian Noise

Cost function f = Nf/Df

Nf =

Df =

2( ) if

0 if

S S S S SS

S S

N x x a

x a

μ μ

μ

⎧ − − >⎪⎨⎪ − <⎩

21 ( ) if

1 else

i S i SS i S

x x aμ μ∈

⎧ + − − >⎪⎨⎪⎩

∑∑

Page 22: Edge Detection via Objective functions

Original Algorithm Proposed Algorithm

Page 23: Edge Detection via Objective functions

Salt and Pepper Noise

Unlike Gaussian noise, Impulse/Salt and Pepper noise corrupts the image with very high values.Resulting in many false edges! - Why?

Normal edge detection = f(i,j+1) – f(i,j)

Solution :Proposed edge detection = log(int(αf(i,j+1))) – log(int(αf(i,j)))where ‘int’ stands for greatest integer

Page 24: Edge Detection via Objective functions

Remodeling the cost function

Cost function f = Nf/Df

where Nf =

Df =

2(log log )S S SSN xμ −∑

21 (log log )i SS i S

x μ∈

+ −∑∑

1S i

i SS

xN

μ∈

= ∑

1i

ix x

N= ∑

Page 25: Edge Detection via Objective functions

Original Algorithm Proposed Algorithm

Page 26: Edge Detection via Objective functions

Original Algorithm Proposed Algorithm

Gaussian Noise

Salt and Pepper noise

Page 27: Edge Detection via Objective functions

Conclusions

Objective function based edge detection method works better thantraditional edge detection methods.

Not robust to noise

Performance in noise can be improved by simple changes to objective function

Versatile

Page 28: Edge Detection via Objective functions

Another application ?

Edges in color images can be classified as object edges, shadow edges, reflectance edges, occlusion edges etc.

There is a lot of recent work concerning classification of edges

Our aim – use different objective functions to distinguish and classify different edges….

Page 29: Edge Detection via Objective functions

References

[1] ‘A novel edge detection method based on maximising objective functions’ , Kang, Wang, Journal of Pattern Recognition, 2006

[2] ‘A new edge detection method in Image Processing’, Zhang, Zhao, Su, Proc of ISCIT, 2005

[3] ‘ Color edge detection in presence of Gaussian noise using non linear pre filtering’, Russo, Lazzari, IEEE Transactions on Inst. and Measurements, 2005.

Page 30: Edge Detection via Objective functions

Thank You

Questions?