Hi,
I do not kown how to set the parameter when I use the gaussian blur filter in Figi(Image J 1.49m) . In the guide, it has said that “Sigma is the radius of decay to e − 0.5 (≈61%), i.e., the standard deviation (σ) of the Gaussian (this is the same as in Adobe®Photoshop®, but different from ImageJ versions till 1.38q, in which radius was 2.5 × σ “. At the same time, I have found a letter, that you send to a user named Jarek in 4 May 2007, written that “With ImageJ 1.38r, you have to enter the standard deviation directly, and ImageJ will calculate an appropriate kernel size.”.So, is the kernelradius equal to sigma with the Image J 1.47m? i.e. if I enter 1 as the value ofthe standard deviation sigma,that the kernel radius is equal to 1 pixel too,and have a 3x3 kernel. How toset this parameter in the new version? Please,any suggestions? Anything will be greatly appreciate. Thankyou very much. Warm regards, Ting Xu School of stomatologyWuhan universityPR China Email: [hidden email] -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Ting,
in theory the kernel size of a Gaussian is infinite, because the function never reaches exactly zero. In practice, the Gaussian decays rather quickly so one can have a finite kernel of about 3-4 standard deviations (approx. 3-4 sigma) in radius, and the error is already very low. This finite kernel size used for the calculation is sometimes called "support size". In ImageJ, the size of the kernel actually used depends on the accuracy needed: With sigma=1, for 16-bit and float images the kernel is 9 pixels wide (which gives 9x9 for a 2D image), but for 8-bit or RGB images is is only 7 pixels wide because there is no need for a very high accuracy if there are only 256 different values. For large values of sigma, the situation is more complex: For sigma >=8, the data are first downscaled, then the Gaussian Blur is applied, and interpolation is used for upscaling to the original number of data points. The downscaling and interpolation algorithms are specially designed for best accuracy. E.g. for a 32-bit (floating-point) image and sigma=8.1, the kernel is essentially exact within the floating-point accuracy in a width of 63 pixels up to a distance of 31 pixels). The largest deviation from the exact value of the Gaussian is at a distance of 34 pixels; it is roughly 10^-4 of the peak value. For practical purposes, don't care about the size of the kernel; the result that ImageJ delivers is almost the same as you would get with the full accuracy of an infinite kernel. Just care about the standard deviation sigma. As a rule of thumb, if you blur an image with a standard deviation of sigma, two small separate features of equal brightness must have a distance of 2 sigma or more to remain discernible as separate features after blurring. Michael ____________________________________________________________________ On Sat, January 31, 2015 10:26, Ting Xu wrote: > Hi, > I do not kown how to set the parameter when I use the gaussian blur filter > in Figi(Image J 1.49m) . In the guide, it has said that âSigma is the > radius of decay to eâ ââ 0.5 (â61%), i.e., the standard deviation > (Ï) of the Gaussian (this is the same as in Adobe®Photoshop®, but > different from ImageJ versions till 1.38q, in which radius was > 2.5â Ãâ Ï â.  At the same time, I have found a letter, that you > send to a user named Jarek in 4 May 2007, written that âWith ImageJ > 1.38r, you have to enter the standard deviation directly, and ImageJ will > calculate an appropriate kernel size.â.So, is the kernelradius equal to > sigma with the Image J 1.47m? i.e. if I enter 1 as the value ofthe > standard deviation sigma,that the kernel radius is equal to 1 pixel > too,and have a 3x3 kernel. > > > How toset this parameter in the new version? > > >  > Please,any suggestions? Anything will be greatly appreciate. > > Thankyou very much. Warm regards, > > Ting Xu > School of stomatologyWuhan universityPR China > Email: [hidden email] > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Michael,
Thanks for your suggestion! Up to now, I have being study on the relation ship between sigma and radius for a long time . In one research article,the author adjusted the Gaussian window kernel (four pixels for 1um resolution and one pixel for 4um resolution to maintain the grayscale histogram range equivalent between resolution). I'm not a specialist on image processing. So, There is a question I want to know that 4 or 1 pixel in that article means what(sigma or radius). The result may influence on my research. Ting, With kind regards, 发自我的 iPhone > 在 2015年2月1日,上午3:22,Michael Schmid <[hidden email]> 写道: > > Hi Ting, > > in theory the kernel size of a Gaussian is infinite, because the function > never reaches exactly zero. In practice, the Gaussian decays rather > quickly so one can have a finite kernel of about 3-4 standard deviations > (approx. 3-4 sigma) in radius, and the error is already very low. This > finite kernel size used for the calculation is sometimes called "support > size". > > In ImageJ, the size of the kernel actually used depends on the accuracy > needed: With sigma=1, for 16-bit and float images the kernel is 9 pixels > wide (which gives 9x9 for a 2D image), but for 8-bit or RGB images is is > only 7 pixels wide because there is no need for a very high accuracy if > there are only 256 different values. > > For large values of sigma, the situation is more complex: For sigma >=8, > the data are first downscaled, then the Gaussian Blur is applied, and > interpolation is used for upscaling to the original number of data points. > The downscaling and interpolation algorithms are specially designed for > best accuracy. > E.g. for a 32-bit (floating-point) image and sigma=8.1, the kernel is > essentially exact within the floating-point accuracy in a width of 63 > pixels up to a distance of 31 pixels). The largest deviation from the > exact value of the Gaussian is at a distance of 34 pixels; it is roughly > 10^-4 of the peak value. > > For practical purposes, don't care about the size of the kernel; the > result that ImageJ delivers is almost the same as you would get with the > full accuracy of an infinite kernel. > > Just care about the standard deviation sigma. > > As a rule of thumb, if you blur an image with a standard deviation of > sigma, two small separate features of equal brightness must have a > distance of 2 sigma or more to remain discernible as separate features > after blurring. > > Michael > > ____________________________________________________________________ > >> On Sat, January 31, 2015 10:26, Ting Xu wrote: >> Hi, >> I do not kown how to set the parameter when I use the gaussian blur filter >> in Figi(Image J 1.49m) . In the guide, it has said that “Sigma is the >> radius of decay to e − 0.5 (≈61%), i.e., the standard deviation >> (σ) of the Gaussian (this is the same as in Adobe®Photoshop®, but >> different from ImageJ versions till 1.38q, in which radius was >> 2.5 × σ “.  At the same time, I have found a letter, that you >> send to a user named Jarek in 4 May 2007, written that “With ImageJ >> 1.38r, you have to enter the standard deviation directly, and ImageJ will >> calculate an appropriate kernel size.â€.So, is the kernelradius equal to >> sigma with the Image J 1.47m? i.e. if I enter 1 as the value ofthe >> standard deviation sigma,that the kernel radius is equal to 1 pixel >> too,and have a 3x3 kernel. >> >> >> How toset this parameter in the new version? >> >> >>  >> Please,any suggestions? Anything will be greatly appreciate. >> >> Thankyou very much. Warm regards, >> >> Ting Xu >> School of stomatologyWuhan universityPR China >> Email: [hidden email] >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Ting,
as I said, don't care about the radius of the kernel, it does not matter for practical purposes. Taking a sigma of 4 pixels for 1 um resolution and 1 pixel for 4 um resolution means that the sigma value is simply 4 um in both cases. If your image is spatially calibrated (Analyze>Set Scale), in ImageJ you can directly enter the sigma in scaled units (there is a checkbox 'scaled units'). The recipe you mention (blur with 1 pxl for 4 um resolution, 4 pxl for 1 um resolution) makes sense only if the radius mentioned is the sigma, not the kernel size. It is meant to create images with similar resolution in um, independent on what the resolution of the original was. If course, this approach works only if the image with the lowest resolution is clearly sharper before the Gaussian blur than afterwards, otherwise it is the image, not the Gaussian blur that determines the resolution. If the image does not get obviously blurred, one has to use a larger sigma (in um) for all images. Michael ______________________________________________________________ On Sun, February 1, 2015 01:58, celine wrote: > Hi Michael, > Thanks for your suggestion! > Up to now, I have being study on the relation ship between sigma and > radius for a long time . In one research article,the author adjusted the > Gaussian window kernel (four pixels for 1um resolution and one pixel for > 4um resolution to maintain the grayscale histogram range equivalent > between resolution). > I'm not a specialist on image processing. > So, There is a question I want to know that 4 or 1 pixel in that article > means what(sigma or radius). > The result may influence on my research. > > Ting, > With kind regards, > > > åèªæç iPhone > >> å¨ 2015å¹´2æ1æ¥ï¼ä¸å3:22ï¼Michael Schmid >> <[hidden email]> åéï¼ >> >> Hi Ting, >> >> in theory the kernel size of a Gaussian is infinite, because the >> function >> never reaches exactly zero. In practice, the Gaussian decays rather >> quickly so one can have a finite kernel of about 3-4 standard deviations >> (approx. 3-4 sigma) in radius, and the error is already very low. This >> finite kernel size used for the calculation is sometimes called "support >> size". >> >> In ImageJ, the size of the kernel actually used depends on the accuracy >> needed: With sigma=1, for 16-bit and float images the kernel is 9 >> pixels >> wide (which gives 9x9 for a 2D image), but for 8-bit or RGB images is is >> only 7 pixels wide because there is no need for a very high accuracy if >> there are only 256 different values. >> >> For large values of sigma, the situation is more complex: For sigma >=8, >> the data are first downscaled, then the Gaussian Blur is applied, and >> interpolation is used for upscaling to the original number of data >> points. >> The downscaling and interpolation algorithms are specially designed for >> best accuracy. >> E.g. for a 32-bit (floating-point) image and sigma=8.1, the kernel is >> essentially exact within the floating-point accuracy in a width of 63 >> pixels up to a distance of 31 pixels). The largest deviation from the >> exact value of the Gaussian is at a distance of 34 pixels; it is roughly >> 10^-4 of the peak value. >> >> For practical purposes, don't care about the size of the kernel; the >> result that ImageJ delivers is almost the same as you would get with the >> full accuracy of an infinite kernel. >> >> Just care about the standard deviation sigma. >> >> As a rule of thumb, if you blur an image with a standard deviation of >> sigma, two small separate features of equal brightness must have a >> distance of 2 sigma or more to remain discernible as separate features >> after blurring. >> >> Michael >> >> ____________________________________________________________________ >> >>> On Sat, January 31, 2015 10:26, Ting Xu wrote: >>> Hi, >>> I do not kown how to set the parameter when I use the gaussian blur >>> filter >>> in Figi(Image J 1.49m) . In the guide, it has said that ââ¬ÅSigmaà >>> is the >>> radius of decay toà eââ¬â¦Ã¢Ëâââ¬â¦0.5à (ââ°Ë61%), i.e., >>> the standard deviation >>> (ÃÆ) of the Gaussian (this is the same as in AdobeîPhotoshopî, >>> but >>> different from ImageJ versions till 1.38q, in whichà radiusà was >>> 2.5ââ¬â¦Ãâââ¬â¦ÃÆà ââ¬Å. à At the same time, I have >>> found a letter, that you >>> send to a user named Jarek in 4 May 2007, written that ââ¬ÅWith >>> ImageJ >>> 1.38r, you have to enter the standard deviation directly, and ImageJ >>> will >>> calculate an appropriate kernel size.ââ¬Â.So, is the kernelradius >>> equal to >>> sigma with the Image J 1.47m? i.e. if I enter 1 as the value ofthe >>> standard deviation sigma,that the kernel radius is equal to 1 pixel >>> too,and have a 3x3 kernel. >>> >>> >>> How toset this parameter in the new version? >>> >>> >>> à >>> Please,any suggestions? Anything will be greatly appreciate. >>> >>> Thankyou very much. Warm regards, >>> >>> Ting Xu >>> School of stomatologyWuhan universityPR China >>> Email: [hidden email] >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |