You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 3: Sampling and Aliasing (51)
dhruvswarup123

Why is the convoluted result here the same size as the input array? Shouldn't the convolution start by overlapping the whole filter on the image and convolving the result to the "center pixel"? That way, I think for this case, the output should have been 8 elements wide.

Staffajayjain

Good question @dhruvswarup123. This comes down to edge effects and I believe it's simplified on this slide. To keep the same size result, the filter can wrap around the edge of the signal, also called a Circular Convolution. The signal could also be zero padded on the edges.

wangjim19

That's really interesting, @ajayjain. I'm familiar with convolutions from machine learning, and I know that generally people will zero-pad to keep the size the same. However, it seems like different types of padding will have different effects. Seems like zero padding will make the edges less intense. I've also heard of techniques like duplicating the edge values when padding. I'm wondering when different padding methods are used, and what the effects of each one are?

xgao0613

I feel like duplicating the edge values for the convolution should produce a picture more similar to the original one because zero-padding often seems to give the picture a visible "border" due to the large difference between zero and the edge value.

You must be enrolled in the course to comment