[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Classes | |
class | NoiseNormalizationOptions |
Pass options to one of the noise normalization functions. More... | |
Functions | |
template<... > | |
bool | linearNoiseNormalization (...) |
Noise normalization by means of an estimated linear noise model. | |
template<... > | |
void | noiseVarianceClustering (...) |
Determine the noise variance as a function of the image intensity and cluster the results. | |
template<... > | |
void | noiseVarianceEstimation (...) |
Determine the noise variance as a function of the image intensity. | |
template<... > | |
bool | nonparametricNoiseNormalization (...) |
Noise normalization by means of an estimated non-parametric noise model. | |
template<... > | |
bool | quadraticNoiseNormalization (...) |
Noise normalization by means of an estimated quadratic noise model. |
Estimate noise with intensity-dependent variance and transform it into additive Gaussian noise.
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 arguments explicitly:
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
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 arguments explicitly:
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
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.
Declarations:
pass arguments explicitly:
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
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()
void quadraticNoiseNormalization | ( | ... | ) |
Noise normalization by means of an estimated quadratic noise model.
Noise normalization by means of a given quadratic noise model.
This function works in the same way as nonparametricNoiseNormalization() with the exception of the model for the dependency between intensity and noise variance: it assumes that this dependency is a quadratic function rather than a piecewise linear function. If the quadratic model is applicable, it leads to a somewhat smoother transformation.
Declarations:
pass arguments explicitly:
namespace vigra { 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()); }
use argument objects in conjunction with Argument Object Factories :
namespace vigra { template <class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor> bool quadraticNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src, pair<DestIterator, DestAccessor> dest, NoiseNormalizationOptions const & options = NoiseNormalizationOptions()); }
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
vigra::BRGBImage src(w,h), dest(w, h); ... vigra::quadraticNoiseNormalization(srcImageRange(src), destImage(dest), vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0). clusterCount(15));
Required Interface:
same as noiseVarianceEstimation()
This function works similar to nonparametricNoiseNormalization() with the exception that the functional dependency of the noise variance from the intensity is given (by a quadratic function) rather than estimated:
variance = a0 + a1 * intensity + a2 * sq(intensity)
Declarations:
pass arguments explicitly:
namespace vigra { 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 { 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
vigra::BRGBImage src(w,h), dest(w, h); ... 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
.
void linearNoiseNormalization | ( | ... | ) |
Noise normalization by means of an estimated linear noise model.
Noise normalization by means of a given linear noise model.
This function works in the same way as nonparametricNoiseNormalization() with the exception of the model for the dependency between intensity and noise variance: it assumes that this dependency is a linear function rather than a piecewise linear function. If the linear model is applicable, it leads to a very simple transformation which is similar to the familiar gamma correction.
Declarations:
pass arguments explicitly:
namespace vigra { 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()); }
use argument objects in conjunction with Argument Object Factories :
namespace vigra { template <class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor> bool linearNoiseNormalization(triple<SrcIterator, SrcIterator, SrcAccessor> src, pair<DestIterator, DestAccessor> dest, NoiseNormalizationOptions const & options = NoiseNormalizationOptions()); }
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
vigra::BRGBImage src(w,h), dest(w, h); ... vigra::linearNoiseNormalization(srcImageRange(src), destImage(dest), vigra::NoiseNormalizationOptions().windowRadius(9).noiseVarianceInitialGuess(25.0). clusterCount(15));
Required Interface:
same as noiseVarianceEstimation()
This function works similar to nonparametricNoiseNormalization() with the exception that the functional dependency of the noise variance from the intensity is given (as a linear function) rather than estimated:
variance = a0 + a1 * intensity
Declarations:
pass arguments explicitly:
namespace vigra { 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 { 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); ... 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) |
html generated using doxygen and Python
|