[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| Noise Normalization |

## Classes

class | NoiseNormalizationOptions
| Pass options to one of the noise normalization functions. More...

## Functions

template<... >
bool | linearNoiseNormalization (...)
| Noise normalization by means of an estimated or given linear noise model. More...
template<... >
void | noiseVarianceClustering (...)
| Determine the noise variance as a function of the image intensity and cluster the results. More...
template<... >
void | noiseVarianceEstimation (...)
| Determine the noise variance as a function of the image intensity. More...
template<... >
bool | nonparametricNoiseNormalization (...)
| Noise normalization by means of an estimated non-parametric noise model. More...
template<... >
bool | quadraticNoiseNormalization (...)
| Noise normalization by means of an estimated or given quadratic noise model. More...

## Detailed Description

Estimate noise with intensity-dependent variance and transform it into additive Gaussian noise.

## Function Documentation

void vigra::noiseVarianceEstimation | ( |  | ... | ) |

Determine the noise variance as a function of the image intensity.

This operator applies an algorithm described in

W. Förstner: "Image Preprocessing for Feature Extraction in Digital Intensity, Color and Range Images", Proc. Summer School on Data Analysis and the Statistical Foundations of Geomatics, Lecture Notes in Earth Science, Berlin: Springer, 1999

in order to estimate the noise variance as a function of the image intensity in a robust way, i.e. so that intensity changes due to edges do not bias the estimate. The source value type (`SrcAccessor::value_type`) must be a scalar type which is convertible to `double`. The result is written into the result sequence, whose `value_type` must be constructible from two `double` values. The following options can be set via the options object (see vigra::NoiseNormalizationOptions for details):

`useGradient`, `windowRadius`, `noiseEstimationQuantile`, `noiseVarianceInitialGuess`

Declarations:

pass 2D array views:

namespace vigra {
template <class T1, class S1, class BackInsertable>
void
noiseVarianceEstimation(MultiArrayView<2, T1, S1> const & src,
BackInsertable & result,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}

show deprecated declarations

pass Image Iterators and Data Accessors :
namespace vigra {
template <class SrcIterator, class SrcAccessor, class BackInsertable>
void noiseVarianceEstimation(SrcIterator sul, SrcIterator slr, SrcAccessor src,
BackInsertable & result,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}
use argument objects in conjunction with Argument Object Factories :
namespace vigra {
template <class SrcIterator, class SrcAccessor, class BackInsertable>
void noiseVarianceEstimation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
BackInsertable & result,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}

Usage:

#include <vigra/noise_normalization.hxx>
Namespace: vigra

MultiArray<2, float> src(w,h);
std::vector<TinyVector<double, 2> > result;
...
noiseVarianceEstimation(src, result,
NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0));
// print the intensity / variance pairs found
for(int k=0; k<result.size(); ++k)
std::cout << "Intensity: " << result[k][0] << ", estimated variance: " << result[k][1] << std::endl;

show deprecated examples

vigra::BImage src(w,h);
std::vector<vigra::TinyVector<double, 2> > result;
...
vigra::noiseVarianceEstimation(srcImageRange(src), result,
vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0));
// print the intensity / variance pairs found
for(int k=0; k<result.size(); ++k)
std::cout << "Intensity: " << result[k][0] << ", estimated variance: " << result[k][1] << std::endl;
Required Interface:
SrcIterator upperleft, lowerright;
SrcAccessor src;
typedef SrcAccessor::value_type SrcType;
typedef NumericTraits<SrcType>::isScalar isScalar;
assert(isScalar::asBool == true);
double value = src(uperleft);
BackInsertable result;
typedef BackInsertable::value_type ResultType;
double intensity, variance;
result.push_back(ResultType(intensity, variance));

void vigra::noiseVarianceClustering | ( |  | ... | ) |

Determine the noise variance as a function of the image intensity and cluster the results.

This operator first calls noiseVarianceEstimation() to obtain a sequence of intensity/variance pairs, which are then clustered using the median cut algorithm. Then the cluster centers (i.e. average variance vs. average intensity) are determined and returned in the result sequence.

In addition to the options valid for noiseVarianceEstimation(), the following options can be set via the options object (see vigra::NoiseNormalizationOptions for details):

`clusterCount`, `averagingQuantile`

Declarations:

pass 2D array views:

namespace vigra {
template <class T1, class S1, class BackInsertable>
void
noiseVarianceClustering(MultiArrayView<2, T1, S1> const & src,
BackInsertable & result,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}

show deprecated declarations

pass Image Iterators and Data Accessors :
namespace vigra {
template <class SrcIterator, class SrcAccessor, class BackInsertable>
void noiseVarianceClustering(SrcIterator sul, SrcIterator slr, SrcAccessor src,
BackInsertable & result,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}
use argument objects in conjunction with Argument Object Factories :
namespace vigra {
template <class SrcIterator, class SrcAccessor, class BackInsertable>
void noiseVarianceClustering(triple<SrcIterator, SrcIterator, SrcAccessor> src,
BackInsertable & result,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}

Usage:

#include <vigra/noise_normalization.hxx>
Namespace: vigra

MultiArray<2, float> src(w,h);
std::vector<TinyVector<double, 2> > result;
...
noiseVarianceClustering(src, result,
NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
// print the intensity / variance pairs representing the cluster centers
for(int k=0; k<result.size(); ++k)
std::cout << "Cluster: " << k << ", intensity: " << result[k][0] << ", estimated variance: " << result[k][1] << std::endl;

show deprecated examples

vigra::BImage src(w,h);
std::vector<vigra::TinyVector<double, 2> > result;
...
vigra::noiseVarianceClustering(srcImageRange(src), result,
vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
// print the intensity / variance pairs representing the cluster centers
for(int k=0; k<result.size(); ++k)
std::cout << "Cluster: " << k << ", intensity: " << result[k][0] << ", estimated variance: " << result[k][1] << std::endl;
Required Interface: same as noiseVarianceEstimation()

bool vigra::nonparametricNoiseNormalization | ( |  | ... | ) |

Noise normalization by means of an estimated non-parametric noise model.

The original image is assumed to be corrupted by noise whose variance depends on the intensity in an unknown way. The present functions first calls noiseVarianceClustering() to obtain a sequence of intensity/variance pairs (cluster centers) which estimate this dependency. The cluster centers are connected into a piecewise linear function which is the inverted according to the formula derived in

W. Förstner: "Image Preprocessing for Feature Extraction in Digital Intensity, Color and Range Images", Proc. Summer School on Data Analysis and the Statistical Foundations of Geomatics, Lecture Notes in Earth Science, Berlin: Springer, 1999

The inverted formula defines a pixel-wise intensity transformation whose application turns the original image into one that is corrupted by additive Gaussian noise with unit variance. Most subsequent algorithms will be able to handle this type of noise much better than the original noise.

RGB and other multiband images will be processed one band at a time. The function returns `true` on success. Noise normalization will fail if the original image does not contain sufficiently homogeneous regions that allow robust estimation of the noise variance.

The options object may use all options described in vigra::NoiseNormalizationOptions.

The function returns `false` if the noise estimation failed, so that no normalization could be performed.

Declarations:

pass 2D array views:

namespace vigra {
template <class T1, class S1,
class T2, class S2>
bool
nonparametricNoiseNormalization(MultiArrayView<2, T1, S1> const & src,
MultiArrayView<2, T2, S2> dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}

show deprecated declarations

pass Image Iterators and Data Accessors :
namespace vigra {
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
bool nonparametricNoiseNormalization(SrcIterator sul, SrcIterator slr, SrcAccessor src,
DestIterator dul, DestAccessor dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}
use argument objects in conjunction with Argument Object Factories :
namespace vigra {
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
bool nonparametricNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src,
pair<DestIterator, DestAccessor> dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
}

Usage:

#include <vigra/noise_normalization.hxx>
Namespace: vigra

MultiArray<2, RGBValue<float> > src(w,h), dest(w, h);
...
nonparametricNoiseNormalization(src, dest,
NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));

show deprecated examples

vigra::BRGBImage src(w,h), dest(w, h);
...
vigra::nonparametricNoiseNormalization(srcImageRange(src), destImage(dest),
vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
Required Interface: same as noiseVarianceEstimation()

bool vigra::quadraticNoiseNormalization | ( |  | ... | ) |

Noise normalization by means of an estimated or given quadratic noise model.

This function works like nonparametricNoiseNormalization() excapt that the model for the dependency between intensity and noise variance is assumed to be a quadratic function rather than a piecewise linear function. If the data conform to the quadratic model, this leads to a somewhat smoother transformation. The function returns `false` if the noise estimation failed, so that no normalization could be performed.

In the second variant of the function, the parameters of the quadratic model are not estimated, but explicitly given according to:

variance = a0 + a1 * intensity + a2 * sq(intensity)

Declarations:

pass 2D array views:

namespace vigra {
// estimate and apply a quadratic noise model
template <class T1, class S1,
class T2, class S2>
bool
quadraticNoiseNormalization(MultiArrayView<2, T1, S1> const & src,
MultiArrayView<2, T2, S2> dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
// apply a given quadratic noise model
template <class T1, class S1,
class T2, class S2>
void
quadraticNoiseNormalization(MultiArrayView<2, T1, S1> const & src,
MultiArrayView<2, T2, S2> dest,
double a0, double a1, double a2);
}

show deprecated declarations

pass Image Iterators and Data Accessors :
namespace vigra {
// estimate and apply a quadratic noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
bool quadraticNoiseNormalization(SrcIterator sul, SrcIterator slr, SrcAccessor src,
DestIterator dul, DestAccessor dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
// apply a given quadratic noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
void quadraticNoiseNormalization(SrcIterator sul, SrcIterator slr, SrcAccessor src,
DestIterator dul, DestAccessor dest,
double a0, double a1, double a2);
}
use argument objects in conjunction with Argument Object Factories :
namespace vigra {
// estimate and apply a quadratic noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
bool quadraticNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src,
pair<DestIterator, DestAccessor> dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
// apply a given quadratic noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
void quadraticNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src,
pair<DestIterator, DestAccessor> dest,
double a0, double a1, double a2);
}

Usage:

#include <vigra/noise_normalization.hxx>
Namespace: vigra

MultiArray<2, RGBValue<float> > src(w,h), dest(w, h);
...
// estimate the noise model and apply it to normalize the noise variance
bool success = quadraticNoiseNormalization(src, dest,
NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
vigra_postcondition(success, "quadraticNoiseNormalization(): Unable to estimate noise model.");
// apply a pre-computed noise model
quadraticNoiseNormalization(src, dest, 100, 0.02, 1e-6);

show deprecated examples

vigra::BRGBImage src(w,h), dest(w, h);
...
// estimate the noise model and apply it to normalize the noise variance
vigra::quadraticNoiseNormalization(srcImageRange(src), destImage(dest),
vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
// apply a pre-computed noise model
vigra::quadraticNoiseNormalization(srcImageRange(src), destImage(dest),
100, 0.02, 1e-6);

Required Interface:

The source value type must be convertible to `double` or must be a vector whose elements are convertible to `double`. Likewise, the destination type must be assignable from `double` or a vector whose elements are assignable from `double`.

bool vigra::linearNoiseNormalization | ( |  | ... | ) |

Noise normalization by means of an estimated or given linear noise model.

This function works like nonparametricNoiseNormalization() excapt that the model for the dependency between intensity and noise variance is assumed to be a linear function rather than a piecewise linear function. If the data conform to the linear model, this leads to a very simple transformation which is similar to the familiar gamma correction. The function returns `false` if the noise estimation failed, so that no normalization could be performed.

In the second variant of the function, the parameters of the linear model are not estimated, but explicitly given according to:

variance = a0 + a1 * intensity

Declarations:

pass 2D array views:

namespace vigra {
// estimate and apply a linear noise model
template <class T1, class S1,
class T2, class S2>
bool
linearNoiseNormalization(MultiArrayView<2, T1, S1> const & src,
MultiArrayView<2, T2, S2> dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
// apply a given linear noise model
template <class T1, class S1,
class T2, class S2>
void
linearNoiseNormalization(MultiArrayView<2, T1, S1> const & src,
MultiArrayView<2, T2, S2> dest,
double a0, double a1);
}

show deprecated declarations

pass Image Iterators and Data Accessors :
namespace vigra {
// estimate and apply a linear noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
bool linearNoiseNormalization(SrcIterator sul, SrcIterator slr, SrcAccessor src,
DestIterator dul, DestAccessor dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
// apply a given linear noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
void linearNoiseNormalization(SrcIterator sul, SrcIterator slr, SrcAccessor src,
DestIterator dul, DestAccessor dest,
double a0, double a1);
}
use argument objects in conjunction with Argument Object Factories :
namespace vigra {
// estimate and apply a linear noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
bool linearNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src,
pair<DestIterator, DestAccessor> dest,
NoiseNormalizationOptions const & options = NoiseNormalizationOptions());
// apply a given linear noise model
template <class SrcIterator, class SrcAccessor,
class DestIterator, class DestAccessor>
void linearNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src,
pair<DestIterator, DestAccessor> dest,
double a0, double a1);
}

Usage:

#include <vigra/noise_normalization.hxx>
Namespace: vigra

vigra::BRGBImage src(w,h), dest(w, h);
...
// estimate the noise model and apply it to normalize the noise variance
bool success = linearNoiseNormalization(src, dest,
NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
vigra_postcondition(success, "linearNoiseNormalization(): Unable to estimate noise model.");
// apply a pre-computed noise model
linearNoiseNormalization(src, dest, 100, 0.02);

show deprecated examples

vigra::BRGBImage src(w,h), dest(w, h);
...
// estimate the noise model and apply it to normalize the noise variance
vigra::linearNoiseNormalization(srcImageRange(src), destImage(dest),
vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0).
clusterCount(15));
// apply a pre-computed noise model
vigra::linearNoiseNormalization(srcImageRange(src), destImage(dest),
100, 0.02);

Required Interface:

The source value type must be convertible to `double` or must be a vector whose elements are convertible to `double`. Likewise, the destination type must be assignable from `double` or a vector whose elements are assignable from `double`.

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.10.0