Post Reply 

standard deviation for Gaussian Blur

Apr 1, 2012, 14:27
Post: #1
standard deviation for Gaussian Blur
Hello,

for a project Im working on I need to be able to calculate the Standard Deviation from the Gaussian Blur function used in Gimp. How do I calculate (or how does GIMP calculate the standard dev) when I blur an image with say.. 10 pixels x 10 pixels blur radius.

Thanks!
Find all posts by this user
Quote this message in a reply
Apr 1, 2012, 16:29 (This post was last modified: Apr 1, 2012 16:32 by ofnuts.)
Post: #2
RE: standard deviation for Gaussian Blur
(Apr 1, 2012 14:27)Cookiemonster Wrote:  Hello,

for a project Im working on I need to be able to calculate the Standard Deviation from the Gaussian Blur function used in Gimp. How do I calculate (or how does GIMP calculate the standard dev) when I blur an image with say.. 10 pixels x 10 pixels blur radius.

Thanks!
Get one of the source tarball from here: ftp://ftp.gimp.org/pub/gimp/v2.6/. It's all in plug-ins/common/blur-gauss.c

basically it seems they use:
Code:
std_dev = sqrt (-(vert * vert) / (2 * log (1.0 / 255.0)));

(and likewise for horizontal) where "vert" is the value entered in the dialog for vertical blur.

You can join the Gimp developers mailing list where you'll get more informed answers.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Apr 3, 2012, 13:41
Post: #3
RE: standard deviation for Gaussian Blur
Thanks! The standard Dev seems okay when I calculate it using this formula and the pixels I specified. I was wondering if there might be another formula between pixels and vert though, because GIMP also allows you to specify the radius in cm/mm or inch. Ive found vert = fabs (vert) + 1.0; on another website, but I don't really know what that means.. I ll also ask on the developer mailing list.

Cookiemonster.
Find all posts by this user
Quote this message in a reply
Apr 3, 2012, 15:04
Post: #4
RE: standard deviation for Gaussian Blur
(Apr 3, 2012 13:41)Cookiemonster Wrote:  Thanks! The standard Dev seems okay when I calculate it using this formula and the pixels I specified. I was wondering if there might be another formula between pixels and vert though, because GIMP also allows you to specify the radius in cm/mm or inch. Ive found vert = fabs (vert) + 1.0; on another website, but I don't really know what that means.. I ll also ask on the developer mailing list.

Cookiemonster.
An image in Gimp as a "print resolution" in pixels/inch (or pixels/cm) which is also used for conversions of measures between inch/cm and pixels

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Focus blur caz 6 605 Jul 16, 2014 17:16
Last Post: caz
  Batch process with blur on single layer in image uzzors2k 6 915 Dec 14, 2012 13:52
Last Post: uzzors2k
  script-fu select from path, gaussian blur, remove active path mark 6 1,687 Sep 18, 2012 09:39
Last Post: ofnuts

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS