| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
img_filter.cpp File Reference

Library routines used for filtering images. More...

`#include "rwimg.h"`
`#include "img_filter.h"`
`#include "img_histogram.h"`
`#include "Complex.h"`
`#include "Matrix.h"`
`#include "matrix_linear.h"`
`#include "math_util.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
Bimage * | img_average_kernel (Vector3< int > ksize, float value)
| Generates a kernel with a uniform non-zero value. More...
Bimage * | img_gaussian_kernel (Vector3< int > ksize, float sigma, float max)
| Generates a gaussian kernel image. More...
Bimage * | img_gaussian_kernel (float sigma, float max)
Bimage * | img_laplacian_of_gaussian_kernel (Vector3< int > ksize, float sigma, float max)
| Generates a laplacian-of-gaussian kernel. More...
int | img_filter_extremes (Bimage *p, int mod_flag)
| Filters the extremes out of an image. More...
int | img_filter_mg_extremes (Bimage *p)
| Filters the extremes out of a micrograph image. More...

## Variables
int | verbose

## Detailed Description

Library routines used for filtering images.

Author
  Bernard Heymann

Date
  Created: 19990321
  Modified: 20131028

Definition in file img_filter.cpp.

## Function Documentation

Bimage* img_average_kernel | ( | Vector3< int > | ksize,
|  | float | value
| ) |  |

Generates a kernel with a uniform non-zero value.

Parameters

  ksize | kernel size.
  value | uniform kernel value.

Returns
  Bimage* kernel image.

      If the given value is zero or less, the kernel is set to one.

Definition at line 31 of file img_filter.cpp.

int img_filter_extremes | ( | Bimage * | p,
|  | int | mod_flag
| ) |  |

Filters the extremes out of an image.

Parameters

  *p | image.
  mod_flag | modification flag (0=set to avg, 1=set to min_max).

Returns
  int 0.

      A histogram of an image is calculated.  The first minimum in the first
      quarter of the histogram and the last minimum in the last quarter
      are taken to define the small and large outliers.  Pixel outside
      these minima are then either set to average or to minimum or maximum
      (depending on the mod_flag argument) to remove the outliers.

Definition at line 185 of file img_filter.cpp.

int img_filter_mg_extremes | ( | Bimage * | p | ) |

Filters the extremes out of a micrograph image.

Parameters

  *p | image.

Returns
  int 0.

      Segmentation is used to identify large contiguous regions of high
      and low values, and these regions are set to the average.

Definition at line 284 of file img_filter.cpp.

Bimage* img_gaussian_kernel | ( | Vector3< int > | ksize,
|  | float | sigma,
|  | float | max
| ) |  |

Generates a gaussian kernel image.

Parameters

  ksize | kernel size.
  sigma | gaussian width.
  max | kernel maximum.

Returns
  Bimage* kernel image.

Definition at line 57 of file img_filter.cpp.

Bimage* img_gaussian_kernel | ( | float | sigma,
|  | float | max
| ) |  |

Definition at line 100 of file img_filter.cpp.

Bimage* img_laplacian_of_gaussian_kernel | ( | Vector3< int > | ksize,
|  | float | sigma,
|  | float | max
| ) |  |

Generates a laplacian-of-gaussian kernel.

Parameters

  ksize | kernel size.
  sigma | gaussian width.
  max | kernel maximum.

Returns
  Bimage* kernel image.

Definition at line 117 of file img_filter.cpp.

## Variable Documentation

int verbose