## Ex 2.1

Moderator: Computer Vision

ampelmann
Erstie
Beiträge: 19
Registriert: 15. Mai 2013 18:20

### Ex 2.1

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

franzel
Erstie
Beiträge: 21
Registriert: 6. Apr 2009 20:22

### Re: Ex 2.1

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

ampelmann
Erstie
Beiträge: 19
Registriert: 15. Mai 2013 18:20

### Re: Ex 2.1

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.

franzel
Erstie
Beiträge: 21
Registriert: 6. Apr 2009 20:22

### Re: Ex 2.1

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

ampelmann
Erstie
Beiträge: 19
Registriert: 15. Mai 2013 18:20

### Re: Ex 2.1

Tank you, I think that helped