[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
|
Functors to Transform Images | ![]() |
Classes | |
| class | BrightnessContrastFunctor< PixelType > |
| Adjust brightness and contrast of an image. More... | |
| class | GammaFunctor< PixelType > |
| Perform gamma correction of an image. More... | |
| class | Threshold< SrcValueType, DestValueType > |
| Threshold an image. More... | |
| class | VectorNormFunctor< ValueType > |
| A functor for computing the vector norm. More... | |
| class | VectorNormSqFunctor< ValueType > |
| A functor for computing the squared vector norm. More... | |
Functions | |
| template<class Multiplier , class DestValueType > | |
| LinearIntensityTransform < DestValueType, Multiplier > | linearIntensityTransform (Multiplier scale, DestValueType offset) |
| Apply a linear transform to the source pixel values. More... | |
| template<class SrcValueType , class DestValueType > | |
| LinearIntensityTransform < DestValueType, typename NumericTraits< DestValueType > ::RealPromote > | linearRangeMapping (SrcValueType src_min, SrcValueType src_max, DestValueType dest_min, DestValueType dest_max) |
| Map a source intensity range linearly to a destination range. More... | |
Note that the unary functors of the STL can also be used in connection with transformImage().
| LinearIntensityTransform<DestValueType, Multiplier> vigra::linearIntensityTransform | ( | Multiplier | scale, |
| DestValueType | offset | ||
| ) |
Apply a linear transform to the source pixel values.
Factory function for a functor that linearly transforms the source pixel values. The functor applies the transform 'destvalue = scale * (srcvalue + offset)' to every pixel. This can, for example, be used to transform images into the visible range 0...255 or to invert an image.
If you leave out the second parameter / offset, you will get an optimized version of the functor which only scales by the given factor, however you have to make the template parameter (pixel type) explicit then.
Traits defined:
FunctorTraits::isUnaryFunctor is true (VigraTrueType)
Declaration:
Usage:
#include <vigra/transformimage.hxx>
Namespace: vigra
The one-parameter version can be used like this:
Required Interface:
The source and destination value types must be models of LinearSpace in both cases.
| LinearIntensityTransform<DestValueType, typename NumericTraits<DestValueType>::RealPromote> vigra::linearRangeMapping | ( | SrcValueType | src_min, |
| SrcValueType | src_max, | ||
| DestValueType | dest_min, | ||
| DestValueType | dest_max | ||
| ) |
Map a source intensity range linearly to a destination range.
Factory function for a functor that linearly transforms the source pixel values. The functor applies the transform 'destvalue = scale * (srcvalue + offset)' to every pixel, where scale = (dest_max - dest_min) / (src_max - src_min) and offset = dest_min / scale - src_min. As a result, the pixel values src_max, src_min in the source image are mapped onto dest_max, dest_min respectively. This works for scalar as well as vector pixel types. Instead of src_min and src_max, you may also pass a functor FindMinMax.
Declaration:
Usage:
#include <vigra/transformimage.hxx>
Namespace: vigra
Required Interface:
The source and destination value types must be models of LinearSpace in both cases.
|
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|