Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comp 665 Convolution. Questions? Ask here first. Likely someone else has the same question.

Similar presentations


Presentation on theme: "Comp 665 Convolution. Questions? Ask here first. Likely someone else has the same question."— Presentation transcript:

1 Comp 665 Convolution

2 Questions? Ask here first. Likely someone else has the same question.

3 Modeling the imaging process We know how to compute where points in the world will map on the image plane Now, how will they be changed?

4 Impulse Response Function Point Spread Function What is the image of a point? –Shape of pinhole for points at infinity –Typically a little blob for a good lens –Could have aberrations and are distance, color, or position dependent. What happens as we enlarge the pinhole?

5 Blurring as convolution: IRF’s and apertures Blurring by convolution with impulse response function: I blurred (x)=  I input (y) h(x-y) dy –Replace each point y by y’s intensity times IRF h centered at y h(x-y) is effect of a fixed y on x over various image points x –Sum up over all such points Aperture in image space x: –effect of y on x over various y: h(-[y-x]) – weighting of various input image points in producing image at a fixed point x

6 Linear Systems Favorite model because we have great tools F(a+b) = F(a) + F(b), F(k a) = k F(a) Shift Invariant Time Invariant Is camera projection linear?

7 Properties of convolution: I out (x) =  I in (y) h(x-y) dy h(x) is called the convolution kernel Linear in both inputs, I in and h Symmetric in its inputs, I in and h Cascading convolutions is convolution with the convolution of the two kernels: (I * h 1 ) * h 2 = I * (h 1 * h 2 ) –Thus cascading of convolution of two Gaussians produces Gaussian with  = (  1 2 +  2 2 ) ½ Any linear, shift invariant operator can be written as a convolution or a limit of one

8 Linear Shift-Invariant Operators Blurring with IRF that is constant over the scene Viewing scene through any fixed aperture All derivatives D –So D(I * h 1 ) = DI * h 1 = I * Dh 1 Designed operations, e.g., for smoothing, noise removal, sharpening, etc. Can be applied to parametrized functions of u –E.g., smoothing surfaces

9 Convolution Equation Notorious flip! For non-causal symmetric impulse responses it doesn’t matter For causal or non-symmetric impulse responses it is critical! Important for relating convolution to correlation Some texts (web sites) reverse the input, don’t do that Reverse the impulse response instead

10 1D Convolution Code Output side algorithm for i indexing y sum = 0 for j indexing h sum += h[j] * x[i-j] y[i] = sum Input side algorithm zero y for i indexing y for j indexing h y[i+j] += x[i]*h[j]

11 Impulse Response

12 Example Impulse Responses

13

14 Derivative of Gaussian Weighting Functions Gaussian: G Barness along u  : G uu Edgeness along u  : G u

15 Properties of Convolution Commutative: a*b = b*a Associative: (a*b)*c = a*(b*c) Distributive: a*b + a*c = a*(b+c) Central Limit Theorem: convolve a pulse with itself enough times you get a Gaussian

16 Properties of convolution, continued For any convolution kernel h(x), if the input I in (x) is a sinusoid with wavelength (level of detail) 1/, i.e., I in (x) = A cos(2  x) + B sin(2  x), then the output of the convolution is a sinusoid with the same wavelength (level of detail), i.e., I in * h = C cos(2  x) + D sin(2  x), for some C and D dependent on A, B, and h(x)

17 Sampling and integration (digital images) Model –Within-pixel integration at all points Has its own IRF, typically rectangular –Then sampling Sampling = multiplication by pixel area  brush function –Brush function is sum of impulses at pixel centers –Sampling = aliasing: in sinusoidal decomposition higher frequency components masquerading as and thus polluting lower frequency components –Nyquist frequency: how finely to sample to have adequately low effect of aliasing

18 Fun with Convolution http://www.eas.asu.edu/~spanias/convolution_demo.htm http://www.isip.msstate.edu/projects/speech/software/demonstration s/applets/util/convolution/current/


Download ppt "Comp 665 Convolution. Questions? Ask here first. Likely someone else has the same question."

Similar presentations


Ads by Google