This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECE 181b Homework 6 May 30, 2006 In this homework you will explore some of the properties of convolution and we will look into some aspects of the principal components analysis. Henceforth we will adopt the following conventions (READ CAREFULLY): • Boldface letters indicate points or vectors. • For vectors/points in P 3 we use capital letters, Sans font (e.g. X ), for vectors/points in P 2 we use lower case letters, Sans font (e.g. x ). • For vectors/points in R 3 we use capital letters, normal font (e.g. X ), for vectors/points in R 2 we use lower case letters, normal font (e.g. x ). • All the quantities related to the second camera are identified using the superscript prime ( ). • Square brackets indicate that the signal argument (indicating either a time instant or a spatial location) is an integer. Caveat. To receive full credit your answers must be clearly justified. Make sure to include the relevant steps that were required to obtain the numerical answer. 1 Discrete Convolution Recall that the expression for the discrete convolution of two signals f and g in 2D is given by: ( f * g )[ l,m ] = ∞ X h =∞ ∞ X k =∞ f [ h,k ] g [ l h,m k ] = ∞ X h =∞ g [ h,k ] f [ l h,m k ] (1) Question 1 Consider the expression (1) and two finite support 2D signals such that f 6 = 0 only for M f ≤ h ≤ M f , N f ≤ k ≤ N f and g 6 = 0 only for M g ≤ h ≤ M g , N g ≤ k ≤ N g . Assume that: 1 • M g M f and N g N f (i.e. the support of g is much smaller than the support of f ) • the signals are zero padded near the borders • a multiplication by zero counts as a multiplication by any other number. How many multiplications and summations are needed to compute the convolution (1) for M f ≤ l ≤ M f and N f ≤ m ≤ N f ? Clearly explain your counting arguments. Answer 1 For each point [ l,m ] we need to compute one multiplication for each element of g , for a total of (2 M g + 1)(2 N g + 1) multiplications. Similarly we need to compute (2 M g + 1)(2 N g + 1) 1 summations. Since this has to be repeated for each value M f ≤ l ≤ M f and N f ≤ m ≤ N f we conclude that we need: • (2 M g + 1)(2 N g + 1)(2 M f + 1)(2 N f + 1) multiplications, • ((2 M g + 1)(2 N g + 1) 1) (2 M f + 1)(2 N f + 1) summations. Question 2 Consider the (horizontal) Sobel differentiation kernel: S =  1 2 1 1 2 1 • Show that such kernel can be obtained convolving the following kernels: f = 1 1 1 1 g = 1 1 1 1 • Explain why the Sobel filter can be thought as a cascade of a smoothing filter and a purely derivative filter. Answer 2 • The answer follows directly by plugging in the numbers in equation (1) . • The kernel f acts as a smoothing filter: if its entries were divided by 4, it would calculate the mean of the intensity over a 2 × 2 window. The kernel g acts as a pure differentiator (think to the first differences used to approximate the derivatives)....
View
Full Document
 Fall '08
 Staff
 Corresponding angles, Realtime computing, Optical Flow

Click to edit the document details