Edge-Detection and Wavelet Transform Kuang-Tsu Shih Time Frequency Analysis and Wavelet Transform...

Post on 29-Jan-2016

223 views 0 download

Tags:

transcript

Edge-Detection and Wavelet Transform

Kuang-Tsu Shih

Time Frequency Analysis and Wavelet Transform Midterm Presentation

2011.11.24

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Edge-Detection• A fundamental element in image analysis• Wide applications:– Pattern recognition– Image segmentation– Scene analysis– …etc.

The Definition of An Edge• Definition:– Neighboring pixels with large differences in value.

• Edges may be caused by various reasons– Discontinuity in depth (Silhouettes)

– Discontinuity in reflectance (texture)

– Discontinuity in lighting (shade)

• We do not distinguish them in this report.

Edge Detector

original image a binary edge map

Ambiguity in Edge DetectionEdge!

Edge?Edge? Edge?

Fig. The ambiguity of the locality of edges.

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Gradient-Based Methods• The gradient-based methods check the magnitude of

image gradient.– The gradient map is generated by 2D convolution.– Detects edges if the magnitude > threshold.

• Sobel operator

• Prewitt operator

• Robert’s cross operator

Gradient-Based Methods• Advantage:– Very simple, very fast.

• Disadvantage:– Very susceptible to noise. (main drawback)

– Not capable of detecting edges in different scales.– Parameter tuning.

Lena image with noise The result by Sobel operator

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Canny Edge Detector

• Filtering– Pass to a low pass kernel (Gaussian) to raise SNR.

• Take gradient – The angle of gradient is quantized into four bins. ( 米 )

• Non-maximum suppression– Determine local maximum of gradient according to

the orientation of the gradient.• Hysteresis Threshold– TH and TL, connectivity of edges.

Canny Edge Detector• Advantage– Easy implementation, fast speed.– Relatively robust and cost effect.

• Disadvantage– The result can still be affected by strong noise.– Does not examine edges in all scales.

Lena with noise Canny result

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Wavelet Transform• Basic form of continuous wavelet transform (CWT)

• f belongs to , that is, . (finite energy)

• The functions generated by mother wavelet should be a basis of the space.

: The mother wavelet

a: The dimension of translation (location axis)

b: The dimension of dilation (scale axis)

dttf

2)(

Wavelet Transform• More on the mother wavelet

– Admissibility:

– Regularity:

d2

)( 0)( dtt

“Wave”

0)( dxxxM nn

“Let”

dtb

t

p

tf

bbfW

p

p

p

)(

!)0(

1),0( )(

)(

!

)0(...

!2

)0(

!1

)0()0(

1 21)(

32

)2(2

1

)1(

0nn

n

n

bObMn

fbM

fbM

fbMf

b

WHY?

(vanishing moments)

Decays fast as b is small

Vanishes!

Wavelet Transform

Fig. Some common mother wavelets.

We focus on this one

• The Mexican hat function

• In fact, it is the 2nd derivative of the Gaussian function (a “smoothing function”)

• If we choose the wavelet to be the pth derivative of Gaussian,

the wavelet has exactly p vanish moment.

The Mexican Hat Function

224/5

213

2)( tett

2

)( tp

p

edt

dt

• Let be the stretched version of .

Wavelet Transform and Edge Detection• Let f(x) be a function in , be a smoothing

function. (impulse response of a low-pass filter)

)(x

)(1

)(s

x

sxs )(x

• Let and

Wavelet Transform and Edge Detection

KEY POINT!

Wavelet transform

Wavelet transform

Smooth + Differentiation

Smooth + Differentiation

Wavelet Transform and Edge Detection

Smooth

Differentiation

Differentiation

Wavelet Transform and Edge Detection

Fig. Edges can be detected by examine the wavelet transform of the signal.

• We can easily generalize this to 2D signals:

Wavelet Transform and Edge Detection

KEY POINT!

Wavelet transformSmooth + Differentiation

Wavelet Transform and Edge Detection

• The modulus of the wavelet transform at scale s:

• A point is a multi-scale edge point at scale s if the magnitude of the gradient attains a local maximum.

s = 21 s = 22 s = 23 s = 24

Original Image

Filtered Image s = 24

x

y

22

yx

s = 21 s = 22 s = 23 s = 24

x

y

/

/tan 1

Local Maximum of Modulus

Local Maximum of Modulus after thresholding

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Wavelet-Based Method with Lipschitz Exponent

• In fact, the wavelet-based method with dyadic (2k) scale alone is NOT optimally adapt to noise.

• IDEA: We deal with sharp edges in big-scale (lower frequency) and not-so-sharp edges in small-scale (higher frequency).– Equivalently, we use kernels with larger support for sharp

edges to better eliminate noise, and vice versa for weak edges.

– Spatially variant kernel, none linear filtering.

Wavelet-Based Method with Lipschitz Exponent

• How do we measure the “singularity” of a function?– Intuitively, an edge is a singular point of the function and the degree of

singularity corresponds to the sharpness of an edge.– Note that the functions we care are not necessarily differentiable.

• Solution: “The Lipschitz Exponent”

Lipschitz Exponent

trueisit s.t. ,0 00 hhh

Lipschitz Exponent

(Therefore, any differentiable point has L. E. greater than 1.)

KEY POINT

(The higher L. E., the smoother a function is, for that point.)

This important theorem relates the wavelet transform coefficients to L.E.The rates of change of coefficients across scales are different.

Lipschitz Exponent

Wavelet-Based Method with Lipschitz Exponent

Wavelet-Based Method with Lipschitz Exponent

Wavelet-Based Method with Lipschitz Exponent

Wavelet-Based Method with Lipschitz Exponent

Outline

• Introduction to Edge Detection• Gradient-Based Methods• Canny Edge Detector• Wavelet Transform-Based Methods• The Lipschitz Exponent• Conclusion

Conclusion

• We reviewed several conventional edge detectors and their advantage and disadvantage.

• We briefly introduced the concept of wavelet transform.

• We proved the relationship between wavelet transform and low-pass filtering + gradient.

• We introduced the concept of Lipschitz exponent and its application in edge detection.

References• Feng-Ju Chang, “Wavelet for edge detection.” • J. C. Goswami, A. K. Chan, 1999, “Fundamentals of wavelets: theory,

algorithms, and applications," John Wiley & Sons, Inc.• G. X. Ritter, J. N. Wilson, 1996, “Handbook of computer vision algorithms in

image algebra," CRC Press, Inc.• 謝豪駿 , 小波分析於梁構件損傷檢測之應用 • A really friendly guild to wavelet transform,

www.polyvalens.com/blog/?page_id=15• Wikipedia Edge Detection http://en.wikipedia.org/wiki/Edge_detection Canny Edge Detector http://en.wikipedia.org/wiki/Canny_edge_detector• http://140.115.11.235/~chen/course/vision/ch6/ch6.htm