ISIS Application Documentation

## gauss | Standard View | TOC | Home |

Filter a cube through a kernel using Gaussian weight

Description

Categories

Groups

Examples

History

This program calculates weight based on the bell-shaped Gaussian
curve. The weight is then applied to an image kernel in such a way as to
create a filter that will move a weighted average through the image. The
end result is a blurred image with reduced detail and noise. The Gaussian
function that determines the weight for all of the values in the kernel is
as follows

/ x^2+y^2 \ - | ----------- | G(x,y) = 1 \ 2(STDDEV)^2 / --------------- e^ 2(pi)(STDDEV)^2This formula creates a kernel that then runs through the image. The center of the kernel is at (0,0). This means that a 3x3 boxcar will be of the form

The kernel coordinates (-2,-2) (-1,-2) (0,-2) (1,-2) (2,-2) (-2,-1) (-1,-1) (0,-1) (1,-1) (2,-1) (-2, 0) (-1, 0) (0, 0) (1, 0) (2, 0) (-2, 1) (-1, 1) (0, 1) (1, 1) (2, 1) (-2, 2) (-1, 2) (0, 2) (1, 2) (2, 2) The kernel values (approx) 1 4 7 4 1 4 16 26 16 4 7 26 41 26 7 x 1/273 4 16 26 16 4 1 4 7 4 1

Name | Description |
---|---|

FROM | Input cube to be filtered |

TO | Output cube |

Name | Description |
---|---|

SIZE | Size of one side of the boxcar |

Name | Description |
---|---|

STDDEV | Standard Deviation |

Use this parameter to select the filename. All bands within the file will be filtered.

Type | cube |
---|---|

File Mode | input |

Filter | *.cub |

This file will contain the results of the filter, a blurred version of the input file.

Type | cube |
---|---|

File Mode | output |

This is the user specified size of the boxcar that will move through the image. The boxcar must be square, so the default value of 3 will result in a 3 x 3 boxcar. A value of five would result in a 5 x 5 boxcar moving through the image.

Type | integer |
---|---|

Default | 3 |

Odd | This value must be an odd number |

At the most basic level, standard deviation can be thought of in this context as the intensity of the blur being applied to the image. The higher this value, the more noise and detail will be removed. At a deeper level, standard deviation is described as the average distance from any single measurement of a set to the mean of that set.

Type | double |
---|---|

Default | 1.0 |

Minimum | 0 (exclusive) |

Using a 3 x 3 boxcar

This example shows the use of the default standard deviation (1.0) and the
default boxcar size (3). Since the boxcar must be square in this program,
this means that a 3 x 3 boxcar will be used.

This example uses all of the default values specified by the program

Example GUI Screenshot of the GUI with parameters set to perform Gaussian smoothing with a 3 x 3 boxcar. |

Input image before gauss.
Parameter Name:
FROM This is the image as it was taken originally. |

Output image after gauss
Parameter Name:
TO This is the image after the gauss filter. Edges of the image are now much softer. Detail and noise has been removed. |

Using a 5 x 5 boxcar

This example shows the use of a larger standard deviation (2.0) and the
larger boxcar (5). As with the last example, the single value of 5 will
be applied to both the line size and sample size of the boxcar.

This example will create a more dramatic blur, as everything is larger
than in the first example

Example GUI Screenshot of the GUI with parameters set to perform Gaussian smoothing with a 5 x 5 boxcar and 2.0 as the standard deviation. |

Input image before gauss.
Parameter Name:
FROM This is the image as it was taken originally. |

Output image after gauss
Parameter Name:
TO This is the image after the gauss filter. Edges of the image are now much softer. The blur is much more noticeable on account both of the larger boxcar and the larger standard deviation. |

Drew Davidson | 2004-08-05 | Original version |

Drew Davidson | 2004-08-06 | Added application test |

Drew Davidson | 2004-08-16 | Added examples |

Drew Davidson | 2005-06-27 | Fixed bug in boxcar size |

Brendan George | 2006-09-21 | Documentation fixes |

Kaitlyn Lee | 2018-02-15 | Removed the cout that was outputting e to the terminal. Fixes #5198. |