M. Wu: ENEE631 Digital Image Processing (Spring'09) Edge Detection and Basics on 2-D Random Signal Spring ’09 Instructor: Min Wu Electrical and Computer.

Slides:



Advertisements
Similar presentations
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Advertisements

Spatial Filtering (Chapter 3)
Image Processing Lecture 4
Chapter 3 Image Enhancement in the Spatial Domain.
Image Processing Frequency Filtering Instructor: Juyong Zhang
Sliding Window Filters and Edge Detection Longin Jan Latecki Computer Graphics and Image Processing CIS 601 – Fall 2004.
Digital Image Processing
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
6/9/2015Digital Image Processing1. 2 Example Histogram.
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Digital Image Processing
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
Lecture 2: Image filtering
About this Course Subject: Textbook Reference book Course website
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission Linear 2-D Image Filtering 1-D discrete convolution 2-D discrete convolution 2-D.
Image (and Video) Coding and Processing Lecture 2: Basic Filtering Wade Trappe.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Spatial-based Enhancements Lecture 3 prepared by R. Lathrop 10/99 updated 10/03 ERDAS Field Guide 6th Ed. Ch 5: ;
Chapter 2 Discrete-Time Signals and Systems
TELECOMMUNICATIONS Dr. Hugh Blanton ENTC 4307/ENTC 5307.
M. Wu: ENEE631 Digital Image Processing (Spring'09) Texture Analysis and Synthesis Spring ’09 Instructor: Min Wu Electrical and Computer Engineering Department,
Random Processes ECE460 Spring, Power Spectral Density Generalities : Example: 2.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Image processing.
Lecture 6: Edge Detection CAP 5415: Computer Vision Fall 2008.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Definitions Random Signal Analysis (Review) Discrete Random Signals Random.
M. Wu: ENEE631 Digital Image Processing (Spring'09) Fourier Transform and Spatial Filtering Spring ’09 Instructor: Min Wu Electrical and Computer Engineering.
ENEE631 Digital Image Processing (Spring'04) Image Restoration Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park  
Elements of Stochastic Processes Lecture II
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission Image Restoration distortion noise Inverse Filtering Wiener Filtering Ref: Jain,
ENEE631 Digital Image Processing (Spring'04) Signal Processing: From 1-D to 2-D (m-D) Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland,
ENEE631 Digital Image Processing (Spring'04) Basics on 2-D Random Signal Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
1 Methods in Image Analysis – Lecture 3 Fourier CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2004 George Stetten, M.D., Ph.D.
Discrete-time Random Signals
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Lecture 04 Edge Detection Lecture 04 Edge Detection Mata kuliah: T Computer Vision Tahun: 2010.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
The Chinese University of Hong Kong
TOPIC 12 IMAGE SEGMENTATION & MORPHOLOGY. Image segmentation is approached from three different perspectives :. Region detection: each pixel is assigned.
Instructor: Mircea Nicolescu Lecture 7
Digital Image Processing CSC331
Sliding Window Filters Longin Jan Latecki October 9, 2002.
ENEE631 Digital Image Processing (Spring'04) Fourier Transform and Spatial Filtering Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College.
Digital Signal Processing Lecture 6 Frequency Selective Filters
Computer Vision – 2D Signal & System Hanyang University Jong-Il Park.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Miguel Tavares Coimbra
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering Northern Arizona University.
9/11/2018 ENEE631 Spring’09 Lecture 7 (2/16/2009) Image Restoration
CE Digital Signal Processing Fall Discrete-time Fourier Transform
SIGNALS PROCESSING AND ANALYSIS
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
The Chinese University of Hong Kong
ELE 488 Fall 2006 Image Processing and Transmission
Digital Image Processing
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Presentation transcript:

M. Wu: ENEE631 Digital Image Processing (Spring'09) Edge Detection and Basics on 2-D Random Signal Spring ’09 Instructor: Min Wu Electrical and Computer Engineering Department, University of Maryland, College Park   bb.eng.umd.edu (select ENEE631 S’09)   UMCP ENEE631 Slides (created by M.Wu © 2009) ENEE631 Spring’09 Lecture 6 (2/11/2009)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [2] Overview Last Time: –Fourier Analysis for 2-D signals –Impulse Response and Frequency Response for 2-D LSI System –Image enhancement via Spatial Filtering u Denoising by averaging filter and median filter Today –Spatial filtering (cont’d): image sharpening and edge detection –Characterize 2-D random signal (random field) Assignment 1 Due next Monday –See course website for submission instruction and updated image zip files UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [3] 2-D Fourier Transform for a 2-D continuous function u Horizontal and vertical spatial frequencies (unit: cycles per degree of viewing angle) –Separability: u separable 2-D complex exponentials allow 2-D transform to be realized by a succession of 1-D transforms along each spatial coordinate –Many other properties can be extended from 1-D FT u convolution in one domain  multiplication in another domain u inner product preservation (Parseval energy conservation theorem) UMCP ENEE408G Slides (created by M.Wu © 2002) F(  x, y)F(  x,  y ) F(  x, y)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [4] Review: 2-D Fourier Transforms Separable implementations for 2-D FT, DSFT, DFT due to separable 2-D complex exponentials UMCP ENEE408G Slides (created by M.Wu © 2002) F(  x, y)F(  x,  y ) F(  x, y) 2-D FT on continuous-indexed signal DFT on sampled periodic signal DSFT on sampled signal

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [5] Review: Freq. Response & Eigen Function for LSI System Relations between signal domain and Fourier domain –I/O relation for LSI system: Convolve input with impulse response y[n] = x[n]  h[n]  Y(  ) = X(  ) H(  ) –FT of complex exponentials: exp[j  0 n]   (    0 ) Eigen function of 1-D LSI system –Output response of complex exponential input x[n]= exp[j  0 n]: Y(  ) = H(  )  (    0 ) = H(  0 )  (    0 ) => y[n] = H(  0 ) exp[j  0 n] i.e. output has same signal shape as the input with a possible change only in amplitude and phase specified by H(  0 ) –H(  ) is the LSI system’s frequency response Extend to 2-D LSI system –y[m, n] = x[m, n]  h[m, n]  Y(u, v) = X(u, v) H(u, v) –Eigen function is 2-D complex exponentials; Freq. response is H(u, v) UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [6] Spatial Operations with Spatial Mask Spatial mask is 2-D finite impulse response (FIR) filter –Usually has small support 2x2, 3x3, 5x5, 7x7 –Convolve this filter with image u g(m,n) =  f(m-x, n-y) h(x,y) =  f(x,y) h(m-x, n-y) … mirror w.r.t. origin, then shift & sum up –In frequency domain: multiplying DFT(image) with DFT(filter) UMCP ENEE631 Slides (created by M.Wu © 2004) Note: spatial mask is often specified as the already mirrored version of the equivalent FIR filter. Image examples are from Gonzalez-Woods 2/e online slides.

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [7] Directional Smoothing Simple spatial averaging mask blurs edges –Improve by avoiding filtering across edges –Restrict smoothing to along edge direction Directional smoothing –Compute spatial average along several directions –Take the result from the direction giving the smallest changes before and after filtering Other solutions –Use more explicit edge detection and adapt filtering accordingly  WW UMCP ENEE631 Slides (created by M.Wu © 2001) “isotropic” filter has response independent of directions (aka. circularly symmetric or rotation invariant) 1/ /9 01/8 1/ /8 0 0

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [8] Median Filtering Salt-and-Pepper noise –Isolated extreme-valued (white/black) pixels spread randomly over the image –Spatial averaging filter may lead to blurred output when averaging with extreme values Median filtering –Output the median over a small window u Nonlinear operation: Median{ x(m) + y(m) }  Median{x(m)} + Median{y(m)} –Odd window size is commonly used u 3x3, 5x5, 7x7; 5-pixel “ + ” shaped window –Even-sized window ~ take the average of two middle values as output Generalize: apply order statistic operations UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [9] Image Sharpening Use LPF to generate HPF –Subtract a low pass filtered result from the original signal –HPF identifies the locations of a signal’s transitions Enhance edges I 0  I LP  I HP = I 0 – I LP  I 1 = I 0 + a*I HP UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [10] Example of Image Sharpening –v(m,n) = u(m,n) + a * g(m,n) –Often use Laplacian operator to obtain g(m,n) –Laplacian operator is a discrete form of 2 nd -order derivatives 0-¼ ¼ 0 0 UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [11] Example of Image Sharpening Original moon image is from Matlab Image Toolbox. UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [12] Other Variations of Image Sharpening High boost filter (Gonzalez-Woods 2/e pp132 & pp188) I 0  I LP  I HP = I 0 – I LP  I 1 = (b-1) I 0 + I HP –Equiv. to high pass filtering for b=1 –Amplify or suppress original image pixel values when b  2 Combine sharpening with histogram equalization Image example is from Gonzalez- Woods 2/e online slides. UMCP ENEE408G Slides (created by M.Wu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [13] Impulse and Frequency Responses of LPF / HPF e.g. Gaussian LPF filter UMCP ENEE631 Slides (created by M.Wu © 2004) Image example is from Gonzalez-Woods 2/e online slides.

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [14] Edges and Gradient Vector Edge: pixel locations of abrupt luminance change For binary image –Take black pixels with immediate white neighbors as edge pixel u Detectable by XOR operations For continuous-tone image –How to represent edge? u by intensity + direction => Edge map ~ edge intensity + directions –Detection Method-1: prepare edge examples (templates) of different intensities and directions, then find the best match –Spatial luminance gradient vector of an edge pixel:  edge u gradient gives the direction with highest rate of luminance changes u is a vector of partial derivatives along two orthogonal directions –Detection Method-2: measure transitions along 2 orthogonal directions UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [15] Edge Detection Measure gradient vector –Along two orthogonal directions ~ usually horizontal and vertical u g x =  L /  x u g y =  L /  y –Magnitude of gradient vector u g(m,n) 2 = g x (m,n) 2 + g y (m,n) 2 u g(m,n) = |g x (m,n) | + |g y (m,n)| (preferred in hardware implement.) –Direction of gradient vector u tan –1 [ g y (m,n) / g x (m,n) ] Characterizing edges in an image –(binary) Edge map: specify “edge point” locations with g(m,n) > thresh. –Edge intensity map: specify gradient magnitude at each pixel –Edge direction map: specify directions UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [16] Common Gradient Operators for Edge Detection –Move the operators across the image and take the inner products u Magnitude of gradient vector g(m,n) 2 = g x (m,n) 2 + g y (m,n) 2 u Direction of gradient vector tan –1 [ g y (m,n) / g x (m,n) ] –Gradient operator is HPF in nature ~ could amplify noise u Prewitt and Sobel operators compute horizontal and vertical differences of local sum to reduce the effect of noise Roberts H 1 (m,n) H 2 (m,n) PrewittSobel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [17] Derivative Operators: A Closer Look Spatial averaging filter perpendicular to direction of discrete derivative discrete derivative filter in horizontal direction Combination of the two masks gives single “averaged gradient mask” in horizontal direction.

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [18] Examples of Edge Detectors –Quantize edge intensity to 0/1: u set a threshold u white pixel denotes strong edge RobertsPrewittSobel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [19] Examples of Edge Detectors –Quantize edge intensity to 0/1: u set a threshold u white pixel denotes strong edge RobertsPrewittSobel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [20] Robust Edge Detector Apply LPF to suppress noise, then apply edge detector or derivative operations E.g. Laplacian of Gaussian: in shape of Mexican hat Figures from Gonzalez- Woods 2/e online slides.

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [21] Canny Edge Detector –J. Canny: A Computational Approach to Edge Detection, IEEE Trans. on Pattern Analysis and Machine Intelligence, Vol 8, No. 6, Nov –See in 3 rd ed of Gonzalez. – The Canny operator works in a multi-stage process. First of all the image is smoothed by Gaussian convolution.Gaussian convolution Then a simple 2-D first derivative operator (somewhat like the Roberts Cross) is applied to the smoothed image to highlight regions of the image with high first spatial derivatives.Roberts Cross Edges give rise to ridges in the gradient magnitude image. The algorithm then tracks along the top of these ridges and sets to zero all pixels that are not actually on the ridge top so as to give a thin line in the output, a process known as non-maximal suppression. The tracking process exhibits hysteresis controlled by two thresholds: T1 and T2 with T1 > T2. Tracking can only begin at a point on a ridge higher than T1. Tracking then continues in both directions out from that point until the height of the ridge falls below T2. This hysteresis helps to ensure that noisy edges are not broken up into multiple edge fragments.

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [22] Summary: Spatial LPF, HPF, & BPF HPF and BPF can be constructed from LPF Low-pass filter –Useful in noise smoothing and downsampling/upsampling High-pass filter –h HP (m,n) =  (m,n) – h LP (m,n) –Useful in edge extraction and image sharpening Band-pass filter –h BP (m,n) = h L2 (m,n) – h L1 (m,n) –Useful in edge enhancement –Also good for high-pass tasks in the presence of noise u avoid amplifying high-frequency noise UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [23] 2-D Random Signals (aka Random Field) 2-D Random Signals (aka Random Field)  Side-by-Side Comparison with 1-D Random Process UMCP ENEE631 Slides (created by M.Wu © 2004) (1) Sequences of random variables & joint distributions (2) First two moment functions and their properties (3) Wide-sense stationarity (4) Unique to 2-D case: separable and isotropic covariance function (5) Power spectral density and properties

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [24] Statistical Representation of Images Each pixel is considered as a random variable (r.v.) Relations between pixels –Simplest case: i.i.d. –More realistically, the color value at a pixel may be statistically related to the colors of its neighbors A “sample” image –A specific image we have obtained to study can be considered as a sample from an ensemble of images –The ensemble represents all possible value combinations of random variable array Similar ensemble concept for 2-D random noise signals –Each 2-D location can take a real value UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [25] Characterize the Ensemble of 2-D Signals Specify by a joint probability distribution function –Difficult to measure and specify the joint distribution for images of practical size => too many r.v. : e.g. 512 x 512 = 262,144 Specify by the first few moments –Mean (1 st moment) and Covariance (2 nd moment) u may still be non-trivial to measure for the entire image size By various stochastic models –Use a few parameters to describe the relations among all pixels u E.g. 2-D extensions from 1-D Autoregressive (AR) model Important for a variety of image processing tasks –image compression, enhancement, restoration, understanding, … => Today: some basics on 2-D random signals UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [26] Discrete Random Field We call a 2-D sequence discrete random field if each of its elements is a random variable –when the random field represents an ensemble of images, we often call it a random image Mean and Covariance of a complex random field E[u(m,n)] =  (m,n) Cov[u(m,n), u(m’,n’)] = E[ (u(m,n) –  (m,n)) (u(m’,n’) –  (m’,n’)) * ] = r u ( m, n; m’, n’) u For zero-mean random field, autocorrelation function = cov. function Wide-sense stationary (or wide-sense homogeneity)  (m,n) =  = constant r u ( m, n; m’, n’) = r u ( m – m’, n – n’; 0, 0) = r ( m – m’, n – n’ ) u also called shift invariant or spatial invariant in some literature UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [27] Special Random Fields of Interests White noise field –A stationary random field –Any two elements at different locations x(m 1,n 1 ) and x(m 2,n 2 ) are mutually uncorrelated r x ( m, n ) =  x 2  ( m, n ) Gaussian random field –Every segment defined on an arbitrary finite grid is Gaussian i.e. every finite segment of u(m,n) when mapped into a vector have a joint Gaussian p.d.f. of UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [28] Special Random Fields of Interests White noise field –A stationary random field –Any two elements at different locations x(m 1,n 1 ) and x(m 2,n 2 ) are mutually uncorrelated r x ( m, n ) =  x 2  ( m, n ) Gaussian random field –Every segment defined on an arbitrary finite grid is Gaussian i.e. every finite segment of u(m,n) when mapped into a vector have a joint Gaussian p.d.f. of UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [29] Properties of Covariance for Random Field [Recall similar properties of covariance function for 1-D random process] Symmetry r u ( m, n; m’, n’) = r u * ( m’, n’; m, n) For stationary random field: r ( m, n ) = r * ( -m, -n ) For stationary real random field: r ( m, n ) = r ( -m, -n ) Note in general r u ( m, n; m’, n’)  r u ( m’, n; m, n’)  r u ( m’, n; m, n’) Non-negativity  m  n  m’  n’ x(m, n) r u ( m, n; m’, n’) x * (m’, n’)  0 ~ Recall for 1-D case, correlation matrix is non-negative definite: x H R x  0 for all x. UMCP ENEE631 Slides (created by M.Wu © 2004) Recall: r u ( m, n; m’, n’) = E[ (u(m,n) –  (m,n)) (u(m’,n’) –  (m’,n’))* ]

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [30] Properties of Covariance for Random Field [Recall similar properties of covariance function for 1-D random process] Symmetry r u ( m, n; m’, n’) = r u * ( m’, n’; m, n) For stationary random field: r ( m, n ) = r * ( -m, -n ) For stationary real random field: r ( m, n ) = r ( -m, -n ) Note in general r u ( m, n; m’, n’)  r u ( m’, n; m, n’)  r u ( m’, n; m, n’) Non-negativity  m  n  m’  n’ x(m, n) r u ( m, n; m’, n’) x * (m’, n’)  0 ~ Recall for 1-D case, correlation matrix is non-negative definite: x H R x  0 for all x. UMCP ENEE631 Slides (created by M.Wu © 2004) Recall: r u ( m, n; m’, n’) = E[ (u(m,n) –  (m,n)) (u(m’,n’) –  (m’,n’))* ]

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [31] Separable Covariance Functions Separability –If the covariance function of a random field can be expressed as a product of covariance functions of 1-D sequences r( m, n; m’, n’) = r 1 ( m, m’) r 2 ( n, n’) ~ Nonstationary case r( m, n ) = r 1 ( m ) r 2 ( n ) ~ Stationary case Example: –A separable stationary covariance function often used in image proc for its simplicity r(m, n) =  2  1 |m|  2 |n|, |  1 |<1 and |  2 |<1 –  2 represents the variance of the random field;  1 and  2 are the one-step correlations in the m and n directions UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [32] Separable Covariance Functions Separability –If the covariance function of a random field can be expressed as a product of covariance functions of 1-D sequences r( m, n; m’, n’) = r 1 ( m, m’) r 2 ( n, n’) ~ Nonstationary case r( m, n ) = r 1 ( m ) r 2 ( n ) ~ Stationary case Example: –A separable stationary covariance function often used in image proc for its simplicity r(m, n) =  2  1 |m|  2 |n|, |  1 |<1 and |  2 |<1 –  2 represents the variance of the random field;  1 and  2 are the one-step correlations in the m and n directions UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [33] Isotropic Covariance Functions Isotropic / circularly symmetric –i.e. the covariance function only changes with respect to the radius (the distance to the origin), and isn’t affected by the angle Example –A nonseparable exponential function often used as a more realistic model of the covariance function for images –When a 1 = a 2 = a 2, this becomes isotropic: r(m, n) =  2  d u As a function of the Euclidean distance of d = ( m 2 + n 2 ) 1/2 u  = exp(-|a|), i.e. correlation is decaying as distance increases UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [34] Estimating the Mean and Covariance Function Approximate the ensemble average with sample average Example: for an M x N real-valued image x(m, n) UMCP ENEE631 Slides (created by M.Wu © 2004) Note: similar to the 1-D case, the cov estimates here are biased, in order to achieve smaller variance in estimation and to avoid the possible negative definiteness by unbiased estimate

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [35] From EE630: Estimate r(k) via Time Average Normalizing the sum of (N-k) pairs by a factor of 1/N ? v.s. by a factor of 1/(N-k) ? UMCP ENEE630 Slides (created by M.Wu © 2004; part-3.2 Spectrum Est.)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [36] Spectral Density Function The Spectral density function (SDF) is defined as the Fourier transform of the covariance function r x –Also known as the power spectral density (p.s.d.) ( in some text, p.s.d. is defined as the FT of autocorrelation function ) Example: SDF of stationary white noise field with r(m,n)=  2  (m,n) UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [37] Spectral Density Function The Spectral density function (SDF) is defined as the Fourier transform of the covariance function r x –Also known as the power spectral density (p.s.d.) ( in some text, p.s.d. is defined as the FT of autocorrelation function ) Example: SDF of stationary white noise field with r(m,n)=  2  (m,n) UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [38] Properties of Power Spectrum [Recall similar properties in 1-D random process] SDF is real: S(  1,  2 ) = S*(  1,  2 ) –Follows the conjugate symmetry of the covariance function r (m, n) = r * (-m, -n) SDF is nonnegative: S(  1,  2 )  0 for  1,  2 –Follows the non-negativity property of covariance function –Intuition: “power” cannot be negative SDF of the output from a LSI system w/ freq response H(  1,  2 ) S y (  1,  2 ) = | H(  1,  2 ) | 2 S x (  1,  2 ) DSFT of cross correlation: S yx (  1,  2 ) = H(  1,  2 ) S x (  1,  2 ) UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [39] Summary of Today’s Lecture Spatial filter: LPF, HPF, BPF –Image sharpening and edge detection Basics on 2-D random signals Next time –Continue on 2-D random field; –Image restoration Readings –Gonzalez’s book ; 10.2; 5.2; Wood’s book 7.1 (on random field) –For further readings: Woods’ book 6.6; 3.1, 3.2, 3.5.0; Jain’s book 7.4; 9.4; UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [40] For Next Lecture UMCP ENEE631 Slides (created by M.Wu © 2004) (1) Sequences of random variables & joint distributions (2) First two moment functions and their properties (3) Wide-sense stationarity (4) Unique to 2-D case: separable and isotropic covariance function (5) Power spectral density and properties

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [41] Z-Transform Expression of Power Spectrum The Z transform of r u –Known as the covariance generating function (CGF) or the ZT expression of the power spectrum UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [42] Rational Spectrum Rational Spectrum is the SDF that can be expressed as a ratio of finite polynomials in z 1 and z 2 Realize by Linear Shift-Invariant systems –LSI system represented by finite-order difference equations between the 2-D input and output UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [43] 2-D Z-Transform The 2-D Z-transform is defined by –The space represented by the complex variable pair (z 1, z 2 ) is 4-D Unit surface If Region of Convergence (ROC) include unit surface Transfer function of 2-D discrete LSI system UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [44] Stability Recall for 1-D LTI system –Stability condition in bounded-input bounded-output sense (BIBO) is that the impulse response h[n] is absolutely summable u i.e. ROC of H(z) includes the unit circle –H(z) for a causal and stable system should have all poles inside the unit circle 2-D Stable LSI system –Requires the 2-D impulse response is absolutely summable –i.e. ROC of H(z 1, z 2 ) must include the unit surface |z 1 |=1, |z 2 |=1 UMCP ENEE631 Slides (created by M.Wu © 2004)

M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec6 – Edge Detection & 2-D Random Signal [45] Stability Recall for 1-D LTI system –Stability condition in bounded-input bounded-output sense (BIBO) is that the impulse response h[n] is absolutely summable u i.e. ROC of H(z) includes the unit circle –H(z) for a causal and stable system should have all poles inside the unit circle 2-D Stable LSI system –Requires the 2-D impulse response is absolutely summable –i.e. ROC of H(z 1, z 2 ) must include the unit surface |z 1 |=1, |z 2 |=1 UMCP ENEE631 Slides (created by M.Wu © 2004)