## gauss: non symmetric support region

Moderator: Computer Vision

Pavel
Windoof-User
Beiträge: 37
Registriert: 21. Okt 2006 23:42

### gauss: non symmetric support region

in other words why is it:

Code: Alles auswählen

x = [floor(-3.0*sigma + 0.5):floor(3.0*sigma + 0.5)];

Code: Alles auswählen

x = [floor(-3.0*sigma - 0.5):floor(3.0*sigma + 0.5)];

diane
Windoof-User
Beiträge: 25
Registriert: 21. Jun 2009 17:33

### Re: gauss: non symmetric support region

In fact, I think that you mean non symmetric formula to define x in the gauss function, but the spatial support which is obtained is symmetric.
This is due to the non-symmetric character of the floor function.
It always extracts the integer part, for instance floor(1.9) = 1
As a consequence, if you want to center the spatial support, you have to add 0.5 before applying the floor function.
We could have used the round function as well.
I encourage you to try to put these 3 lines in the gauss function (without ; at the end of the line, so it will print the values taken by x) and to compare the results.

Code: Alles auswählen

  x = [floor(-3.0*sigma + 0.5):floor(3.0*sigma + 0.5)]
x = [floor(-3.0*sigma - 0.5):floor(3.0*sigma + 0.5)]
x = [round(-3.0*sigma):round(3.0*sigma)]
Hope this is clearer !