[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Functions | |
template<... > | |
void | affineWarpImage (...) |
Warp an image according to an affine transformation. | |
template<... > | |
void | reflectImage (...) |
Reflect image horizontally or vertically. | |
template<... > | |
void | resampleImage (...) |
Resample image by a given factor. | |
template<... > | |
void | resizeImageCatmullRomInterpolation (...) |
Resize image using the Catmull/Rom interpolation function. | |
template<... > | |
void | resizeImageCoscotInterpolation (...) |
Resize image using the Coscot interpolation function. | |
template<... > | |
void | resizeImageLinearInterpolation (...) |
Resize image using linear interpolation. | |
template<... > | |
void | resizeImageNoInterpolation (...) |
Resize image by repeating the nearest pixel values. | |
template<... > | |
void | resizeImageSplineInterpolation (...) |
Resize image using B-spline interpolation. | |
template<... > | |
void | resizeMultiArraySplineInterpolation (...) |
Resize MultiArray using B-spline interpolation. | |
template<... > | |
void | rotateImage (...) |
Rotate image by an arbitrary angle. | |
linalg::TemporaryMatrix< double > | rotationMatrix2DDegrees (double angle) |
Create homogeneous matrix representing a 2D rotation about the coordinate origin. | |
linalg::TemporaryMatrix< double > | rotationMatrix2DDegrees (double angle, TinyVector< double, 2 > const ¢er) |
Create homogeneous matrix representing a 2D rotation about the given point. | |
linalg::TemporaryMatrix< double > | rotationMatrix2DRadians (double angle) |
Create homogeneous matrix representing a 2D rotation about the coordinate origin. | |
linalg::TemporaryMatrix< double > | rotationMatrix2DRadians (double angle, TinyVector< double, 2 > const ¢er) |
Create homogeneous matrix representing a 2D rotation about the given point. | |
linalg::TemporaryMatrix< double > | scalingMatrix2D (double scalingFactor) |
Create homogeneous matrix representing a 2D uniform scaling about the coordinate origin. | |
linalg::TemporaryMatrix< double > | scalingMatrix2D (double sx, double sy) |
Create homogeneous matrix representing a 2D non-uniform scaling about the coordinate origin. | |
linalg::TemporaryMatrix< double > | shearMatrix2D (double s01, double s10) |
Create homogeneous matrix representing a 2D shearing. | |
linalg::TemporaryMatrix< double > | translationMatrix2D (TinyVector< double, 2 > const &shift) |
Create homogeneous matrix representing a 2D translation. | |
template<... > | |
void | transposeImage (...) |
Transpose an image over the major or minor diagonal. |
Zoom up and down by repeating pixels, or using various interpolation schemes.
See also: resamplingConvolveImage(), resampleImage(), resizeMultiArraySplineInterpolation()
#include <vigra/stdimagefunctions.hxx>
or
#include <vigra/resizeimage.hxx>
linalg::TemporaryMatrix<double> vigra::translationMatrix2D | ( | TinyVector< double, 2 > const & | shift | ) |
Create homogeneous matrix representing a 2D translation.
For use with affineWarpImage().
linalg::TemporaryMatrix<double> vigra::scalingMatrix2D | ( | double | scalingFactor | ) |
Create homogeneous matrix representing a 2D uniform scaling about the coordinate origin.
For use with affineWarpImage().
linalg::TemporaryMatrix<double> vigra::scalingMatrix2D | ( | double | sx, |
double | sy | ||
) |
Create homogeneous matrix representing a 2D non-uniform scaling about the coordinate origin.
For use with affineWarpImage().
linalg::TemporaryMatrix<double> vigra::shearMatrix2D | ( | double | s01, |
double | s10 | ||
) |
Create homogeneous matrix representing a 2D shearing.
For use with affineWarpImage().
linalg::TemporaryMatrix<double> vigra::rotationMatrix2DRadians | ( | double | angle | ) |
Create homogeneous matrix representing a 2D rotation about the coordinate origin.
For use with affineWarpImage(). Angle must be in radians.
linalg::TemporaryMatrix<double> vigra::rotationMatrix2DDegrees | ( | double | angle | ) |
Create homogeneous matrix representing a 2D rotation about the coordinate origin.
For use with affineWarpImage(). Angle must be in degrees.
linalg::TemporaryMatrix<double> vigra::rotationMatrix2DRadians | ( | double | angle, |
TinyVector< double, 2 > const & | center | ||
) |
Create homogeneous matrix representing a 2D rotation about the given point.
For use with affineWarpImage(). Angle must be in radians.
linalg::TemporaryMatrix<double> vigra::rotationMatrix2DDegrees | ( | double | angle, |
TinyVector< double, 2 > const & | center | ||
) |
Create homogeneous matrix representing a 2D rotation about the given point.
For use with affineWarpImage(). Angle must be in degrees.
void rotateImage | ( | ... | ) |
Rotate image by an arbitrary angle.
Rotate image by a multiple of 90 degrees.
The algorithm performs a rotation about the given center point (the image center by default) using the given SplineImageView for interpolation. The destination image must have the same size as the source SplineImageView. The rotation is counter-clockwise, and the angle must be given in degrees.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="affinegeometry_8hxx-source.html">vigra/affinegeometry.hxx</a>\><br> Namespace: vigra
Required Interface:
This algorithm just copies the pixels in the appropriate new order. It expects the destination image to have the correct shape for the desired rotation.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="basicgeometry_8hxx-source.html">vigra/basicgeometry.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::affineWarpImage | ( | ... | ) |
Warp an image according to an affine transformation.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
The algorithm applies the given affineMatrix to the destination coordinates and copies the image value from the resulting source coordinates, using the given SplineImageView src for interpolation. If the resulting coordinate is outside the source image, nothing will be writen at that destination point.
The matrix represent a 2-dimensional affine transform by means of homogeneous coordinates, i.e. it must be a 3x3 matrix whose last row is (0,0,1).
Usage:
<b>\#include</b> \<<a href="affinegeometry_8hxx-source.html">vigra/affinegeometry.hxx</a>\><br> Namespace: vigra
Required Interface:
See also: Functions to specify affine transformation: translationMatrix2D(), scalingMatrix2D(), shearMatrix2D(), rotationMatrix2DRadians(), rotationMatrix2DDegrees()
void vigra::reflectImage | ( | ... | ) |
Reflect image horizontally or vertically.
The reflection direction refers to the reflection axis, i.e. horizontal reflection turns the image upside down, vertical reflection changes left for right. The directions are selected by the enum values vigra::horizontal
and vigra::vertical
. The two directions can also be "or"ed together to perform both reflections simultaneously (see example below) – this is the same as a 180 degree rotation.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="basicgeometry_8hxx-source.html">vigra/basicgeometry.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::transposeImage | ( | ... | ) |
Transpose an image over the major or minor diagonal.
The transposition direction refers to the axis, i.e. major transposition turns the upper right corner into the lower left one, whereas minor transposition changes the upper left corner into the lower right one. The directions are selected by the enum values vigra::major
and vigra::minor
. The two directions can also be "or"ed together to perform both reflections simultaneously (see example below) – this is the same as a 180 degree rotation. (Caution: When doing multi-platform development, you should be aware that some <sys/types.h> define major/minor, too. Do not omit the vigra namespace prefix.)
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="basicgeometry_8hxx-source.html">vigra/basicgeometry.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::resampleImage | ( | ... | ) |
Resample image by a given factor.
This algorithm is very fast and does not require any arithmetic on the pixel types. The input image must have a size of at least 2x2. Destiniation pixels are directly copied from the appropriate source pixels. The size of the result image is the product of factor
and the original size, where we round up if factor < 1.0
and down otherwise. This size calculation is the main difference to the convention used in the similar function resizeImageNoInterpolation(): there, the result size is calculated as n*(old_width-1)+1
and n*(old_height-1)+1
. This is because resizeImageNoInterpolation() does not replicate the last pixel in every row/column in order to make it compatible with the other functions of the resizeImage...
family.
The function can be called with different resampling factors for x and y, or with a single factor to be used for both directions.
It should also be noted that resampleImage() is implemented so that an enlargement followed by the corresponding shrinking reproduces the original image. The function uses accessors.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="basicgeometry_8hxx-source.html">vigra/basicgeometry.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::resizeMultiArraySplineInterpolation | ( | ... | ) |
Resize MultiArray using B-spline interpolation.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
The function implements separable spline interpolation algorithm described in
M. Unser, A. Aldroubi, M. Eden, "B-Spline Signal Processing" IEEE Transactions on Signal Processing, vol. 41, no. 2, pp. 821-833 (part I), pp. 834-848 (part II), 1993.
to obtain optimal interpolation quality and speed. You may pass the funcion a spline of arbitrary order (e.g. BSpline<ORDER, double>
or CatmullRomSpline<double>
). The default is a third order spline which gives a twice continuously differentiable interpolant. The implementation ensures that image values are interpolated rather than smoothed by first calling a recursive (sharpening) prefilter as described in the above paper. Then the actual interpolation is done using resamplingConvolveLine().
The range of both the input and output images (resp. regions) must be given. The input image must have a size of at least 4x4, the destination of at least 2x2. The scaling factors are then calculated accordingly. If the source image is larger than the destination, it is smoothed (band limited) using a recursive exponential filter. The source value_type (SrcAccessor::value_type) must be a linear algebra, i.e. it must support addition, subtraction, and multiplication (+, -, *), multiplication with a scalar real number and NumericTraits. The function uses accessors.
Usage:
<b>\#include</b> \<<a href="multi__resize_8hxx-source.html">vigra/multi_resize.hxx</a>\><br> Namespace: vigra
Required Interface:
The source and destination iterators must be compatible with vigra::MultiIterator. The array value types must be models of LinearSpace.
void vigra::resizeImageNoInterpolation | ( | ... | ) |
Resize image by repeating the nearest pixel values.
This algorithm is very fast and does not require any arithmetic on the pixel types.
The range of both the input and output images (resp. regions) must be given. Both images must have a size of at least 2x2 pixels. The scaling factors are then calculated accordingly. Destination pixels are directly copied from the appropriate source pixels.
The function uses accessors.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="resizeimage_8hxx-source.html">vigra/resizeimage.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::resizeImageLinearInterpolation | ( | ... | ) |
Resize image using linear interpolation.
The function uses the standard separable bilinear interpolation algorithm to obtain a good compromize between quality and speed.
The range must of both the input and output images (resp. regions) must be given. Both images must have a size of at least 2x2. The scaling factors are then calculated accordingly. If the source image is larger than the destination, it is smoothed (band limited) using a recursive exponential filter. The source value_type (SrcAccessor::value_type) must be a linear space, i.e. it must support addition, multiplication with a scalar real number and NumericTraits. The function uses accessors.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="resizeimage_8hxx-source.html">vigra/resizeimage.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::resizeImageSplineInterpolation | ( | ... | ) |
Resize image using B-spline interpolation.
The function implements separable spline interpolation algorithm described in
M. Unser, A. Aldroubi, M. Eden, "B-Spline Signal Processing" IEEE Transactions on Signal Processing, vol. 41, no. 2, pp. 821-833 (part I), pp. 834-848 (part II), 1993.
to obtain optimal interpolation quality and speed. You may pass the funcion a spline of arbitrary order (e.g. BSpline<ORDER, double>
or CatmullRomSpline<double>
). The default is a third order spline which gives a twice continuously differentiable interpolant. The implementation ensures that image values are interpolated rather than smoothed by first calling a recursive (sharpening) prefilter as described in the above paper. Then the actual interpolation is done using resamplingConvolveLine().
The range of both the input and output images (resp. regions) must be given. The input image must have a size of at least 4x4, the destination of at least 2x2. The scaling factors are then calculated accordingly. If the source image is larger than the destination, it is smoothed (band limited) using a recursive exponential filter. The source value_type (SrcAccessor::value_type) must be a linear algebra, i.e. it must support addition, subtraction, and multiplication (+, -, *), multiplication with a scalar real number and NumericTraits. The function uses accessors.
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
Usage:
<b>\#include</b> \<<a href="resizeimage_8hxx-source.html">vigra/resizeimage.hxx</a>\><br> Namespace: vigra
Required Interface:
Preconditions:
void vigra::resizeImageCatmullRomInterpolation | ( | ... | ) |
Resize image using the Catmull/Rom interpolation function.
The function calls like resizeImageSplineInterpolation() with vigra::CatmullRomSpline as an interpolation kernel. The interpolated function has one continuous derivative. (See resizeImageSplineInterpolation() for more documentation)
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
#include <vigra/resizeimage.hxx>
Namespace: vigra
void vigra::resizeImageCoscotInterpolation | ( | ... | ) |
Resize image using the Coscot interpolation function.
The function calls resizeImageSplineInterpolation() with vigra::CoscotFunction as an interpolation kernel. The interpolated function has one continuous derivative. (See resizeImageSplineInterpolation() for more documentation)
Declarations:
pass arguments explicitly:
use argument objects in conjunction with Argument Object Factories :
#include <vigra/resizeimage.hxx>
Namespace: vigra
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|