Gaussian Filter Generator

Resolution: x
σ2:

<Comments>
anonymous 11. September 2014
D
anonymous 18. August 2014
The 2 dimensional formul doesn't have a sqrt!
anonymous 26. March 2014
UPDATE - SORRY MY MISTAKE
EVERYTHING IS CORRECT!!

I didn't notice that sigma had to be entered already raised to the power of 2.

Now the values are correct.
Thanks for making this :)
anonymous 26. March 2014
THE KERNELS ARE REALLY INCORRECT!

Try yourself:
σ = 0.84089642
Martix 7x7
Normalized

Top Left value should be:
0.00000067

and is:
0.000004255384675832049

Guess this is only appropriate for demonstration purposes!
anonymous 23. November 2013
This doesn't generate a correct kernel.
anonymous 14. November 2013
Shouldn't the formula for 2 dimensions be without the square root? See http://en.wikipedia.org/wiki/Gaussian_blur

var pow = Math.pow(e, -( (x*x+y*y) / (2*sigmaSqr) ));
var g = ( 1/(2*Math.PI*sigmaSqr) ) * pow;
anonymous 13. November 2013
Thank you for this useful tool.
anonymous 27. September 2013
ffff
Dragonlance 03. August 2013
Good Job!

Just one of my thoughts:

This could be sligtly more efficient if you'd work with sigma instead of sigmaSqrt.
Trading a sqrt and a multiplication against a multiplication.

It would even be a nice idea to give xSquare and ySquare to the function, because x stays same for a lot of calls. This even won't reduce the understandability.

const e = 2.718281828459;
const sqrtTwoPI = 2.506628274631;

function gauss(xSquared, ySquared, sigma){
var pow = Math.pow(e, -( (xSquared + ySquared) / (2*sigma*sigma) ));
var g = ( 1 / (sqrtTwoPI * sigma) ) * pow;
return g;
}

anonymous 23. July 2013
Thank you!! This is extremely useful.
anonymous 26. March 2013
Thank u !!
Anonymous 10. December 2012
{
stuff,
stuff,
stuff, <-- SHOULD NOT HAVE COMMA HERE!
}
anonymous 09. July 2012
Curious results for 4x4 (it shows an truncated 5x5 gaussian kernel)
Dudeson 29. June 2012
Wow! really awesome shit man!
Thx so much for this tool!
matthias 12. June 2012
it has been fixed for firefox
anonymous 11. June 2012
i don't get something generated ?
(firefox 13.0)
anonymous 18. December 2011
Thank you very much for writing this and putting it online!
I found it very handy for my work.
Der Flatulator6 30. October 2011
Nice
Eric 28. October 2011
You have an error:
canvas is not defined - line 67
anonymous 20. August 2011
dd
anonymous 20. August 2011
ok
anonymous 20. August 2011
anonymous 20. August 2011
anonymous 18. August 2011
great! thx!
nikmon 09. August 2011
why does the image look weird?
anonymous 25. July 2011
anonymous 03. June 2011
anonymous 03. May 2011
anonymous 03. May 2011
anonymous 03. May 2011
testing
anonymous 21. April 2011
culo
anonymous 21. April 2011
pito caca :D
anonymous 21. April 2011
poronga :D
anonymous 01. April 2011
could be very useful for image blurring

 

Post a commment:
Name:
Email:
Website:
Message:
Antispambot:insert this number in the textfield on the right (insert the numbers from the image)

All contents © 2011 by Matthias Grumet | www.embege.com