PixInsight Forum (historical)

PixInsight => General => Topic started by: twade on 2008 January 26 12:15:26

Title: How do you perform a Gaussian Blur?
Post by: twade on 2008 January 26 12:15:26
To all,

I probably should know this, but how does one perform a gaussian blur in PixInsight Standard?  Basically, I'm trying to imitate the Photoshop technique of combining two images, one of short duration and one of long duration, using a blurred mask of the long duration image.  This is a common technique to handle high dynamic targets such as M42.

Once I've created the mask, how do I combine the two images using the mask?  I'm sure I'll be using PixelMath, but I'm unsure of the proper equation.

Thanks,

Wade
Title: How do you perform a Gaussian Blur?
Post by: twade on 2008 January 26 12:33:38
To all,

I figured out how to mimic the Gaussian blur by removing layers in ATrousWaveletTransform.  Now I just have to figure out how to combine the two images using the mask.

Wade
Title: How do you perform a Gaussian Blur?
Post by: Carlos Milovic on 2008 January 26 12:58:27
Hi Wade

We'll implement an advanced Convolutions process, that will incorporate the Gaussian blur. Maybe we'll also write a stand alone process, with other options, but this has not being decided yet.

Anyway, so far using ATrousWavelets is a good way to emulate this. Also you may use ACDNR, or even the Wienner deconvolution with a way too big noise estimation. A more rigorous gaussian blur can be applied with a script... I think that somewhere was the code already wrote by Juan.
Title: Gaussian Blur
Post by: Jack Harvey on 2008 January 26 13:02:56
I mimic it by using Atrous Wavelets and setting the Bias for the first couple of layers to -0.1 to -0.3.
Title: How do you perform a Gaussian Blur?
Post by: Carlos Milovic on 2008 January 26 13:12:42
Hi Jack

For small bluring effects, this is a good way to go. For larger "radius", it is better simply to discard wavelet layers, using the 3x3 or 5x5 Gaussian kernels (I recommend the 5x5 one).
Title: How do you perform a Gaussian Blur?
Post by: twade on 2008 January 26 13:24:28
Carlos and Jack,

Thanks for your help.

I created a pretty good mask by setting the Wavelet Layers to Linear with a value of 6, using a 5x5 Gaussian scaling factor.  I then removed the first 9 layers.  Afterward, I used the clone tool to "paint" the rest of the image to black, leaving only a portion of M42.  I then associated the mask to the long exposure (Select Mask).  Using PixelMath, I added just the short exposure to the Expressions list.  Finally, I dropped the process icon associated with the PixelMath instance onto the long exposure.  This seemed not to work since I got a "duplicate" of the short exposure as the result.  What am I doing wrong?

Thanks,

Wade
Title: How do you perform a Gaussian Blur?
Post by: twade on 2008 January 26 18:20:36
To all,

I finally figured out the formula.  Here it is:

(1-mask)*m42_long+mask*m42_short

I'm not sure why the other technique didn't work (i.e. adding the mask to the long exposure through the Mask menu and using just the short image in a PixelMath instance).

Wade
Title: How do you perform a Gaussian Blur?
Post by: twade on 2008 January 26 19:25:37
To all,

Here's the result of the combination.  Let me know what you think.

2400x2400:
http://tinyurl.com/38g7sl

1600x1600
http://tinyurl.com/2uegsp

Thanks,

Wade
Title: Nice
Post by: Jack Harvey on 2008 January 27 06:26:45
Wow that is a big field of view.  Nice job with the processing!