Gaussian filter

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(Gaussian filter using OTB)
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
The Gaussian smoothing filter is used for noise reduction and removing details. The filter is similar to the arithmetic mean filter but it uses a different kernel that represents the shape of a 2 dimensional Gaussian distribution.
+
The Gaussian smoothing filter is used for noise reduction and removing details. The filter is similar to the arithmetic mean filter but it uses a different kernel that represents the shape of a 2 dimensional Gaussian distribution which is defined as
<math>G_{2D}(x,y,\sigma)=\frac{1}{\sqrt{2}}</math>
+
<math>G_{2D}(x,y,\sigma)=\frac{1}{\sqrt{2 \pi \sigma^2}}e^{-\frac{x^2+y^2}{2\sigma^2}}</math> where <math>\sigma</math> determines the ''width'' of the kernel.
* In the search engine of the Processing Toolbox, type '''Smoothing''' and select '''Smoothing (gaussian)''' under Image Filtering of the Orfeo Toolbox.
+
== Gaussian filter using OTB ==
* Under the Parameters tab, select a single band or a multiband file as input layer.
+
* In the search engine of the Processing Toolbox, type '''Smoothing''' and select '''Smoothing''' under Image Filtering of the Orfeo Toolbox.
* Select '''gaussian''' from the drop-down list as Smoothing Type.
+
* Under the Parameters tab, select a single band or a multiband file as '''Input Image'''.
* Adjust the '''Radius''' of a circular element in pixel size.
+
* Select '''gaussian''' from the drop-down list as '''Smoothing Type'''.
[[File:Qgis_smooth_gauss.png|400px]]  
+
* Adjust the '''Standard deviation''' to {{typed|text=10}}.
 +
* Maximum kernel width is '''128'''.
 +
* Select '''Output pixel type''' {{button|text=float}}.
 +
* Click {{button|text=Run}}.
 +
 
 +
[[File:Qgis_gaussian_smooth.png|400px]]
 +
 
 +
== Gaussian filter using SAGA ==
 +
* In the search engine of the Processing Toolbox, type '''Gaussian''' and select '''Gaussian filter''' under Raster Filter of SAGA.
 +
* Under the Parameters tab, select a '''single band file''' as Grid.
 +
* Select '''Circle''' from the drop-down list as Search Mode.
 +
* Choose '''1''' as Standard deviation
 +
* Use the '''3''' pixels as Radius.
 +
[[File:Qgis_saga_gaussian.png|400px]]
 
{| class="wikitable"
 
{| class="wikitable"
|style="border: 0pt" | [[file:Qgis_campus_pansharp.png|thumb|left|400px|'''Figure A:''' Input image: pansharpend Sentinel-2 composite (RGB=B7,B6,B5), University Göttingen Campus North]]
+
|style="border: 0pt" | [[file:Qgis_campus_pansharp.png|thumb|left|400px|'''Figure A:''' Input image: Sentinel-2 composite (RGB=B7,B6,B5), University Göttingen Campus North]]
 
|style="border: 0pt" | [[file:Qgis_campus_gaussian.png|thumb|center|400px|'''Figure B:''' Output image: Gaussian filtered Sentinel-2 composite (RGB=B7,B6,B5), University Göttingen Campus North]]
 
|style="border: 0pt" | [[file:Qgis_campus_gaussian.png|thumb|center|400px|'''Figure B:''' Output image: Gaussian filtered Sentinel-2 composite (RGB=B7,B6,B5), University Göttingen Campus North]]
 
|}
 
|}
  
 
[[category:Spatial Filtering]]
 
[[category:Spatial Filtering]]

Latest revision as of 18:59, 14 June 2021

The Gaussian smoothing filter is used for noise reduction and removing details. The filter is similar to the arithmetic mean filter but it uses a different kernel that represents the shape of a 2 dimensional Gaussian distribution which is defined as \(G_{2D}(x,y,\sigma)=\frac{1}{\sqrt{2 \pi \sigma^2}}e^{-\frac{x^2+y^2}{2\sigma^2}}\) where \(\sigma\) determines the width of the kernel.

[edit] Gaussian filter using OTB

  • In the search engine of the Processing Toolbox, type Smoothing and select Smoothing under Image Filtering of the Orfeo Toolbox.
  • Under the Parameters tab, select a single band or a multiband file as Input Image.
  • Select gaussian from the drop-down list as Smoothing Type.
  • Adjust the Standard deviation to 10.
  • Maximum kernel width is 128.
  • Select Output pixel type float.
  • Click Run.

Qgis gaussian smooth.png

[edit] Gaussian filter using SAGA

  • In the search engine of the Processing Toolbox, type Gaussian and select Gaussian filter under Raster Filter of SAGA.
  • Under the Parameters tab, select a single band file as Grid.
  • Select Circle from the drop-down list as Search Mode.
  • Choose 1 as Standard deviation
  • Use the 3 pixels as Radius.

Qgis saga gaussian.png

Figure A: Input image: Sentinel-2 composite (RGB=B7,B6,B5), University Göttingen Campus North
Figure B: Output image: Gaussian filtered Sentinel-2 composite (RGB=B7,B6,B5), University Göttingen Campus North
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export