Seite **1** von **1**

### Ex 2.1

Verfasst: **10. Jun 2013 13:46**

von **ampelmann**

Hello, I have a short question on the make_gauss_filter task: For an odd filter size, I work (i.e. in x direction) with (-1 0 1) in case of col = 3. However, what do I do in case of an even filter size? i.e. for col = 4, would I use (-2 -1 1 2)?

Appreciate any hints (i.e. where in the slides to find this...)

Cheers, Henriette

### Re: Ex 2.1

Verfasst: **10. Jun 2013 14:01**

von **franzel**

Hi,

i'm not really sure why you write the first derivative (central difference) there. You are supposed to create a isotropic gaussian as depicted in lecture 3 slide 17.

Think about the goal that we try to achieve here and what the actual purpose for convolution with a gaussian filter is. I hope this helps.

~Thorsten

### Re: Ex 2.1

Verfasst: **10. Jun 2013 18:06**

von **ampelmann**

Well but I need some "basic" matrix I can apply this formula on, don't I? Where else do I get my x and y values from?! So I take the symmetric values round the middle of the size of each direction as if I were in the center of some coordination-system. I use a meshgrid-approach.

### Re: Ex 2.1

Verfasst: **10. Jun 2013 18:40**

von **franzel**

Hi,

i'm soory i obviously didn't get where you were coming from exactly. So yes you could solve this with a vector (-1,0,1) for a filter with size 3. However you are note quite right with your solution for filter size 4. This is obviously not equally spaced.

Think about a grid of pixels (5x5). Where is the center, when the filter size is odd? Now take a 4x4 grid. Where is it when the size is even? And from there you go over the grid in steps of one.

Using meshgrid is good idea

Regards,

Thorsten

### Re: Ex 2.1

Verfasst: **12. Jun 2013 16:19**

von **ampelmann**

Tank you, I think that helped