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

details Algorithms to Combine Images VIGRA

Functions

template<... >
void combineThreeImages (...)
 Combine three source images into destination image. More...
 
template<... >
void combineTwoImages (...)
 Combine two source images into destination image. More...
 
template<... >
void combineTwoImagesIf (...)
 Combine ROI of two source images into destination image. More...
 

Detailed Description

Apply functor to calculate a pixelwise transformation depending on multiple images. Note that the binary functors of the STL may be used with these functions.

Function Documentation

void vigra::combineTwoImages (   ...)

Combine two source images into destination image.

After the introduction of arithmetic and algebraic array expressions, this function is rarely needed. Moreover, combineTwoMultiArrays() provides the same functionality for arbitrary dimensional arrays.

The transformation given by the functor is applied to the source pixels and the result written into the corresponding destination pixel. This is typically used for operations like add and subtract. Note that the binary functors of the STL can be used in addition to the functors specifically defined in Functors to Combine Images. Creation of new functors is easiest by using Functor Expressions.

Declarations:

pass 2D array views:

namespace vigra {
template <class T11, class S11,
class T12, class S12,
class T2, class S2,
class Functor>
void
combineTwoImages(MultiArrayView<2, T11, S11> const & src1,
MultiArrayView<2, T12, S12> const & src2,
MultiArrayView<2, T2, S2> dest,
Functor const & f);
}

show deprecated declarations

Usage:

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

#include <functional> // for plus
MultiArray<2, float> src1(width, height), src2(width, height),
dest(width, height);
... // fill source images
combineTwoImages(src1, src2, dest,
std::plus<float>());

show deprecated examples

See Also
Functors to Transform Images, vigra::multi_math, Functor Expressions
void vigra::combineTwoImagesIf (   ...)

Combine ROI of two source images into destination image.

The transformation given by the functor is applied to all source pixels in the ROI (i.e. whenever the corresponding value of the mask array is non-zero) and the result written into the corresponding destination pixel. This is typically used for operations like add and subtract. Note that the binary functors of the STL can be used in addition to the functors specifically defined in Functors to Combine Images. Creation of new functors is easiest by using Functor Expressions.

Declarations:

pass 2D array views:

namespace vigra {
template <class T11, class S11,
class T12, class S12,
class TM, class SM,
class T2, class S2,
class Functor>
void
combineTwoImagesIf(MultiArrayView<2, T11, S11> const & src1,
MultiArrayView<2, T12, S12> const & src2,
MultiArrayView<2, TM, SM> const & mask,
MultiArrayView<2, T2, S2> dest,
Functor const & f);
}

show deprecated declarations

Usage:

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

#include <functional> // for plus
MultiArray<2, float> src1(width, height), src2(width, height), mask(width, height),
dest(width, height);
... // fill source and mask images
combineTwoImagesIf(src1, src2, mask, dest,
std::plus<float>());

show deprecated examples

See Also
Functors to Transform Images, vigra::multi_math, Functor Expressions
void vigra::combineThreeImages (   ...)

Combine three source images into destination image.

After the introduction of arithmetic and algebraic array expressions, this function is rarely needed. Moreover, combineThreeMultiArrays() provides the same functionality for arbitrary dimensional arrays.

The transformation given by the functor is applied to the source pixels and the result written into the corresponding destination pixel. Creation of new functors is easiest by using Functor Expressions.

Declarations:

pass 2D array views:

namespace vigra {
template <class T11, class S11,
class T12, class S12,
class T13, class S13,
class T2, class S2,
class Functor>
void
combineThreeImages(MultiArrayView<2, T11, S11> const & src1,
MultiArrayView<2, T12, S12> const & src2,
MultiArrayView<2, T13, S13> const & src3,
MultiArrayView<2, T2, S2> dest,
Functor const & f);
}

show deprecated declarations

Usage:

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

#include <vigra/functorexpression.hxx>
MultiArray<2, float> src1(width, height), src2(width, height), src3(width, height),
dest(width, height);
... // fill source images
using namespace vigra::functor; // activate VIGRA's lambda library
combineThreeImages(src1, src2, src3, dest,
Arg1()*exp(-abs(Arg2()-Arg3())));

show deprecated examples

See Also
Functors to Transform Images, vigra::multi_math, Functor Expressions

© 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.11.1 (Fri May 19 2017)