[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
![]() |
vigra Namespace Reference | ![]() |
Namespaces | |
acc | |
Efficient computation of object statistics. | |
EightNeighborhood | |
FourNeighborhood | |
linalg | |
Linear algebra functions. | |
metrics | |
Define functors for various common metrics. | |
multi_math | |
Neighborhood3DSix | |
Neighborhood3DTwentySix | |
rf3 | |
Random forest version 3. | |
Classes | |
class | AdjacencyListGraph |
undirected adjacency list graph in the LEMON API More... | |
class | AffineMotionEstimationOptions |
Option object for affine registration functions. More... | |
class | Any |
Typesafe storage of arbitrary values. More... | |
class | ArrayOfRegionStatistics |
Calculate statistics for all regions of a labeled image. More... | |
class | ArrayVector |
class | ArrayVectorView |
class | BasicImage |
Fundamental class template for images. More... | |
class | BasicImageIterator |
class | BasicImageIteratorBase |
class | BasicImageView |
BasicImage using foreign memory. More... | |
class | BestGiniOfColumn |
class | BilinearInterpolatingAccessor |
Bilinear interpolation at non-integer positions. More... | |
class | BinaryForest |
BinaryForest stores a collection of rooted binary trees. More... | |
class | BlockwiseConvolutionOptions |
class | BlockwiseLabelOptions |
class | BlockwiseOptions |
class | BlueAccessor |
class | Box |
Represent an n-dimensional box as a (begin, end) pair. Depending on the value type, end() is considered to be outside the box (as in the STL, for integer types), or inside (for floating point types). size() will always be end() - begin(). More... | |
class | BrightnessContrastFunctor |
Adjust brightness and contrast of an image. More... | |
class | BSpline |
class | BSplineBase |
class | BucketQueue |
Priority queue implemented using bucket sort. More... | |
class | CatmullRomSpline |
class | ChangeablePriorityQueue |
Heap-based changable priority queue with a maximum number of elemements. More... | |
class | ChunkedArray |
Interface and base class for chunked arrays. More... | |
class | ChunkedArrayCompressed |
class | ChunkedArrayFull |
class | ChunkedArrayHDF5 |
class | ChunkedArrayLazy |
class | ChunkedArrayOptions |
Option object for ChunkedArray construction. More... | |
struct | ChunkedArrayTag |
class | ChunkedArrayTmpFile |
class | ClusteringOptions |
Options object for hierarchical clustering. More... | |
class | ColumnIterator |
Iterator adapter to linearly access columns. More... | |
class | ConstBasicImageIterator |
class | ConstImageIterator |
Standard 2D random access const iterator for images that store the data as a linear array. More... | |
class | ConstStridedImageIterator |
Const iterator to be used when pixels are to be skipped. More... | |
class | ConstValueIterator |
Iterator that always returns the constant specified in the constructor. More... | |
class | ConvexPolytope |
class | ConvolutionOptions |
Options class template for convolutions. More... | |
class | CoordinateConstValueAccessor |
Forward accessor to the value() part of the values an iterator points to. More... | |
class | CoscotFunction |
class | CountingIterator |
Iterator that counts upwards or downwards with a given step size. More... | |
struct | CoupledArrays |
class | CoupledHandle |
struct | CoupledIteratorType |
class | CoupledScanOrderIterator |
Iterate over multiple images simultaneously in scan order. More... | |
class | CrackContourCirculator |
Circulator that walks around a given region. More... | |
class | Diff2D |
Two dimensional difference vector. More... | |
class | DiffusivityFunctor |
Diffusivity functor for non-linear diffusion. More... | |
class | Dist2D |
struct | DistancePowerFunctor |
class | DT_StackEntry |
class | EarlyStoppStd |
Standard early stopping criterion. More... | |
class | Edgel |
class | EnhancedFrostFunctor |
This function tries to reduce the speckle noise of an image by applying the Enhanced Frost filter. More... | |
class | EnhancedLeeFunctor |
This function tries to reduce the speckle noise of an image by applying the Enhanced Lee filter. More... | |
class | EntropyCriterion |
class | FFTWComplex |
Wrapper class for the FFTW complex types 'fftw_complex '. More... | |
class | FFTWConvolvePlan |
class | FFTWCorrelatePlan |
class | FFTWImaginaryAccessor |
class | FFTWLogMagnitudeAccessor |
class | FFTWMagnitudeAccessor |
class | FFTWPhaseAccessor |
class | FFTWPlan |
class | FFTWRealAccessor |
class | FFTWSquaredMagnitudeAccessor |
class | FFTWWriteRealAccessor |
class | FilterIterator |
This iterator creates a view of another iterator and skips elements that do not fulfill a given predicate. More... | |
class | FindAverage |
Find the average pixel value in an image or ROI. More... | |
class | FindAverageAndVariance |
Find the average pixel value and its variance in an image or ROI. More... | |
class | FindBoundingRectangle |
Calculate the bounding rectangle of an ROI in an image. More... | |
class | FindMinMax |
Find the minimum and maximum pixel value in an image or ROI. More... | |
class | FindROISize |
Calculate the size of an ROI in an image. More... | |
class | FindSum |
Find the sum of the pixel values in an image or ROI. More... | |
class | FixedPoint |
class | FixedPoint16 |
class | FunctorTraits |
Export associated information for a functor. More... | |
class | GaborFilterFamily |
Family of gabor filters of different scale and direction. More... | |
class | GammaFunctor |
Perform gamma correction of an image. More... | |
class | GammaMAPFunctor |
This function tries to reduce the speckle noise of an image by applying the Gamma Maximum A Posteriori (MAP) filter. More... | |
class | Gaussian |
class | GiniCriterion |
class | GrayToRGBAccessor |
class | GreenAccessor |
class | GridGraph |
Define a grid graph in arbitrary dimensions. More... | |
class | HDF5DisableErrorOutput |
Temporarily disable HDF5's native error output. More... | |
class | HDF5File |
Access to HDF5 files. More... | |
class | HDF5Handle |
Wrapper for unique hid_t objects. More... | |
class | HDF5HandleShared |
Wrapper for shared hid_t objects. More... | |
class | HDF5ImportInfo |
Argument object for the function readHDF5(). More... | |
struct | HierarchicalIteratorType |
class | HistogramOptions |
Set histogram options. More... | |
class | ImageArray |
Fundamental class template for arrays of equal-sized images. More... | |
class | ImageExportInfo |
Argument object for the function exportImage(). More... | |
class | ImageImportInfo |
Argument object for the function importImage(). More... | |
class | ImageIterator |
Standard 2D random access iterator for images that store the data in a linear array. More... | |
class | ImageIteratorBase |
Base class for 2D random access iterators. More... | |
class | ImagePyramid |
Class template for logarithmically tapering image pyramids. More... | |
class | IteratorAdaptor |
Quickly create 1-dimensional iterator adapters. More... | |
struct | IteratorTraits |
Export associated information for each image iterator. More... | |
class | Kernel1D |
Generic 1 dimensional convolution kernel. More... | |
class | Kernel2D |
Generic 2 dimensional convolution kernel. More... | |
class | KuanFunctor |
This function tries to reduce the speckle noise of an image by applying the Kuan filter. More... | |
class | Lab2RGBFunctor |
Convert perceptual uniform CIE L*a*b* into linear (raw) RGB. More... | |
class | Lab2RGBPrimeFunctor |
Convert perceptual uniform CIE L*a*b* into non-linear (gamma corrected) R'G'B'. More... | |
class | Lab2XYZFunctor |
Convert perceptual uniform CIE L*a*b* into standardized tri-stimulus XYZ. More... | |
class | LabelOptions |
Option object for labelMultiArray(). More... | |
class | LastValueFunctor |
Stores and returns the last value it has seen. More... | |
class | LeeFunctor |
This function tries to reduce the speckle noise of an image by applying the basic Lee filter. More... | |
class | LineIterator |
Iterator adapter to iterate along an arbitrary line on the image. More... | |
class | LocalMinmaxOptions |
Options object for localMinima() and localMaxima(). More... | |
class | Luv2RGBFunctor |
Convert perceptual uniform CIE L*u*v* into linear (raw) RGB. More... | |
class | Luv2RGBPrimeFunctor |
Convert perceptual uniform CIE L*u*v* into non-linear (gamma corrected) R'G'B'. More... | |
class | Luv2XYZFunctor |
Convert perceptual uniform CIE L*u*v* into standardized tri-stimulus XYZ. More... | |
class | MagnitudeFunctor |
class | MappedBucketQueue |
Priority queue implemented using bucket sort (STL compatible). More... | |
class | MergeGraphAdaptor |
undirected graph adaptor for edge contraction and feature merging More... | |
struct | MeshGridAccessor |
class | MultiArray |
Main MultiArray class containing the memory management. More... | |
class | MultiArrayNavigator |
A navigator that provides access to the 1D subranges of an n-dimensional range given by a vigra::MultiIterator and an nD shape. More... | |
class | MultiArrayShape |
class | MultiArrayView |
Base class for, and view to, vigra::MultiArray. More... | |
class | MultiBlocking |
class | MultiCoordinateIterator |
Iterate over a virtual array where each element contains its coordinate. More... | |
class | MultiCoordinateNavigator |
A navigator that provides access to the 1D subranges of an n-dimensional range given by an nD shape. More... | |
class | MultiImageAccessor2 |
Access two images simultaneously. More... | |
class | MultiIterator |
A multi-dimensional hierarchical iterator to be used with vigra::MultiArrayView if it is not strided. More... | |
class | NeighborhoodCirculator |
Circulator that walks around a given location in a given image. More... | |
class | NeighborOffsetCirculator |
Circulator that walks around a given location. More... | |
class | Node< e_ConstProbNode > |
class | NodeBase |
class | NoiseNormalizationOptions |
Pass options to one of the noise normalization functions. More... | |
class | NonlinearLSQOptions |
Pass options to nonlinearLeastSquares(). More... | |
class | NormalRandomFunctor |
class | NumpyAnyArray |
class | NumpyArray |
class | ParallelOptions |
Option base class for parallel algorithms. More... | |
class | PLSAOptions |
Option object for the pLSA algorithm. More... | |
class | Point2D |
Two dimensional point or position. More... | |
class | Polygon |
class | Polynomial |
class | PolynomialView |
class | Polytope |
Represent an n-dimensional polytope. More... | |
class | PriorityQueue |
Heap-based priority queue compatible to BucketQueue. More... | |
class | ProblemSpec |
problem specification class for the random forest. More... | |
class | Processor |
class | Processor< ClassificationTag, LabelType, T1, C1, T2, C2 > |
class | Processor< RegressionTag, LabelType, T1, C1, T2, C2 > |
class | PropertyMap |
The PropertyMap is used to store Node or Arc information of graphs. More... | |
class | PropertyMap< KEYTYPE, MAPPEDTYPE, IndexVectorTag > |
Specialization of PropertyMap that stores the elements in a vector (size = number of stored elements). An additional index vector is needed for bookkeeping (size = max node id of stored elements). More... | |
class | PropertyMap< KEYTYPE, MAPPEDTYPE, VectorTag > |
Specialization of PropertyMap that stores the elements in a vector (size = max node id of stored elements). More... | |
class | Quaternion |
class | RandomForest |
Random forest version 2 (see also vigra::rf3::RandomForest for version 3) More... | |
class | RandomForestClassCounter |
class | RandomForestOptions |
Options object for the random forest. More... | |
class | RandomNumberGenerator |
class | Rational |
class | Rect2D |
Two dimensional rectangle. More... | |
class | RedAccessor |
class | ReduceFunctor |
Apply a functor to reduce the dimensionality of an array. More... | |
class | RestrictedNeighborhoodCirculator |
Circulator that walks around a given location in a given image, using a restricted neighborhood. More... | |
class | RGB2LabFunctor |
Convert linear (raw) RGB into perceptual uniform CIE L*a*b*. More... | |
class | RGB2LuvFunctor |
Convert linear (raw) RGB into perceptual uniform CIE L*u*v*. More... | |
class | RGB2RGBPrimeFunctor |
Convert linear (raw) RGB into non-linear (gamma corrected) R'G'B'. More... | |
class | RGB2sRGBFunctor |
Convert linear (raw) RGB into standardized sRGB. More... | |
class | RGB2XYZFunctor |
Convert linear (raw) RGB into standardized tri-stimulus XYZ. More... | |
class | RGBAccessor |
class | RGBGradientMagnitudeFunctor |
class | RGBPrime2LabFunctor |
Convert non-linear (gamma corrected) R'G'B' into perceptual uniform CIE L*a*b*. More... | |
class | RGBPrime2LuvFunctor |
Convert non-linear (gamma corrected) R'G'B' into perceptual uniform CIE L*u*v*. More... | |
class | RGBPrime2RGBFunctor |
Convert non-linear (gamma corrected) R'G'B' into non-linear (raw) RGB. More... | |
class | RGBPrime2XYZFunctor |
Convert non-linear (gamma corrected) R'G'B' into standardized tri-stimulus XYZ. More... | |
class | RGBPrime2YPrimeCbCrFunctor |
Convert non-linear (gamma corrected) R'G'B' into Y'CbCr color difference components. More... | |
class | RGBPrime2YPrimeIQFunctor |
Convert non-linear (gamma corrected) R'G'B' into Y'IQ components. More... | |
class | RGBPrime2YPrimePbPrFunctor |
Convert non-linear (gamma corrected) R'G'B' into Y'PbPr color difference components. More... | |
class | RGBPrime2YPrimeUVFunctor |
Convert non-linear (gamma corrected) R'G'B' into Y'UV components. More... | |
class | RGBToGrayAccessor |
class | RGBValue |
Class for a single RGB value. More... | |
class | RowIterator |
Iterator adapter to linearly access row. More... | |
class | Sampler |
Create random samples from a sequence of indices. More... | |
class | SamplerOptions |
Options object for the Sampler class. More... | |
class | SeedOptions |
Options object for generateWatershedSeeds(). More... | |
class | SeedRgDirectValueFunctor |
Statistics functor to be used for seeded region growing. More... | |
class | SequenceAccessor |
Accessor for items that are STL compatible sequences. More... | |
class | ShortestPathDijkstra |
shortest path computer More... | |
class | SIFImportInfo |
Extracts image properties from an Andor SIF file header. More... | |
class | Size2D |
Two dimensional size object. More... | |
struct | SkeletonOptions |
Option object for skeletonizeImage() More... | |
class | SlantedEdgeMTFOptions |
Pass options to one of the slantedEdgeMTF() functions. More... | |
struct | SlicOptions |
Options object for slicSuperpixels(). More... | |
class | SortSamplesByDimensions |
class | Splice |
class | SplineImageView |
Create a continuous view onto a discrete image using splines. More... | |
class | SplineImageView0 |
Create an image view for nearest-neighbor interpolation. More... | |
class | SplineImageView1 |
Create an image view for bi-linear interpolation. More... | |
class | SplitBase |
class | sRGB2RGBFunctor |
Convert standardized sRGB into non-linear (raw) RGB. More... | |
class | StandardAccessor |
Encapsulate access to the values an iterator points to. More... | |
class | StandardConstAccessor |
Encapsulate read access to the values an iterator points to. More... | |
class | StandardConstValueAccessor |
Encapsulate access to the values an iterator points to. More... | |
class | StandardValueAccessor |
Encapsulate access to the values an iterator points to. More... | |
class | StarPolytope |
Specialization of the polytope to polytopes which forms a star domain. More... | |
class | StaticPolynomial |
class | StopAfterTree |
class | StopAfterVoteCount |
class | StopBase |
class | StopIfBinTest |
class | StopIfConverging |
class | StopIfMargin |
class | StopIfProb |
struct | StridedArrayTag |
class | StridedImageIterator |
Iterator to be used when pixels are to be skipped. More... | |
class | StridedMultiIterator |
A multi-dimensional hierarchical iterator to be used with vigra::MultiArrayView if it is not strided. More... | |
class | StridedScanOrderIterator |
Sequential iterator for MultiArrayView. More... | |
struct | ThinPlateSplineFunctor |
class | ThreadPool |
Thread pool class to manage a set of parallel workers. More... | |
class | Threshold |
Threshold an image. More... | |
class | ThresholdSplit |
class | TinyVector |
Class for fixed size vectors. More... | |
class | TinyVectorBase |
Base class for fixed size vectors. More... | |
class | TinyVectorView |
Wrapper for fixed size vectors. More... | |
class | UniformIntRandomFunctor |
class | UniformRandomFunctor |
struct | UnstridedArrayTag |
class | VectorAccessor |
Accessor for items that are STL compatible vectors. More... | |
class | VectorComponentAccessor |
Accessor for one component of a vector. More... | |
class | VectorComponentValueAccessor |
Accessor for one component of a vector. More... | |
class | VectorElementAccessor |
Accessor for one component of a vector. More... | |
class | VectorNormFunctor |
A functor for computing the vector norm. More... | |
class | VectorNormSqFunctor |
A functor for computing the squared vector norm. More... | |
class | VolumeExportInfo |
Argument object for the function exportVolume(). More... | |
class | VolumeImportInfo |
Argument object for the function importVolume(). More... | |
class | WatershedOptions |
Options object for watershed algorithms. More... | |
class | WignerMatrix |
computation of Wigner D matrix + rotation functions in SH,VH and R³ More... | |
class | XYZ2LabFunctor |
Convert standardized tri-stimulus XYZ into perceptual uniform CIE L*a*b*. More... | |
class | XYZ2LuvFunctor |
Convert standardized tri-stimulus XYZ into perceptual uniform CIE L*u*v*. More... | |
class | XYZ2RGBFunctor |
Convert standardized tri-stimulus XYZ into linear (raw) RGB. More... | |
class | XYZ2RGBPrimeFunctor |
Convert standardized tri-stimulus XYZ into non-linear (gamma corrected) R'G'B'. More... | |
class | YPrimeCbCr2RGBPrimeFunctor |
Convert Y'CbCr color difference components into non-linear (gamma corrected) R'G'B'. More... | |
class | YPrimeIQ2RGBPrimeFunctor |
Convert Y'IQ color components into non-linear (gamma corrected) R'G'B'. More... | |
class | YPrimePbPr2RGBPrimeFunctor |
Convert Y'PbPr color difference components into non-linear (gamma corrected) R'G'B'. More... | |
class | YPrimeUV2RGBPrimeFunctor |
Convert Y'UV color components into non-linear (gamma corrected) R'G'B'. More... | |
Typedefs | |
typedef AtImageBorder | AtVolumeBorder |
Encode whether a voxel is near the volume border. More... | |
typedef BasicImage< UInt8 > | BImage |
typedef BasicImage< RGBValue< UInt8 > > | BRGBImage |
typedef Diff2D | CoordinateIterator |
Simulate an image where each pixel contains its coordinate. More... | |
typedef vigra::TinyVector< int, 3 > | Diff3D |
3-dimensional difference vector | |
typedef BasicImage< double > | DImage |
typedef BasicImage< RGBValue< double > > | DRGBImage |
typedef BasicImage< TinyVector< double, 2 > > | DVector2Image |
typedef BasicImage< TinyVector< double, 3 > > | DVector3Image |
typedef BasicImage< TinyVector< double, 4 > > | DVector4Image |
typedef EightNeighborhood::NeighborCode | EightNeighborCode |
typedef NeighborOffsetCirculator< EightNeighborCode > | EightNeighborOffsetCirculator |
typedef BasicImage< FFTWComplex<> > | FFTWComplexImage |
typedef BasicImage< fftw_real > | FFTWRealImage |
typedef BasicImage< float > | FImage |
typedef FourNeighborhood::NeighborCode | FourNeighborCode |
typedef NeighborOffsetCirculator< FourNeighborCode > | FourNeighborOffsetCirculator |
typedef BasicImage< RGBValue< float > > | FRGBImage |
typedef BasicImage< TinyVector< float, 2 > > | FVector2Image |
typedef BasicImage< TinyVector< float, 3 > > | FVector3Image |
typedef BasicImage< TinyVector< float, 4 > > | FVector4Image |
typedef RidgeSplit< BestGiniOfColumn< GiniCriterion > > | GiniRidgeSplit |
typedef BasicImage< Int32 > | IImage |
typedef detail::SelectIntegerType< 16, detail::SignedIntTypes >::type | Int16 |
16-bit signed int | |
typedef BasicImage< Int16 > | Int16Image |
typedef BasicImage< RGBValue< Int16 > > | Int16RGBImage |
typedef detail::SelectIntegerType< 32, detail::SignedIntTypes >::type | Int32 |
32-bit signed int | |
typedef BasicImage< Int32 > | Int32Image |
typedef BasicImage< RGBValue< Int32 > > | Int32RGBImage |
typedef detail::SelectIntegerType< 64, detail::SignedIntTypes >::type | Int64 |
64-bit signed int | |
typedef detail::SelectIntegerType< 8, detail::SignedIntTypes >::type | Int8 |
8-bit signed int | |
typedef BasicImage< Int8 > | Int8Image |
typedef BasicImage< RGBValue< Int8 > > | Int8RGBImage |
typedef detail::SelectBiggestIntegerType< detail::SignedIntTypes >::type | IntBiggest |
the biggest signed integer type of the system | |
typedef BasicImage< RGBValue< Int32 > > | IRGBImage |
typedef RandomNumberGenerator< detail::RandomState< detail::MT19937 > > | MersenneTwister |
typedef std::ptrdiff_t | MultiArrayIndex |
typedef Neighborhood3DSix::NeighborCode3D | NeighborCode3DSix |
typedef Neighborhood3DTwentySix::NeighborCode3D | NeighborCode3DTwentySix |
typedef RandomNumberGenerator< detail::RandomState< detail::MT19937 > > | RandomMT19937 |
typedef RandomNumberGenerator< detail::RandomState< detail::TT800 > > | RandomTT800 |
typedef BasicImage< Int16 > | SImage |
typedef BasicImage< RGBValue< Int16 > > | SRGBImage |
typedef RandomNumberGenerator< detail::RandomState< detail::TT800 > > | TemperedTwister |
typedef detail::SelectIntegerType< 16, detail::UnsignedIntTypes >::type | UInt16 |
16-bit unsigned int | |
typedef BasicImage< UInt16 > | UInt16Image |
typedef BasicImage< RGBValue< UInt16 > > | UInt16RGBImage |
typedef detail::SelectIntegerType< 32, detail::UnsignedIntTypes >::type | UInt32 |
32-bit unsigned int | |
typedef BasicImage< UInt32 > | UInt32Image |
typedef BasicImage< RGBValue< UInt32 > > | UInt32RGBImage |
typedef detail::SelectIntegerType< 64, detail::UnsignedIntTypes >::type | UInt64 |
64-bit unsigned int | |
typedef detail::SelectIntegerType< 8, detail::UnsignedIntTypes >::type | UInt8 |
8-bit unsigned int | |
typedef BasicImage< UInt8 > | UInt8Image |
typedef BasicImage< RGBValue< UInt8 > > | UInt8RGBImage |
typedef detail::SelectBiggestIntegerType< detail::UnsignedIntTypes >::type | UIntBiggest |
the biggest unsigned integer type of the system | |
Enumerations | |
enum | AtImageBorder { NotAtBorder = 0, RightBorder = 1, LeftBorder = 2, TopBorder = 4, BottomBorder = 8, FrontBorder = 16 } |
Encode whether a point is near the image border. More... | |
enum | BoundaryDistanceTag { OuterBoundary, InterpixelBoundary, InnerBoundary } |
Specify which boundary is used for boundaryMultiDistance(). More... | |
enum | MultiArrayInitializationTag { LinearSequence } |
Initialize a MultiArray in a standard way. More... | |
enum | NeighborhoodType { DirectNeighborhood =0, IndirectNeighborhood =1 } |
Choose the neighborhood system in a dimension-independent way. More... | |
enum | RF_OptionTag |
enum | SRGType |
Functions | |
template<class R > | |
FFTWComplex< R >::NormType | abs (const FFTWComplex< R > &a) |
absolute value (= magnitude) | |
template<typename IntType > | |
Rational< IntType > | abs (const Rational< IntType > &r) |
absolute value | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
FixedPoint16< IntBits, OverflowHandling > | abs (FixedPoint16< IntBits, OverflowHandling > v) |
absolute value. | |
template<unsigned IntBits, unsigned FracBits> | |
FixedPoint< IntBits, FracBits > | abs (FixedPoint< IntBits, FracBits > v) |
absolute value. | |
template<typename Type > | |
Quaternion< Type >::NormType | abs (Quaternion< Type > const &q) |
norm | |
template<class T , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> | |
RGBValue< T, RIDX, GIDX, BIDX > | abs (RGBValue< T, RIDX, GIDX, BIDX > const &v) |
component-wise absolute value | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | abs (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
component-wise absolute value | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3> | |
FixedPoint16< IntBits3, OverflowHandling > & | add (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result) |
addition with enforced result type. | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2, unsigned IntBits3, unsigned FracBits3> | |
void | add (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r, FixedPoint< IntBits3, FracBits3 > &result) |
addition with enforced result type. | |
template<class SrcIterator , class DestIterator > | |
linalg::TemporaryMatrix< double > | affineMatrix2DFromCorrespondingPoints (SrcIterator s, SrcIterator send, DestIterator d) |
Create homogeneous matrix that maps corresponding points onto each other. More... | |
template<... > | |
void | affineWarpImage (...) |
Warp an image according to an affine transformation. More... | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | allGreater (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
pointwise greater-than | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | allGreaterEqual (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
pointwise greater-equal | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | allLess (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
pointwise less-than | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | allLessEqual (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
pointwise less-equal | |
double | angularGaborSigma (int directionCount, double centerFrequency) |
Calculate sensible angular sigma for given parameters. More... | |
template<... > | |
void | anisotropicTotalVariationFilter (...) |
Performs Anisotropic Total Variation Regularization. More... | |
template<... > | |
void | applyFourierFilter (...) |
Apply a filter (defined in the frequency domain) to an image. More... | |
template<... > | |
void | applyFourierFilterFamily (...) |
Apply an array of filters (defined in the frequency domain) to an image. More... | |
template<class IndexIterator , class InIterator , class OutIterator > | |
void | applyPermutation (IndexIterator index_first, IndexIterator index_last, InIterator in, OutIterator out) |
Sort an array according to the given index permutation. More... | |
template<... > | |
void | applyWindowFunction (...) |
Apply a window function to each pixels of a given image. More... | |
template<class R > | |
R | arg (const FFTWComplex< R > &a) |
phase | |
template<class Iterator > | |
Iterator | argMax (Iterator first, Iterator last) |
Find the maximum element in a sequence. More... | |
template<class Iterator , class UnaryFunctor > | |
Iterator | argMaxIf (Iterator first, Iterator last, UnaryFunctor condition) |
Find the maximum element in a sequence conforming to a condition. More... | |
template<class Iterator > | |
Iterator | argMin (Iterator first, Iterator last) |
Find the minimum element in a sequence. More... | |
template<class Iterator , class UnaryFunctor > | |
Iterator | argMinIf (Iterator first, Iterator last, UnaryFunctor condition) |
Find the minimum element in a sequence conforming to a condition. More... | |
template<class T > | |
std::string | asString (T t)(...) |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
FixedPoint16< 2, OverflowHandling > | atan2 (FixedPoint16< IntBits, OverflowHandling > y, FixedPoint16< IntBits, OverflowHandling > x) |
Arctangent. Accuracy better than 1/3 degree (9 significant bits). | |
template<... > | |
void | beaudetCornerDetector (...) |
Find corners in an image (4). More... | |
template<... > | |
void | beautifyCrackEdgeImage (...) |
Beautify crack edge image for visualization. More... | |
double | besselJ (int n, double x) |
Bessel function of the first kind. More... | |
double | besselY (int n, double x) |
Bessel function of the second kind. More... | |
template<... > | |
void | boundaryMultiDistance (...) |
Euclidean distance to the implicit boundaries of a multi-dimensional label array. More... | |
template<... > | |
void | boundaryTensor (...) |
Calculate the boundary tensor for a scalar valued image. More... | |
template<... > | |
void | boundaryTensor1 (...) |
Boundary tensor variant. More... | |
template<... > | |
void | boundaryVectorDistance (...) |
Compute the vector distance transform to the implicit boundaries of a multi-dimensional label array. More... | |
template<... > | |
void | cannyEdgeImage (...) |
Detect and mark edges in an edge image using Canny's algorithm. More... | |
template<... > | |
void | cannyEdgeImageFromGradWithThinning (...) |
Detect and mark edges in an edge image using Canny's algorithm. More... | |
template<... > | |
void | cannyEdgeImageWithThinning (...) |
Detect and mark edges in an edge image using Canny's algorithm. More... | |
template<... > | |
void | cannyEdgelList (...) |
Simple implementation of Canny's edge detector. More... | |
template<... > | |
void | cannyEdgelList3x3 (...) |
Improved implementation of Canny's edge detector. More... | |
template<... > | |
void | cannyEdgelList3x3Threshold (...) |
Improved implementation of Canny's edge detector with thresholding. More... | |
template<... > | |
void | cannyEdgelListThreshold (...) |
Canny's edge detector with thresholding. More... | |
template<class GRAPH , class EDGE_WEIGHTS , class SEEDS , class LABELS > | |
void | carvingSegmentation (const GRAPH &g, const EDGE_WEIGHTS &edgeWeights, const SEEDS &seeds, const typename LABELS::Value backgroundLabel, const typename EDGE_WEIGHTS::Value backgroundBias, const typename EDGE_WEIGHTS::Value noPriorBelow, LABELS &labels) |
edge weighted watersheds Segmentataion More... | |
template<typename IntType > | |
Rational< IntType > | ceil (const Rational< IntType > &r) |
smallest integer not smaller than r | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
Int32 | ceil (FixedPoint16< IntBits, OverflowHandling > v) |
rounding up. | |
template<unsigned IntBits, unsigned FracBits> | |
int | ceil (FixedPoint< IntBits, FracBits > v) |
rounding up. | |
template<class V , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> | |
RGBValue< V, RIDX, GIDX, BIDX > | ceil (RGBValue< V, RIDX, GIDX, BIDX > const &r) |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | ceil (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
UInt32 | ceilPower2 (UInt32 x) |
Round up to the nearest power of 2. More... | |
template<int SIZE> | |
TinyVector< UInt32, SIZE > | ceilPower2 (vigra::TinyVector< UInt32, SIZE > const &t) |
Round up values to the nearest power of 2. Implemented only for UInt32. | |
UInt32 | checksum (const char *data, unsigned int size) |
Compute the CRC-32 checksum of a byte array. More... | |
double | chi2 (unsigned int degreesOfFreedom, double arg, double accuracy=1e-7) |
Chi square distribution. More... | |
double | chi2CDF (unsigned int degreesOfFreedom, double arg, double accuracy=1e-7) |
Cumulative chi square distribution. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE > | clip (TinyVector< V, SIZE > const &t, const V valLower, const V valUpper) |
Clip values to an interval. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE > | clip (TinyVector< V, SIZE > const &t, TinyVector< V, SIZE > const &valLower, TinyVector< V, SIZE > const &valUpper) |
Clip values to a vector of intervals. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE > | clipLower (TinyVector< V, SIZE > const &t) |
Clip negative values. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE > | clipLower (TinyVector< V, SIZE > const &t, const V val) |
Clip values below a threshold. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE > | clipUpper (TinyVector< V, SIZE > const &t, const V val) |
Clip values above a threshold. More... | |
template<class T1 , class T2 > | |
bool | closeAtTolerance (T1 l, T2 r, typename PromoteTraits< T1, T2 >::Promote epsilon) |
Tolerance based floating-point equality. More... | |
template<... > | |
void | closeGapsInCrackEdgeImage (...) |
Close one-pixel wide gaps in a cell grid edge image. More... | |
template<... > | |
void | combineThreeImages (...) |
Combine three source images into destination image. More... | |
template<... > | |
void | combineThreeMultiArrays (...) |
Combine three multi-dimensional arrays into one using a ternary function or functor. 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... | |
template<... > | |
void | combineTwoMultiArrays (...) |
Combine two multi-dimensional arrays into one using a binary function or functor. More... | |
void | compress (char const *source, std::size_t size, ArrayVector< char > &dest, CompressionMethod method) |
UInt32 | concatenateChecksum (UInt32 checksum, const char *data, unsigned int size) |
template<class R > | |
FFTWComplex< R > | conj (const FFTWComplex< R > &a) |
complex conjugate | |
template<class ValueType > | |
Quaternion< ValueType > | conj (Quaternion< ValueType > const &q) |
Create conjugate quaternion. | |
template<class PointArray1 , class PointArray2 > | |
void | convexHull (const PointArray1 &points, PointArray2 &convex_hull) |
Compute convex hull of a 2D polygon. More... | |
template<... > | |
void | convolveFFT (...) |
Convolve an array with a kernel by means of the Fourier transform. More... | |
template<... > | |
void | convolveFFTComplex (...) |
Convolve a complex-valued array by means of the Fourier transform. More... | |
template<... > | |
void | convolveFFTComplexMany (...) |
Convolve a complex-valued array with a sequence of kernels by means of the Fourier transform. More... | |
template<... > | |
void | convolveFFTMany (...) |
Convolve a real-valued array with a sequence of kernels by means of the Fourier transform. More... | |
template<... > | |
void | convolveImage (...) |
Convolve an image with the given kernel(s). More... | |
template<... > | |
void | convolveImageWithMask (...) |
Deprecated name of 2-dimensional normalized convolution, i.e. convolution with a mask image. More... | |
template<... > | |
void | convolveLine (...) |
Performs a 1-dimensional convolution of the source signal using the given kernel. More... | |
template<... > | |
void | convolveMultiArrayOneDimension (...) |
Convolution along a single dimension of a multi-dimensional arrays. More... | |
template<class G , class A , class B > | |
void | copyEdgeMap (const G &g, const A &a, B &b) |
copy a lemon edge map | |
template<... > | |
void | copyImage (...) |
Copy source image into destination image. More... | |
template<... > | |
void | copyImageIf (...) |
Copy source ROI into destination image. More... | |
template<... > | |
void | copyMultiArray (...) |
Copy a multi-dimensional array. More... | |
template<class G , class A , class B > | |
void | copyNodeMap (const G &g, const A &a, B &b) |
copy a lemon node map | |
template<... > | |
void | cornerResponseFunction (...) |
Find corners in an image (1). More... | |
template<... > | |
void | correlateFFT (...) |
Correlate an array with a kernel by means of the Fourier transform. More... | |
template<class REAL > | |
REAL | cos_pi (REAL x) |
cos(pi*x). More... | |
template<unsigned int N, class T > | |
ChunkedArray< N, T >::iterator | createCoupledIterator (ChunkedArray< N, T > &m) |
template<unsigned int N1, class T1 , class S1 > | |
CoupledIteratorType< N1, T1 >::type | createCoupledIterator (MultiArrayView< N1, T1, S1 > const &m1) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 > | |
CoupledIteratorType< N1, T1, T2 >::type | createCoupledIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 , unsigned int N3, class T3 , class S3 > | |
CoupledIteratorType< N1, T1, T2, T3 >::type | createCoupledIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2, MultiArrayView< N3, T3, S3 > const &m3) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 , unsigned int N3, class T3 , class S3 , unsigned int N4, class T4 , class S4 > | |
CoupledIteratorType< N1, T1, T2, T3, T4 >::type | createCoupledIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2, MultiArrayView< N3, T3, S3 > const &m3, MultiArrayView< N4, T4, S4 > const &m4) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 , unsigned int N3, class T3 , class S3 , unsigned int N4, class T4 , class S4 , unsigned int N5, class T5 , class S5 > | |
CoupledIteratorType< N1, T1, T2, T3, T4, T5 >::type | createCoupledIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2, MultiArrayView< N3, T3, S3 > const &m3, MultiArrayView< N4, T4, S4 > const &m4, MultiArrayView< N5, T5, S5 > const &m5) |
template<int N> | |
CoupledIteratorType< N >::type | createCoupledIterator (TinyVector< MultiArrayIndex, N > const &shape) |
template<... > | |
void | createGaborFilter (...) |
Create a gabor filter in frequency space. More... | |
template<unsigned int N1, class T1 , class S1 > | |
HierarchicalIteratorType< N1, T1 >::type | createHierarchicalIterator (MultiArrayView< N1, T1, S1 > const &m1) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 > | |
HierarchicalIteratorType< N1, T1, T2 >::type | createHierarchicalIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 , unsigned int N3, class T3 , class S3 > | |
HierarchicalIteratorType< N1, T1, T2, T3 >::type | createHierarchicalIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2, MultiArrayView< N3, T3, S3 > const &m3) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 , unsigned int N3, class T3 , class S3 , unsigned int N4, class T4 , class S4 > | |
HierarchicalIteratorType< N1, T1, T2, T3, T4 >::type | createHierarchicalIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2, MultiArrayView< N3, T3, S3 > const &m3, MultiArrayView< N4, T4, S4 > const &m4) |
template<unsigned int N1, class T1 , class S1 , unsigned int N2, class T2 , class S2 , unsigned int N3, class T3 , class S3 , unsigned int N4, class T4 , class S4 , unsigned int N5, class T5 , class S5 > | |
HierarchicalIteratorType< N1, T1, T2, T3, T4, T5 >::type | createHierarchicalIterator (MultiArrayView< N1, T1, S1 > const &m1, MultiArrayView< N2, T2, S2 > const &m2, MultiArrayView< N3, T3, S3 > const &m3, MultiArrayView< N4, T4, S4 > const &m4, MultiArrayView< N5, T5, S5 > const &m5) |
template<int N> | |
HierarchicalIteratorType< N >::type | createHierarchicalIterator (TinyVector< MultiArrayIndex, N > const &shape) |
template<... > | |
void | createRGBTiffImage (...) |
Create a 3-band TiffImage from the given RGB image. More... | |
template<... > | |
void | createScalarTiffImage (...) |
Create a single-band TiffImage from the given scalar image. More... | |
template<... > | |
void | createTiffImage (...) |
Create a TiffImage from the given iterator range. More... | |
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 > | |
PromoteTraits< RGBValue< V1, R, G, B >, RGBValue< V2, R, G, B > >::Promote | cross (RGBValue< V1, R, G, B > const &r1, RGBValue< V2, R, G, B > const &r2) |
cross product | |
template<class V1 , class D1 , class D2 , class V2 , class D3 , class D4 > | |
TinyVector< typename PromoteTraits< V1, V2 >::Promote, 3 > | cross (TinyVectorBase< V1, 3, D1, D2 > const &r1, TinyVectorBase< V2, 3, D3, D4 > const &r2) |
cross product | |
template<... > | |
void | crossCorrelation (...) |
This function performes a (slow) cross-correlation. More... | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< typename NumericTraits< V >::Promote, SIZE > | cumprod (TinyVectorBase< V, SIZE, D1, D2 > const &l) |
cumulative product of the vector's elements | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< typename NumericTraits< V >::Promote, SIZE > | cumsum (TinyVectorBase< V, SIZE, D1, D2 > const &l) |
cumulative sum of the vector's elements | |
template<... > | |
void | differenceOfExponentialCrackEdgeImage (...) |
Detect and mark edges in a crack edge image using the Shen/Castan zero-crossing detector. More... | |
template<... > | |
void | differenceOfExponentialEdgeImage (...) |
Detect and mark edges in an edge image using the Shen/Castan zero-crossing detector. More... | |
template<... > | |
void | discDilation (...) |
Apply dilation (maximum) filter with disc of given radius to image. More... | |
template<... > | |
void | discDilationWithMask (...) |
Apply dilation (maximum) filter with disc of given radius to image using a mask. More... | |
template<... > | |
void | discErosion (...) |
Apply erosion (minimum) filter with disc of given radius to image. More... | |
template<... > | |
void | discErosionWithMask (...) |
Apply erosion (minimum) filter with disc of given radius to image using a mask. More... | |
template<... > | |
void | discMedian (...) |
Apply median filter with disc of given radius to image. More... | |
template<... > | |
void | discMedianWithMask (...) |
Apply median filter with disc of given radius to image using a mask. More... | |
template<... > | |
void | discRankOrderFilter (...) |
Apply rank order filter with disc structuring function to the image. More... | |
template<... > | |
void | discRankOrderFilterWithMask (...) |
Apply rank order filter with disc structuring function to the image using a mask. More... | |
template<... > | |
void | distanceTransform (...) |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3> | |
FixedPoint16< IntBits3, OverflowHandling > & | div (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result) |
division with enforced result type. | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | div (TinyVectorBase< V, SIZE, D1, D2 > const &l, V v) |
component-wise scalar division without type promotion | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
PromoteTraits< V1, V2 >::Promote | dot (RGBValue< V1, RIDX1, GIDX1, BIDX1 > const &r1, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r2) |
dot product | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
PromoteTraits< V1, V2 >::Promote | dot (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
dot product | |
doxygen_overloaded_function (template<... > void separableConvolveBlockwise) template< unsigned int N | |
Separated convolution on ChunkedArrays. More... | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
FixedPoint16< IntBits, OverflowHandling > | dual_frac (FixedPoint16< IntBits, OverflowHandling > v) |
dual fractional part. (1 - frac(v)) | |
template<unsigned IntBits, unsigned FracBits> | |
FixedPoint< 0, FracBits > | dual_frac (FixedPoint< IntBits, FracBits > v) |
dual fractional part: 1 - frac(v) . | |
template<unsigned int N, class T , class S , class Array > | |
void | eccentricityCenters (const MultiArrayView< N, T, S > &src, Array ¢ers) |
Find the (approximate) eccentricity center in each region of a labeled image. More... | |
template<unsigned int N, class T , class S , class Array > | |
void | eccentricityTransformOnLabels (MultiArrayView< N, T > const &src, MultiArrayView< N, S > dest, Array ¢ers) |
Computes the (approximate) eccentricity transform on each region of a labeled image. More... | |
template<class GRAPH , class WEIGHTS , class COMPERATOR > | |
void | edgeSort (const GRAPH &g, const WEIGHTS &weights, const COMPERATOR &comperator, std::vector< typename GRAPH::Edge > &sortedEdges) |
get a vector of Edge descriptors More... | |
template<class GRAPH , class EDGE_WEIGHTS , class SEEDS , class LABELS > | |
void | edgeWeightedWatershedsSegmentation (const GRAPH &g, const EDGE_WEIGHTS &edgeWeights, const SEEDS &seeds, LABELS &labels) |
edge weighted watersheds Segmentataion More... | |
template<unsigned int N, class DirectedTag , class T , class EDGEMAP > | |
void | edgeWeightsFromInterpolatedImage (const GridGraph< N, DirectedTag > &g, const MultiArrayView< N, T > &interpolatedImage, EDGEMAP &edgeWeights, bool euclidean=false) |
create edge weights from an interpolated image More... | |
template<unsigned int N, class DirectedTag , class NODEMAP , class EDGEMAP , class FUNCTOR > | |
void | edgeWeightsFromNodeWeights (const GridGraph< N, DirectedTag > &g, const NODEMAP &nodeWeights, EDGEMAP &edgeWeights, bool euclidean, FUNCTOR const &func) |
create edge weights from node weights More... | |
double | ellipticIntegralE (double x, double k) |
The incomplete elliptic integral of the second kind. More... | |
double | ellipticIntegralF (double x, double k) |
The incomplete elliptic integral of the first kind. More... | |
template<... > | |
void | estimateAffineTransform (...) |
Estimate the optical flow between two images according to an affine transform model (e.g. translation, rotation, non-uniform scaling, and shearing). More... | |
template<... > | |
void | estimateGlobalRotation (...) |
Estimate the rotation between two images by means of a normalized cross correlation matching of the FFT spectra. More... | |
template<... > | |
void | estimateGlobalRotationTranslation (...) |
Estimate the (global) rotation and translation between two images by means a normalized cross correlation matching. More... | |
template<... > | |
void | estimateGlobalTranslation (...) |
Estimate the translation between two images by means of a normalized cross correlation matching. More... | |
template<... > | |
void | estimateSimilarityTransform (...) |
Estimate the optical flow between two images according to a similarity transform model (e.g. translation, rotation, and uniform scaling). More... | |
template<... > | |
void | estimateTranslation (...) |
Estimate the optical flow between two images according to a translation model. More... | |
bool | even (int t) |
Check if an integer is even. More... | |
template<... > | |
void | exportImage (...) |
Write an image to a file. More... | |
template<... > | |
void | exportImageAlpha (...) |
Write the image and its alpha channel to a file. More... | |
template<... > | |
void | exportVolume (...) |
Function for exporting a 3D volume. More... | |
template<... > | |
void | extendedLocalMaxima (...) |
Find local maximal regions in an array. More... | |
template<... > | |
void | extendedLocalMaxima3D (...) |
Find local maximal regions in 3D multi array. More... | |
template<... > | |
void | extendedLocalMinima (...) |
Find local minimal regions (plateaus) in an array. More... | |
template<... > | |
void | extendedLocalMinima3D (...) |
Find local minimal regions in a volume. More... | |
template<class T , class S , class PointArray > | |
void | extractContour (MultiArrayView< 2, T, S > const &label_image, Shape2 const &anchor_point, PointArray &contour_points) |
Create a polygon from the interpixel contour of a labeled region. More... | |
template<... > | |
void | fastCrossCorrelation (...) |
This function performes a fast cross-correlation. More... | |
template<... > | |
void | fastNormalizedCrossCorrelation (...) |
This function performes a fast normalized cross-correlation. More... | |
template<class GRAPH , class EDGE_WEIGHTS , class NODE_SIZE , class NODE_LABEL_MAP > | |
void | felzenszwalbSegmentation (const GRAPH &graph, const EDGE_WEIGHTS &edgeWeights, const NODE_SIZE &nodeSizes, float k, NODE_LABEL_MAP &nodeLabeling, const int nodeNumStopCond=-1) |
edge weighted watersheds Segmentataion More... | |
template<class T , int N> | |
TinyVector< T, N > | fftwCorrespondingShapeR2C (TinyVector< T, N > shape) |
Find frequency domain shape for a R2C Fourier transform. More... | |
template<class G , class A , class T > | |
void | fillEdgeMap (const G &g, A &a, const T &value) |
fill a lemon edge map | |
template<class G , class A , class T > | |
void | fillNodeMap (const G &g, A &a, const T &value) |
fill a lemon node map | |
template<class Point , class T , class S , class Value > | |
void | fillPolygon (Polygon< Point > const &p, MultiArrayView< 2, T, S > &output_image, Value value) |
Render closed polygon p into the image output_image. More... | |
template<class TARGET , int IntBits, FPOverflowHandling OverflowHandling> | |
TARGET | fixed_point_cast (FixedPoint16< IntBits, OverflowHandling > v) |
template<class TARGET , unsigned IntBits, unsigned FracBits> | |
TARGET | fixed_point_cast (FixedPoint< IntBits, FracBits > v) |
template<typename IntType > | |
Rational< IntType > | floor (const Rational< IntType > &r) |
largest integer not larger than r | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
Int32 | floor (FixedPoint16< IntBits, OverflowHandling > v) |
rounding down. | |
template<unsigned IntBits, unsigned FracBits> | |
int | floor (FixedPoint< IntBits, FracBits > v) |
rounding down. | |
template<class V , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> | |
RGBValue< V, RIDX, GIDX, BIDX > | floor (RGBValue< V, RIDX, GIDX, BIDX > const &r) |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | floor (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
UInt32 | floorPower2 (UInt32 x) |
Round down to the nearest power of 2. More... | |
template<int SIZE> | |
TinyVector< UInt32, SIZE > | floorPower2 (vigra::TinyVector< UInt32, SIZE > const &t) |
Round down values to the nearest power of 2. Implemented only for UInt32. | |
template<... > | |
void | foerstnerCornerDetector (...) |
Find corners in an image (2). More... | |
template<typename TPL , typename FUNCTOR > | |
void | for_each_in_tuple (TPL &&t, FUNCTOR &&f) |
template<... > | |
void | fourierTransform (...) |
Compute forward and inverse Fourier transforms. More... | |
template<... > | |
void | fourierTransformInverse (...) |
Compute inverse Fourier transforms. More... | |
template<... > | |
void | fourierTransformReal (...) |
Real Fourier transforms for even and odd boundary conditions (aka. cosine and sine transforms). More... | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
FixedPoint16< IntBits, OverflowHandling > | frac (FixedPoint16< IntBits, OverflowHandling > v) |
fractional part. (difference between v and its floor) | |
template<unsigned IntBits, unsigned FracBits> | |
FixedPoint< 0, FracBits > | frac (FixedPoint< IntBits, FracBits > v) |
fractional part. | |
template<... > | |
void | frostFilter (...) |
This function tries to reduce the speckle noise of an image by applying the basic Frost filter. More... | |
double | gamma (double x) |
The gamma function. More... | |
template<... > | |
void | gaussianDivergenceMultiArray (...) |
Calculate the divergence of a vector field using Gaussian derivative filters. More... | |
template<... > | |
void | gaussianGradient (...) |
Calculate the gradient vector by means of a 1st derivatives of Gaussian filter. More... | |
template<... > | |
void | gaussianGradientMagnitude (...) |
Calculate the gradient magnitude by means of a 1st derivatives of Gaussian filter. More... | |
template<... > | |
void | gaussianGradientMultiArray (...) |
Calculate Gaussian gradient of a multi-dimensional arrays. More... | |
template<... > | |
void | gaussianSharpening (...) |
Perform sharpening function with gaussian filter. More... | |
template<... > | |
void | gaussianSmoothing (...) |
Perform isotropic Gaussian convolution. More... | |
template<... > | |
void | gaussianSmoothMultiArray (...) |
Isotropic Gaussian smoothing of a multi-dimensional arrays. More... | |
template<typename IntType > | |
IntType | gcd (IntType n, IntType m) |
template<... > | |
unsigned int | generateSlicSeeds (...) |
Generate seeds for SLIC superpixel computation in arbitrary dimensions. More... | |
template<... > | |
unsigned int | generateWatershedSeeds (...) |
Generate seeds for watershed computation and seeded region growing. More... | |
template<unsigned int TARGET_INDEX, class Handle > | |
CoupledHandleCast< TARGET_INDEX, Handle >::reference | get (Handle &handle) |
template<unsigned int TARGET_INDEX, class Handle > | |
CoupledHandleCast< TARGET_INDEX, Handle >::const_reference | get (Handle const &handle) |
template<... > | |
void | getAnisotropy (...) |
Sets up directional data for anisotropic regularization. More... | |
template<... > | |
void | gradientBasedTransform (...) |
Calculate a function of the image gradient. More... | |
template<... > | |
void | gradientEnergyTensor (...) |
Calculate the gradient energy tensor for a scalar valued image. More... | |
template<class GRAPH , class NODE_FEATURES_IN , class EDGE_INDICATOR , class NODE_FEATURES_OUT > | |
void | graphSmoothing (const GRAPH &g, const NODE_FEATURES_IN &nodeFeaturesIn, const EDGE_INDICATOR &edgeIndicator, const float lambda, const float edgeThreshold, const float scale, NODE_FEATURES_OUT &nodeFeaturesOut) |
smooth node features of a graph More... | |
template<class T1 , class T2 > | |
bool | greaterEqualAtTolerance (T1 l, T2 r, typename PromoteTraits< T1, T2 >::Promote epsilon) |
Tolerance based floating-point greater-or-equal. More... | |
template<... > | |
void | hessianMatrixOfGaussian (...) |
Filter image with the 2nd derivatives of the Gaussian at the given scale to get the Hessian matrix. More... | |
template<... > | |
void | hessianOfGaussianMultiArray (...) |
Calculate Hessian matrix of a N-dimensional arrays using Gaussian derivative filters. More... | |
template<... > | |
void | hierarchicalClustering (...) |
Reduce the number of nodes in a graph by iteratively contracting the cheapest edge. More... | |
template<... > | |
void | hourGlassFilter (...) |
Anisotropic tensor smoothing with the hourglass filter. More... | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
FixedPoint16< IntBits, OverflowHandling > | hypot (FixedPoint16< IntBits, OverflowHandling > v1, FixedPoint16< IntBits, OverflowHandling > v2) |
Length of hypotenuse. | |
template<class R > | |
R | imag (const FFTWComplex< R > &a) |
imaginary part | |
std::string | impexListExtensions () |
List the file extension VIGRA understands. More... | |
std::string | impexListFormats () |
List the image formats VIGRA can read and write. More... | |
template<... > | |
void | importImage (...) |
Read an image from a file. More... | |
template<... > | |
void | importImageAlpha (...) |
Read the image specified by the given vigra::ImageImportInfo object including its alpha channel. More... | |
template<... > | |
void | importTiffImage (...) |
Read a given TIFF image. More... | |
template<... > | |
void | importVolume (...) |
Function for importing a 3D volume. More... | |
template<class Iterator , class IndexIterator , class Compare > | |
void | indexSort (Iterator first, Iterator last, IndexIterator index_first, Compare c) |
Return the index permutation that would sort the input array. More... | |
template<... > | |
void | initImage (...) |
Write a value to every pixel in an image or rectangular ROI. More... | |
template<... > | |
void | initImageBorder (...) |
Write value to the specified border pixels in the image. More... | |
template<... > | |
void | initImageIf (...) |
Write value to pixel in the image if mask is true. More... | |
template<... > | |
void | initImageWithFunctor (...) |
Write the result of a functor call to every pixel in an image or rectangular ROI. More... | |
template<... > | |
void | initMultiArray (...) |
Write a value to every element in a multi-dimensional array. More... | |
template<... > | |
void | initMultiArrayBorder (...) |
Write values to the specified border values in the array. More... | |
template<... > | |
void | inspectImage (...) |
Apply read-only functor to every pixel in the image. More... | |
template<... > | |
void | inspectImageIf (...) |
Apply read-only functor to every pixel in the ROI. More... | |
template<... > | |
void | inspectMultiArray (...) |
Call an analyzing functor at every element of a multi-dimensional array. More... | |
template<... > | |
void | inspectSequence (...) |
Call an analyzing functor at every element of a sequence. More... | |
template<... > | |
void | inspectTwoImages (...) |
Apply read-only functor to every pixel of both images. More... | |
template<... > | |
void | inspectTwoImagesIf (...) |
Apply read-only functor to those pixels of both images where the mask image is non-zero. More... | |
template<... > | |
void | inspectTwoMultiArrays (...) |
Call an analyzing functor at all corresponding elements of two multi-dimensional arrays. More... | |
template<class InIterator , class OutIterator > | |
void | inversePermutation (InIterator first, InIterator last, OutIterator out) |
Compute the inverse of a given permutation. More... | |
AtImageBorder | isAtImageBorder (int x, int y, int width, int height) |
Find out whether a point is at the image border. More... | |
AtVolumeBorder | isAtVolumeBorder (int x, int y, int z, int width, int height, int depth) |
Find out whether a voxel is at the volume border. More... | |
AtVolumeBorder | isAtVolumeBorderAntiCausal (int x, int y, int z, int width, int height, int depth) |
Find out whether a voxel is at a scan-order relevant volume border. This function checks if x == 0 or y == 0 or z == 0 and returns the appropriate value of vigra::AtVolumeBorder, or zero when the voxel is not at te volume border. The behavior of the function is undefined if (x,y,z) is not inside the volume. More... | |
AtVolumeBorder | isAtVolumeBorderCausal (int x, int y, int z, int width, int height, int) |
Find out whether a voxel is at a scan-order relevant volume border. This function checks if x == 0 or y == 0 or z == 0 and returns the appropriate value of vigra::AtVolumeBorder, or zero when the voxel is not at te volume border. The behavior of the function is undefined if (x,y,z) is not inside the volume. | |
bool | isHDF5 (char const *filename) |
Check if given filename refers to a HDF5 file. | |
bool | isImage (char const *filename) |
Test whether a file is an image format known to VIGRA. More... | |
bool | isPower2 (UInt32 x) |
Determine whether x is a power of 2 Bit twiddle from https://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2. | |
template<class V > | |
TinyVector< float, 3 > | lab2Polar (V const &lab) |
Create polar representation form L*a*b*. More... | |
template<... > | |
unsigned int | labelImage (...) |
Find the connected components of a segmented image. More... | |
template<... > | |
unsigned int | labelImageWithBackground (...) |
Find the connected components of a segmented image, excluding the background from labeling. More... | |
template<... > | |
unsigned int | labelMultiArray (...) |
Find the connected components of a MultiArray with arbitrary many dimensions. More... | |
template<... > | |
unsigned int | labelMultiArrayBlockwise (...) |
Connected components labeling for MultiArrays and ChunkedArrays. More... | |
template<... > | |
unsigned int | labelMultiArrayWithBackground (...) |
Find the connected components of a MultiArray with arbitrary many dimensions, excluding the background from labeling. More... | |
template<... > | |
unsigned int | labelVolume (...) |
Find the connected components of a segmented volume. More... | |
template<class SrcIterator , class SrcAccessor , class SrcShape , class DestIterator , class DestAccessor > | |
unsigned int | labelVolumeSix (triple< SrcIterator, SrcShape, SrcAccessor > src, pair< DestIterator, DestAccessor > dest) |
Find the connected components of a segmented volume using the 6-neighborhood. More... | |
template<... > | |
unsigned int | labelVolumeWithBackground (...) |
Find the connected components of a segmented volume, excluding the background from labeling. More... | |
template<... > | |
void | laplacianOfGaussian (...) |
Filter image with the Laplacian of Gaussian operator at the given scale. More... | |
template<... > | |
void | laplacianOfGaussianMultiArray (...) |
Calculate Laplacian of a N-dimensional arrays using Gaussian derivative filters. More... | |
template<typename IntType > | |
IntType | lcm (IntType n, IntType m) |
template<class REAL > | |
REAL | legendre (unsigned int l, int m, REAL x) |
Associated Legendre polynomial. More... | |
template<class REAL > | |
REAL | legendre (unsigned int l, REAL x) |
Legendre polynomial. More... | |
template<class T1 , class T2 > | |
bool | lessEqualAtTolerance (T1 l, T2 r, typename PromoteTraits< T1, T2 >::Promote epsilon) |
Tolerance based floating-point less-or-equal. More... | |
template<class Multiplier , class DestValueType > | |
LinearIntensityTransform< DestValueType, Multiplier > | linearIntensityTransform (Multiplier scale, DestValueType offset) |
Apply a linear transform to the source pixel values. More... | |
template<... > | |
bool | linearNoiseNormalization (...) |
Noise normalization by means of an estimated or given linear noise model. 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... | |
template<class Iterator , class Value > | |
void | linearSequence (Iterator first, Iterator last, Value start, Value step) |
Fill an array with a sequence of numbers. More... | |
template<... > | |
void | localMaxima (...) |
Find local maxima in an image or multi-dimensional array. More... | |
template<... > | |
void | localMaxima3D (...) |
Find local maxima in a 3D multi array. More... | |
template<... > | |
void | localMinima (...) |
Find local minima in an image or multi-dimensional array. More... | |
template<... > | |
void | localMinima3D (...) |
Find local minima in a 3D multi array. More... | |
Int32 | log2i (UInt32 x) |
Compute the base-2 logarithm of an integer. More... | |
double | loggamma (double x) |
The natural logarithm of the gamma function. More... | |
template<class V > | |
TinyVector< float, 3 > | luv2Polar (V const &luv) |
Create polar representation form L*u*v*. More... | |
template<class T > | |
BasicImageView< T > | makeBasicImageView (MultiArray< 3, T > const &array) |
template<class T , class Stride > | |
BasicImageView< T > | makeBasicImageView (MultiArrayView< 2, T, Stride > const &array) |
template<class ArrayLike , class Compare > | |
detail::IndexCompare< ArrayLike, Compare > | makeIndexComparator (ArrayLike a, Compare c) |
Create a compare functor for indirect sort. More... | |
template<class GRAPH_IN , class GRAPH_IN_NODE_LABEL_MAP > | |
void | makeRegionAdjacencyGraph (GRAPH_IN graphIn, GRAPH_IN_NODE_LABEL_MAP labels, AdjacencyListGraph &rag, typename AdjacencyListGraph::template EdgeMap< std::vector< typename GRAPH_IN::Edge > > &affiliatedEdges, const Int64 ignoreLabel=-1) |
make a region adjacency graph from a graph and labels w.r.t. that graph More... | |
template<class T , class Stride > | |
BasicImageView< RGBValue< T > > | makeRGBImageView (MultiArrayView< 3, T, Stride > const &array) |
template<class V , int SIZE, class D1 , class D2 > | |
const V & | max (TinyVectorBase< V, SIZE, D1, D2 > const &l) |
maximum element | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
TinyVector< typename PromoteTraits< V1, V2 >::Promote, SIZE > | max (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
element-wise maximum | |
template<... > | |
void | medianFilter (...) |
This function calculates the median of a window of given size for the complete image. More... | |
triple< Diff2D, Diff2D, MeshGridAccessor > | meshGrid (Diff2D upperLeft, Diff2D lowerRight) |
template<class V , int SIZE, class D1 , class D2 > | |
const V & | min (TinyVectorBase< V, SIZE, D1, D2 > const &l) |
minimum element | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
TinyVector< typename PromoteTraits< V1, V2 >::Promote, SIZE > | min (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
element-wise minimum | |
template<... > | |
void | moveDCToCenter (...) |
Rearrange the quadrants of a Fourier image so that the origin is in the image center. More... | |
template<... > | |
void | moveDCToUpperLeft (...) |
Rearrange the quadrants of a Fourier image so that the origin is in the image's upper left. More... | |
template<class Vector > | |
double | mtfFitGaussian (Vector const &mtf) |
Fit a Gaussian function to a given MTF. More... | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3> | |
FixedPoint16< IntBits3, OverflowHandling > & | mul (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result) |
multiplication with enforced result type. | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2, unsigned IntBits3, unsigned FracBits3> | |
void | mul (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r, FixedPoint< IntBits3, FracBits3 > &result) |
multiplication with enforced result type. | |
template<... > | |
void | multiBinaryDilation (...) |
Binary dilation on multi-dimensional arrays. More... | |
template<... > | |
void | multiBinaryErosion (...) |
Binary erosion on multi-dimensional arrays. More... | |
template<... > | |
void | multiGrayscaleDilation (...) |
Parabolic grayscale dilation on multi-dimensional arrays. More... | |
template<... > | |
void | multiGrayscaleErosion (...) |
Parabolic grayscale erosion on multi-dimensional arrays. 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... | |
double | noncentralChi2 (unsigned int degreesOfFreedom, double noncentrality, double arg, double accuracy=1e-7) |
Non-central chi square distribution. More... | |
double | noncentralChi2CDF (unsigned int degreesOfFreedom, double noncentrality, double arg, double accuracy=1e-7) |
Cumulative non-central chi square distribution. More... | |
double | noncentralChi2CDFApprox (unsigned int degreesOfFreedom, double noncentrality, double arg) |
Cumulative non-central chi square distribution (approximate). More... | |
template<... > | |
void | nonlinearDiffusion (...) |
Perform edge-preserving smoothing at the given scale. More... | |
template<... > | |
void | nonlinearDiffusionExplicit (...) |
Perform edge-preserving smoothing at the given scale using an explicit scheme. More... | |
template<... > | |
void | nonlinearLeastSquares (...) |
Fit a non-linear model to given data by minimizing least squares loss. More... | |
template<... > | |
bool | nonparametricNoiseNormalization (...) |
Noise normalization by means of an estimated non-parametric noise model. More... | |
template<class R > | |
FFTWComplex< R >::NormType | norm (const FFTWComplex< R > &a) |
norm (= magnitude) | |
template<typename IntType > | |
Rational< IntType > | norm (const Rational< IntType > &r) |
norm (same as abs(r) ) | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
NormTraits< FixedPoint16< IntBits, OverflowHandling > >::NormType | norm (FixedPoint16< IntBits, OverflowHandling > const &v) |
norm (same as abs). | |
template<unsigned IntBits, unsigned FracBits> | |
FixedPoint< IntBits, FracBits > | norm (FixedPoint< IntBits, FracBits > const &v) |
norm (same as abs). | |
template<class T > | |
NormTraits< T >::NormType | norm (T const &t) |
The norm of a numerical object. More... | |
template<... > | |
void | normalizedConvolveImage (...) |
Performs a 2-dimensional normalized convolution, i.e. convolution with a mask image. More... | |
template<... > | |
void | normalizedCrossCorrelation (...) |
This function performes a (slow) normalized cross-correlation. More... | |
std::string | normalizeString (std::string const &s) |
bool | odd (int t) |
Check if an integer is odd. More... | |
template<typename IntType1 , typename IntType2 > | |
bool | operator!= (const Rational< IntType1 > &l, IntType2 const &i) |
inequality with right-hand IntType2 argument | |
template<class R > | |
bool | operator!= (double a, const FFTWComplex< R > &b) |
not equal | |
template<class R > | |
bool | operator!= (FFTWComplex< R > const &a, const FFTWComplex< R > &b) |
not equal | |
template<class R > | |
bool | operator!= (FFTWComplex< R > const &a, double b) |
not equal | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
bool | operator!= (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
not equal | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
bool | operator!= (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
not equal | |
template<typename IntType1 , typename IntType2 > | |
bool | operator!= (IntType1 const &l, Rational< IntType2 > const &r) |
inequality with left-hand IntType1 argument | |
template<typename IntType1 , typename IntType2 > | |
bool | operator!= (Rational< IntType1 > const &l, Rational< IntType2 > const &r) |
inequality | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
bool | operator!= (RGBValue< V1, RIDX1, GIDX1, BIDX1 > const &l, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r) |
component-wise not equal | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | operator!= (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise not equal | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator% (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise modulo | |
template<typename Type > | |
Quaternion< Type > | operator* (const Quaternion< Type > &t1, const Quaternion< Type > &t2) |
Multiplication. | |
template<typename Type > | |
Quaternion< Type > | operator* (const Quaternion< Type > &t1, double t2) |
Multiplication with a scalar on the right. | |
template<class R > | |
FFTWComplex< R > | operator* (double a, FFTWComplex< R > b) |
left multiplication with scalar double | |
template<typename Type > | |
Quaternion< Type > | operator* (double t1, const Quaternion< Type > &t2) |
Multiplication with a scalar on the left. | |
template<class V , unsigned int R, unsigned int G, unsigned int B> | |
NumericTraits< RGBValue< V, R, G, B > >::RealPromote | operator* (double v, RGBValue< V, R, G, B > const &r) |
component-wise left scalar multiplication | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator* (double v, TinyVectorBase< V, SIZE, D1, D2 > const &r) |
component-wise left scalar multiplication | |
template<class R > | |
FFTWComplex< R > | operator* (FFTWComplex< R > a, const FFTWComplex< R > &b) |
multiplication | |
template<class R > | |
FFTWComplex< R > | operator* (FFTWComplex< R > a, double b) |
right multiplication with scalar double | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
PromoteTraits< FixedPoint16< IntBits1, OverflowHandling >, FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator* (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
multiplication with automatic determination of the appropriate result type. | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
FixedPointTraits< FixedPoint< IntBits1, FracBits1 >, FixedPoint< IntBits2, FracBits2 > >::MultipliesType | operator* (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
multiplication with automatic determination of the appropriate result type. | |
template<typename IntType > | |
Rational< IntType > | operator* (Rational< IntType > l, Rational< IntType > const &r) |
multiplication | |
template<typename IntType > | |
Rational< IntType > | operator* (Rational< IntType > l, typename Rational< IntType >::param_type r) |
multiplication with right-hand IntType argument | |
template<class V , unsigned int R, unsigned int G, unsigned int B> | |
NumericTraits< RGBValue< V, R, G, B > >::RealPromote | operator* (RGBValue< V, R, G, B > const &r, double v) |
component-wise right scalar multiplication | |
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 > | |
PromoteTraits< RGBValue< V1, R, G, B >, RGBValue< V2, R, G, B > >::Promote | operator* (RGBValue< V1, R, G, B > const &r1, RGBValue< V2, R, G, B > const &r2) |
component-wise multiplication | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator* (TinyVectorBase< V, SIZE, D1, D2 > const &l, double v) |
component-wise right scalar multiplication | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator* (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise multiplication | |
template<typename IntType > | |
Rational< IntType > | operator* (typename Rational< IntType >::param_type l, Rational< IntType > r) |
multiplication with left-hand IntType argument | |
template<class R > | |
FFTWComplex< R > & | operator*= (FFTWComplex< R > &a, const FFTWComplex< R > &b) |
multiply-assignment | |
template<class R > | |
FFTWComplex< R > & | operator*= (FFTWComplex< R > &a, double b) |
multiply-assignment with scalar double | |
template<class V , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> | |
RGBValue< V, RIDX, GIDX, BIDX > & | operator*= (RGBValue< V, RIDX, GIDX, BIDX > &l, double r) |
componentwise scalar multiply-assignment | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
RGBValue< V1, RIDX1, GIDX1, BIDX1 > & | operator*= (RGBValue< V1, RIDX1, GIDX1, BIDX1 > &l, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r) |
componentwise multiply-assignment | |
template<typename Type > | |
Quaternion< Type > | operator+ (const Quaternion< Type > &t1, const Quaternion< Type > &t2) |
Addition. | |
template<typename Type > | |
Quaternion< Type > | operator+ (const Quaternion< Type > &t1, const Type &t2) |
Addition of a scalar on the right. | |
template<typename IntType > | |
Rational< IntType > | operator+ (const Rational< IntType > &r) |
unary plus | |
template<typename Type > | |
Quaternion< Type > | operator+ (const Type &t1, const Quaternion< Type > &t2) |
Addition of a scalar on the left. | |
Diff2D | operator+ (Diff2D const &a, Diff2D const &b) |
template<class R > | |
FFTWComplex< R > | operator+ (double a, FFTWComplex< R > b) |
left addition with scalar double | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator+ (double v, TinyVectorBase< V, SIZE, D1, D2 > const &r) |
component-wise left scalar addition | |
template<class R > | |
FFTWComplex< R > | operator+ (FFTWComplex< R > a, const FFTWComplex< R > &b) |
addition | |
template<class R > | |
FFTWComplex< R > | operator+ (FFTWComplex< R > a, double b) |
right addition with scalar double | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
PromoteTraits< FixedPoint16< IntBits1, OverflowHandling >, FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator+ (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
addition with automatic determination of the appropriate result type. | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
FixedPointTraits< FixedPoint< IntBits1, FracBits1 >, FixedPoint< IntBits2, FracBits2 > >::PlusType | operator+ (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
addition with automatic determination of the appropriate result type. | |
Point2D | operator+ (Point2D const &a, Diff2D const &b) |
template<typename IntType > | |
Rational< IntType > | operator+ (Rational< IntType > l, Rational< IntType > const &r) |
addition | |
template<typename IntType > | |
Rational< IntType > | operator+ (Rational< IntType > l, typename Rational< IntType >::param_type r) |
addition of right-hand IntType argument | |
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 > | |
PromoteTraits< RGBValue< V1, R, G, B >, RGBValue< V2, R, G, B > >::Promote | operator+ (RGBValue< V1, R, G, B > const &r1, RGBValue< V2, R, G, B > const &r2) |
component-wise addition | |
Size2D | operator+ (Size2D const &a, Diff2D const &b) |
Point2D | operator+ (Size2D const &s, Point2D const &p) |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator+ (TinyVectorBase< V, SIZE, D1, D2 > const &l, double v) |
component-wise right scalar addition | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator+ (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise addition | |
template<typename IntType > | |
Rational< IntType > | operator+ (typename Rational< IntType >::param_type l, Rational< IntType > r) |
addition of left-hand IntType argument | |
template<class R > | |
FFTWComplex< R > & | operator+= (FFTWComplex< R > &a, const FFTWComplex< R > &b) |
add-assignment | |
template<class R > | |
FFTWComplex< R > & | operator+= (FFTWComplex< R > &a, double b) |
add-assignment with scalar double | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
RGBValue< V1, RIDX1, GIDX1, BIDX1 > & | operator+= (RGBValue< V1, RIDX1, GIDX1, BIDX1 > &l, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r) |
componentwise add-assignment | |
template<typename Type > | |
Quaternion< Type > | operator- (const Quaternion< Type > &t1, const Quaternion< Type > &t2) |
Subtraction. | |
template<typename Type > | |
Quaternion< Type > | operator- (const Quaternion< Type > &t1, const Type &t2) |
Subtraction of a scalar on the right. | |
template<typename IntType > | |
Rational< IntType > | operator- (const Rational< IntType > &r) |
unary minus (negation) | |
template<typename Type > | |
Quaternion< Type > | operator- (const Type &t1, const Quaternion< Type > &t2) |
Subtraction of a scalar on the left. | |
Diff2D | operator- (Diff2D const &a, Diff2D const &b) |
template<class R > | |
FFTWComplex< R > | operator- (double a, FFTWComplex< R > const &b) |
left subtraction with scalar double | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator- (double v, TinyVectorBase< V, SIZE, D1, D2 > const &r) |
component-wise left scalar subtraction | |
template<class R > | |
FFTWComplex< R > | operator- (FFTWComplex< R > a, const FFTWComplex< R > &b) |
subtraction | |
template<class R > | |
FFTWComplex< R > | operator- (FFTWComplex< R > a, double b) |
right subtraction with scalar double | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
PromoteTraits< FixedPoint16< IntBits1, OverflowHandling >, FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator- (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
subtraction with automatic determination of the appropriate result type. | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
FixedPointTraits< FixedPoint< IntBits1, FracBits1 >, FixedPoint< IntBits2, FracBits2 > >::MinusType | operator- (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
subtraction with automatic determination of the appropriate result type. | |
Point2D | operator- (Point2D const &s, Diff2D const &offset) |
Size2D | operator- (Point2D const &s, Point2D const &p) |
template<typename IntType > | |
Rational< IntType > | operator- (Rational< IntType > l, Rational< IntType > const &r) |
subtraction | |
template<typename IntType > | |
Rational< IntType > | operator- (Rational< IntType > l, typename Rational< IntType >::param_type r) |
subtraction of right-hand IntType argument | |
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 > | |
PromoteTraits< RGBValue< V1, R, G, B >, RGBValue< V2, R, G, B > >::Promote | operator- (RGBValue< V1, R, G, B > const &r1, RGBValue< V2, R, G, B > const &r2) |
component-wise subtraction | |
Size2D | operator- (Size2D const &s, Diff2D const &offset) |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator- (TinyVectorBase< V, SIZE, D1, D2 > const &l, double v) |
component-wise right scalar subtraction | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | operator- (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator- (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise subtraction | |
template<typename IntType > | |
Rational< IntType > | operator- (typename Rational< IntType >::param_type l, Rational< IntType > const &r) |
subtraction from left-hand IntType argument | |
template<class R > | |
FFTWComplex< R > & | operator-= (FFTWComplex< R > &a, const FFTWComplex< R > &b) |
subtract-assignment | |
template<class R > | |
FFTWComplex< R > & | operator-= (FFTWComplex< R > &a, double b) |
subtract-assignment with scalar double | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
RGBValue< V1, RIDX1, GIDX1, BIDX1 > & | operator-= (RGBValue< V1, RIDX1, GIDX1, BIDX1 > &l, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r) |
componentwise subtract-assignment | |
template<typename Type > | |
Quaternion< Type > | operator/ (const Quaternion< Type > &t1, const Quaternion< Type > &t2) |
Division. | |
template<typename Type > | |
Quaternion< Type > | operator/ (const Quaternion< Type > &t1, double t2) |
Division by a scalar. | |
template<typename Type > | |
Quaternion< Type > | operator/ (double t1, const Quaternion< Type > &t2) |
Division of a scalar by a Quaternion. | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator/ (double v, TinyVectorBase< V, SIZE, D1, D2 > const &r) |
component-wise left scalar division | |
template<class R > | |
FFTWComplex< R > | operator/ (FFTWComplex< R > a, const FFTWComplex< R > &b) |
division | |
template<class R > | |
FFTWComplex< R > | operator/ (FFTWComplex< R > a, double b) |
right division with scalar double | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
PromoteTraits< FixedPoint16< IntBits1, OverflowHandling >, FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator/ (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
division with automatic determination of the appropriate result type. | |
template<typename IntType > | |
Rational< IntType > | operator/ (Rational< IntType > l, Rational< IntType > const &r) |
division | |
template<typename IntType > | |
Rational< IntType > | operator/ (Rational< IntType > l, typename Rational< IntType >::param_type r) |
division by right-hand IntType argument | |
template<class V , unsigned int R, unsigned int G, unsigned int B> | |
NumericTraits< RGBValue< V, R, G, B > >::RealPromote | operator/ (RGBValue< V, R, G, B > const &r, double v) |
component-wise scalar division | |
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 > | |
PromoteTraits< RGBValue< V1, R, G, B >, RGBValue< V2, R, G, B > >::Promote | operator/ (RGBValue< V1, R, G, B > const &r1, RGBValue< V2, R, G, B > const &r2) |
component-wise division | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator/ (TinyVectorBase< V, SIZE, D1, D2 > const &l, double v) |
component-wise right scalar division | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator/ (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise division | |
template<typename IntType > | |
Rational< IntType > | operator/ (typename Rational< IntType >::param_type l, Rational< IntType > const &r) |
division of left-hand IntType argument | |
template<class R > | |
FFTWComplex< R > & | operator/= (FFTWComplex< R > &a, const FFTWComplex< R > &b) |
divide-assignment | |
template<class R > | |
FFTWComplex< R > & | operator/= (FFTWComplex< R > &a, double b) |
divide-assignment with scalar double | |
template<class V , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> | |
RGBValue< V, RIDX, GIDX, BIDX > & | operator/= (RGBValue< V, RIDX, GIDX, BIDX > &l, double r) |
componentwise scalar divide-assignment | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
RGBValue< V1, RIDX1, GIDX1, BIDX1 > & | operator/= (RGBValue< V1, RIDX1, GIDX1, BIDX1 > &l, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r) |
componentwise divide-assignment | |
template<typename IntType1 , typename IntType2 > | |
bool | operator< (const Rational< IntType1 > &l, const Rational< IntType2 > &r) |
less-than | |
template<typename IntType1 , typename IntType2 > | |
bool | operator< (const Rational< IntType1 > &l, IntType2 const &i) |
less-than with right-hand IntType2 argument | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
bool | operator< (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
less than | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
bool | operator< (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
less than | |
template<typename IntType1 , typename IntType2 > | |
bool | operator< (IntType1 const &l, Rational< IntType2 > const &r) |
less-than with left-hand IntType1 argument | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | operator< (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
lexicographical comparison | |
std::ostream & | operator<< (std::ostream &os, const SIFImportInfo &info) |
template<class V1 , int SIZE, class DATA , class DERIVED > | |
std::ostream & | operator<< (std::ostream &out, TinyVectorBase< V1, SIZE, DATA, DERIVED > const &l) |
stream output | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
bool | operator<= (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
less or equal | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
bool | operator<= (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
less or equal | |
template<typename IntType1 , typename IntType2 > | |
bool | operator<= (IntType1 const &l, Rational< IntType2 > const &r) |
less-equal with left-hand IntType1 argument | |
template<typename IntType1 , typename IntType2 > | |
bool | operator<= (Rational< IntType1 > const &l, IntType2 const &r) |
less-equal with right-hand IntType2 argument | |
template<typename IntType1 , typename IntType2 > | |
bool | operator<= (Rational< IntType1 > const &l, Rational< IntType2 > const &r) |
less-equal | |
template<typename IntType1 , typename IntType2 > | |
bool | operator== (const Rational< IntType1 > &l, const Rational< IntType2 > &r) |
equality | |
template<typename IntType1 , typename IntType2 > | |
bool | operator== (const Rational< IntType1 > &l, IntType2 const &i) |
equality with right-hand IntType2 argument | |
template<class R > | |
bool | operator== (FFTWComplex< R > const &a, const FFTWComplex< R > &b) |
equal | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
bool | operator== (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
equal | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
bool | operator== (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
equal | |
template<typename IntType1 , typename IntType2 > | |
bool | operator== (IntType1 const &l, Rational< IntType2 > const &r) |
equality with left-hand IntType1 argument | |
template<class V1 , unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1, class V2 , unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2> | |
bool | operator== (RGBValue< V1, RIDX1, GIDX1, BIDX1 > const &l, RGBValue< V2, RIDX2, GIDX2, BIDX2 > const &r) |
component-wise equal | |
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 > | |
bool | operator== (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r) |
component-wise equal | |
template<typename IntType1 , typename IntType2 > | |
bool | operator> (const Rational< IntType1 > &l, IntType2 const &i) |
greater-than with right-hand IntType2 argument | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
bool | operator> (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
greater | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
bool | operator> (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
greater | |
template<typename IntType1 , typename IntType2 > | |
bool | operator> (IntType1 const &l, Rational< IntType2 > const &r) |
greater-than with left-hand IntType1 argument | |
template<typename IntType1 , typename IntType2 > | |
bool | operator> (Rational< IntType1 > const &l, Rational< IntType2 > const &r) |
greater-than | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2> | |
bool | operator>= (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r) |
greater or equal | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2> | |
bool | operator>= (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r) |
greater or equal | |
template<typename IntType1 , typename IntType2 > | |
bool | operator>= (IntType1 const &l, Rational< IntType2 > const &r) |
greater-equal with left-hand IntType1 argument | |
template<typename IntType1 , typename IntType2 > | |
bool | operator>= (Rational< IntType1 > const &l, IntType2 const &r) |
greater-equal with right-hand IntType2 argument | |
template<typename IntType1 , typename IntType2 > | |
bool | operator>= (Rational< IntType1 > const &l, Rational< IntType2 > const &r) |
greater-equal | |
template<... > | |
void | parallel_foreach (...) |
Apply a functor to all items in a range in parallel. More... | |
template<class NODE , class PREDECESSORS > | |
size_t | pathLength (const NODE source, const NODE target, const PREDECESSORS &predecessors) |
get the length in node units of a path | |
template<... > | |
void | pLSA (...) |
Decompose a matrix according to the pLSA algorithm. More... | |
TinyVector< float, 3 > | polar2Lab (double color, double brightness, double saturation) |
Init L*a*b* color triple from polar representation. More... | |
TinyVector< float, 3 > | polar2Luv (double color, double brightness, double saturation) |
Init L*u*v* color triple from polar representation. More... | |
TinyVector< float, 3 > | polar2YPrimeCbCr (double color, double brightness, double saturation) |
Init Y'CbCr color triple from polar representation. More... | |
TinyVector< float, 3 > | polar2YPrimeIQ (double color, double brightness, double saturation) |
Init Y'IQ color triple from polar representation. More... | |
TinyVector< float, 3 > | polar2YPrimePbPr (double color, double brightness, double saturation) |
Init Y'PbPr color triple from polar representation. More... | |
TinyVector< float, 3 > | polar2YPrimeUV (double color, double brightness, double saturation) |
Init Y'UV color triple from polar representation. More... | |
template<int PolynomOrder, class SrcPointIterator , class DestPointIterator > | |
linalg::TemporaryMatrix< double > | polynomialMatrix2DFromCorrespondingPoints (SrcPointIterator s, SrcPointIterator s_end, DestPointIterator d) |
Create polynomial matrix of a certain degree that maps corresponding points onto each other. More... | |
template<class POLYNOMIAL , class VECTOR > | |
bool | polynomialRealRoots (POLYNOMIAL const &p, VECTOR &roots, bool polishRoots) |
template<class POLYNOMIAL , class VECTOR > | |
bool | polynomialRoots (POLYNOMIAL const &poriginal, VECTOR &roots, bool polishRoots) |
template<... > | |
void | polynomialWarpImage (...) |
Warp an image according to an polynomial transformation. More... | |
std::vector< double > | polynomialWarpWeights (double x, double y, unsigned int polynom_order) |
template<typename IntType > | |
Rational< IntType > | pow (const Rational< IntType > &r, int n) |
template<class V , int SIZE, class D1 , class D2 , class E > | |
TinyVector< V, SIZE > | pow (TinyVectorBase< V, SIZE, D1, D2 > const &v, E exponent) |
template<unsigned n, class V > | |
V | power (const V &x) |
Exponentiation to a positive integer power by squaring. More... | |
template<class T , class C1 , class C2 , class C3 > | |
void | principalComponents (MultiArrayView< 2, T, C1 > const &features, MultiArrayView< 2, T, C2 > fz, MultiArrayView< 2, T, C3 > zv) |
Decompose a matrix according to the PCA algorithm. More... | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< V >::Promote | prod (TinyVectorBase< V, SIZE, D1, D2 > const &l) |
product of the vector's elements | |
template<class BASE_GRAPH , class BASE_GRAPH_LABELS , class RAG_FEATURES , class BASE_GRAPH_FEATURES > | |
void | projectBack (const AdjacencyListGraph &rag, const BASE_GRAPH &bg, const Int64 ignoreLabel, const BASE_GRAPH_LABELS bgLabels, const RAG_FEATURES &ragFeatures, BASE_GRAPH_FEATURES &bgFeatures) |
template<class RAG , class BASE_GRAPH , class BASE_GRAPH_RAG_LABELS , class BASE_GRAPH_GT , class RAG_GT , class RAG_GT_QT > | |
void | projectGroundTruth (const RAG &rag, const BASE_GRAPH &baseGraph, const BASE_GRAPH_RAG_LABELS &baseGraphRagLabels, const BASE_GRAPH_GT &baseGraphGt, RAG_GT &ragGt, RAG_GT_QT &) |
template<class SrcPointIterator , class DestPointIterator > | |
linalg::TemporaryMatrix< double > | projectiveMatrix2DFromCorrespondingPoints (SrcPointIterator s, SrcPointIterator send, DestPointIterator d) |
Create homogeneous matrix that maps corresponding points onto each other. More... | |
template<... > | |
void | projectiveWarpImage (...) |
Warp an image according to an projective transformation. More... | |
template<... > | |
void | pyramidExpandBurtFilter (...) |
Two-fold up-sampling for image pyramid reconstruction. More... | |
template<class Image , class Alloc > | |
void | pyramidExpandBurtLaplacian (ImagePyramid< Image, Alloc > &pyramid, int fromLevel, int toLevel, double centerValue=0.4) |
Reconstruct a Laplacian pyramid. More... | |
template<... > | |
void | pyramidReduceBurtFilter (...) |
Two-fold down-sampling for image pyramid construction. More... | |
template<class Image , class Alloc > | |
void | pyramidReduceBurtLaplacian (ImagePyramid< Image, Alloc > &pyramid, int fromLevel, int toLevel, double centerValue=0.4) |
Create a Laplacian pyramid. More... | |
template<... > | |
bool | quadraticNoiseNormalization (...) |
Noise normalization by means of an estimated or given quadratic noise model. More... | |
template<... > | |
unsigned int | quadraticProgramming (...) |
double | radialGaborSigma (double centerFrequency) |
Calculate sensible radial sigma for given parameters. More... | |
template<... > | |
void | radialSymmetryTransform (...) |
Find centers of radial symmetry in an image. More... | |
template<class RAGGRAPH , class GRAPH , class RAGEDGES , unsigned int N, class T > | |
MultiArray< 2, MultiArrayIndex > | ragFindEdges (const RAGGRAPH &rag, const GRAPH &graph, const RAGEDGES &affiliatedEdges, MultiArrayView< N, T > labelsArray, const typename RAGGRAPH::Node &node) |
Find indices of points on the edges. More... | |
RandomMT19937 & | randomMT19937 () |
RandomTT800 & | randomTT800 () |
template<typename T , typename IntType > | |
T | rational_cast (const Rational< IntType > &src) |
template<class RadialBasisFunctor , class SrcPointIterator , class DestPointIterator > | |
linalg::TemporaryMatrix< double > | rbfMatrix2DFromCorrespondingPoints (SrcPointIterator s, SrcPointIterator s_end, DestPointIterator d, RadialBasisFunctor const &rbf) |
Create a matrix that maps corresponding points onto each other using a given RBF. More... | |
template<int ORDER, class T , class DestIterator , class DestAccessor , class DestPointIterator , class C , class RadialBasisFunctor > | |
void | rbfWarpImage (SplineImageView< ORDER, T > const &src, DestIterator dul, DestIterator dlr, DestAccessor dest, DestPointIterator d, DestPointIterator d_end, MultiArrayView< 2, double, C > const &W, RadialBasisFunctor rbf) |
Warp an image according to an radial basis function based transformation. More... | |
template<... > | |
void | readHDF5 (...) |
Read the data specified by the given vigra::HDF5ImportInfo object and write the into the given 'array'. More... | |
void | readSIF (const SIFImportInfo &info, MultiArrayView< 3, float > array) |
Read the image data specified by the given vigra::SIFImportInfo object and write them into the given 'array'. More... | |
void | readSIFBlock (const SIFImportInfo &info, Shape3 offset, Shape3 shape, MultiArrayView< 3, float > array) |
Read parts of the image data from an Andor SIF file specified with an SIFImportInfo object and write them into the MultiArray array. More... | |
template<class R > | |
R | real (const FFTWComplex< R > &a) |
real part | |
template<... > | |
void | recursiveFilterLine (...) |
Performs a 1-dimensional recursive convolution of the source signal. More... | |
template<... > | |
void | recursiveFilterX (...) |
Performs 1 dimensional recursive filtering (1st and 2nd order) in x direction. More... | |
template<... > | |
void | recursiveFilterY (...) |
Performs 1 dimensional recursive filtering (1st and 2nd order) in y direction. More... | |
template<... > | |
void | recursiveFirstDerivativeLine (...) |
Performs a 1 dimensional recursive convolution of the source signal. More... | |
template<... > | |
void | recursiveFirstDerivativeX (...) |
Recursively calculates the 1 dimensional first derivative in x direction. More... | |
template<... > | |
void | recursiveFirstDerivativeY (...) |
Recursively calculates the 1 dimensional first derivative in y direction. More... | |
template<... > | |
void | recursiveGaussianFilterLine (...) |
Compute a 1-dimensional recursive approximation of Gaussian smoothing. More... | |
template<... > | |
void | recursiveGaussianFilterX (...) |
Compute 1 dimensional recursive approximation of Gaussian smoothing in y direction. More... | |
template<... > | |
void | recursiveGaussianFilterY (...) |
Compute 1 dimensional recursive approximation of Gaussian smoothing in y direction. More... | |
template<class GRAPH , class NODE_FEATURES_IN , class EDGE_INDICATOR , class NODE_FEATURES_OUT > | |
void | recursiveGraphSmoothing (const GRAPH &g, const NODE_FEATURES_IN &nodeFeaturesIn, const EDGE_INDICATOR &edgeIndicator, const float lambda, const float edgeThreshold, const float scale, size_t iterations, NODE_FEATURES_OUT &nodeFeaturesBuffer, NODE_FEATURES_OUT &nodeFeaturesOut) |
smooth node features of a graph More... | |
template<... > | |
void | recursiveSecondDerivativeLine (...) |
Performs a 1 dimensional recursive convolution of the source signal. More... | |
template<... > | |
void | recursiveSecondDerivativeX (...) |
Recursively calculates the 1 dimensional second derivative in x direction. More... | |
template<... > | |
void | recursiveSecondDerivativeY (...) |
Recursively calculates the 1 dimensional second derivative in y direction. More... | |
template<... > | |
void | recursiveSmoothLine (...) |
Convolves the image with a 1-dimensional exponential filter. More... | |
template<... > | |
void | recursiveSmoothX (...) |
Performs 1 dimensional recursive smoothing in x direction. More... | |
template<... > | |
void | recursiveSmoothY (...) |
Performs 1 dimensional recursive smoothing in y direction. More... | |
template<... > | |
void | reflectImage (...) |
Reflect image horizontally or vertically. More... | |
template<... > | |
void | regionImageToCrackEdgeImage (...) |
Transform a labeled image into a crack edge (interpixel edge) image. More... | |
template<... > | |
void | regionImageToEdgeImage (...) |
Transform a labeled image into an edge image. More... | |
template<... > | |
void | removeShortEdges (...) |
Remove short edges from an edge image. More... | |
template<... > | |
void | resampleImage (...) |
Resample image by a given factor. More... | |
template<... > | |
void | resamplingConvolveImage (...) |
Apply two separable resampling filters successively, the first in x-direction, the second in y-direction. More... | |
template<... > | |
void | resamplingConvolveLine (...) |
Performs a 1-dimensional resampling convolution of the source signal using the given set of kernels. More... | |
template<... > | |
void | resamplingConvolveX (...) |
Apply a resampling filter in the x-direction. More... | |
template<... > | |
void | resamplingConvolveY (...) |
Apply a resampling filter in the y-direction. More... | |
template<... > | |
void | resizeImageCatmullRomInterpolation (...) |
Resize image using the Catmull/Rom interpolation function. More... | |
template<... > | |
void | resizeImageCoscotInterpolation (...) |
Resize image using the Coscot interpolation function. More... | |
template<... > | |
void | resizeImageLinearInterpolation (...) |
Resize image using linear interpolation. More... | |
template<... > | |
void | resizeImageNoInterpolation (...) |
Resize image by repeating the nearest pixel values. More... | |
template<... > | |
void | resizeImageSplineInterpolation (...) |
Resize image using B-spline interpolation. More... | |
template<... > | |
void | resizeMultiArraySplineInterpolation (...) |
Resize MultiArray using B-spline interpolation. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE > | reverse (TinyVector< V, SIZE > const &t) |
reversed copy | |
detail::RF_DEFAULT & | rf_default () |
factory function to return a RF_DEFAULT tag More... | |
template<class T , class Tag > | |
void | rf_export_HDF5 (const RandomForest< T, Tag > &rf, const std::string &filename, const std::string &pathname="") |
Save a random forest to a named HDF5 file into a specified HDF5 group. More... | |
template<class T , class Tag > | |
void | rf_export_HDF5 (const RandomForest< T, Tag > &rf, HDF5File &h5context, const std::string &pathname="") |
Save a random forest to an HDF5File object into a specified HDF5 group. More... | |
template<class T , class Tag > | |
void | rf_export_HDF5 (const RandomForest< T, Tag > &rf, hid_t outf_id, const std::string &pathname="") |
Save a random forest to an HDF5 file specified by its id. More... | |
template<class T , class Tag > | |
bool | rf_import_HDF5 (RandomForest< T, Tag > &rf, const std::string &filename, const std::string &pathname="") |
Read a random forest from a named HDF5 file's specified group. More... | |
template<class T , class Tag > | |
bool | rf_import_HDF5 (RandomForest< T, Tag > &rf, HDF5File &h5context, const std::string &pathname="") |
Read a random forest from an HDF5File object's specified group. More... | |
template<class T , class Tag > | |
bool | rf_import_HDF5 (RandomForest< T, Tag > &rf, hid_t inf_id, const std::string &pathname="") |
Read a random forest from an HDF5 file specified by its id. More... | |
template<... > | |
void | rieszTransformOfLOG (...) |
Calculate Riesz transforms of the Laplacian of Gaussian. More... | |
template<... > | |
void | rohrCornerDetector (...) |
Find corners in an image (3). More... | |
template<... > | |
void | rotateImage (...) |
Rotate an image by a multiple of 90 degrees or by an arbitrary angle. More... | |
linalg::TemporaryMatrix< double > | rotationMatrix2DDegrees (double angle) |
Create homogeneous matrix representing a 2D rotation about the coordinate origin. More... | |
linalg::TemporaryMatrix< double > | rotationMatrix2DDegrees (double angle, TinyVector< double, 2 > const ¢er) |
Create homogeneous matrix representing a 2D rotation about the given point. More... | |
linalg::TemporaryMatrix< double > | rotationMatrix2DRadians (double angle) |
Create homogeneous matrix representing a 2D rotation about the coordinate origin. More... | |
linalg::TemporaryMatrix< double > | rotationMatrix2DRadians (double angle, TinyVector< double, 2 > const ¢er) |
Create homogeneous matrix representing a 2D rotation about the given point. More... | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
Int32 | round (FixedPoint16< IntBits, OverflowHandling > v) |
rounding to the nearest integer. | |
template<unsigned IntBits, unsigned FracBits> | |
int | round (FixedPoint< IntBits, FracBits > v) |
rounding to the nearest integer. | |
REAL | round (REAL v) |
The rounding function. More... | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | round (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
long long | roundi (double t) |
Round and cast to integer. More... | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
Int32 | roundi (FixedPoint16< IntBits, OverflowHandling > v) |
rounding to the nearest integer. | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< std::ptrdiff_t, SIZE > | roundi (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
linalg::TemporaryMatrix< double > | scalingMatrix2D (double scalingFactor) |
Create homogeneous matrix representing a 2D uniform scaling about the coordinate origin. More... | |
linalg::TemporaryMatrix< double > | scalingMatrix2D (double sx, double sy) |
Create homogeneous matrix representing a 2D non-uniform scaling about the coordinate origin. More... | |
template<... > | |
void | secondOrderTotalVariationFilter (...) |
Performs Anisotropic Total Variation Regularization. More... | |
template<... > | |
void | seededRegionGrowing (...) |
Region Segmentation by means of Seeded Region Growing. More... | |
template<... > | |
void | seededRegionGrowing3D (...) |
Three-dimensional Region Segmentation by means of Seeded Region Growing. More... | |
template<... > | |
void | separableConvolveMultiArray (...) |
Separated convolution on multi-dimensional arrays. More... | |
template<... > | |
void | separableConvolveX (...) |
Performs a 1 dimensional convolution in x direction. More... | |
template<... > | |
void | separableConvolveY (...) |
Performs a 1 dimensional convolution in y direction. More... | |
template<... > | |
void | separableMultiDistance (...) |
Euclidean distance on multi-dimensional arrays. More... | |
template<... > | |
void | separableMultiDistSquared (...) |
Euclidean distance squared on multi-dimensional arrays. More... | |
template<... > | |
void | separableVectorDistance (...) |
Compute the vector distance transform of a N-dimensional binary array. More... | |
linalg::TemporaryMatrix< double > | shearMatrix2D (double s01, double s10) |
Create homogeneous matrix representing a 2D shearing. More... | |
template<class GRAPH , class WEIGHTS , class PREDECESSORS , class DISTANCE , class HEURSTIC > | |
void | shortestPathAStar (const GRAPH &graph, const typename GRAPH::Node &source, const typename GRAPH::Node &target, const WEIGHTS &weights, PREDECESSORS &predecessors, DISTANCE &distance, const HEURSTIC &heuristic) |
Astar Shortest path search. | |
template<class T > | |
T | sign (T t) |
The sign function. More... | |
template<class T1 , class T2 > | |
T1 | sign (T1 t1, T2 t2) |
The binary sign function. More... | |
template<class T > | |
int | signi (T t) |
The integer sign function. More... | |
template<... > | |
void | simpleSharpening (...) |
Perform simple sharpening function. More... | |
template<class REAL > | |
REAL | sin_pi (REAL x) |
sin(pi*x). More... | |
template<... > | |
void | skeletonizeImage (...) |
Skeletonization of all regions in a labeled 2D image. More... | |
template<... > | |
void | slantedEdgeMTF (...) |
Determine the magnitude transfer function of the camera. More... | |
template<... > | |
unsigned int | slicSuperpixels (...) |
Compute SLIC superpixels in arbitrary dimensions. More... | |
template<class T > | |
NumericTraits< T >::Promote | sq (T t) |
The square function. More... | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
SquareRootTraits< FixedPoint16< IntBits, OverflowHandling > >::SquareRootResult | sqrt (FixedPoint16< IntBits, OverflowHandling > v) |
square root. | |
template<unsigned IntBits, unsigned FracBits> | |
SquareRootTraits< FixedPoint< IntBits, FracBits > >::SquareRootResult | sqrt (FixedPoint< IntBits, FracBits > v) |
square root. | |
template<class V , int SIZE, class D1 , class D2 > | |
TinyVector< V, SIZE > | sqrt (TinyVectorBase< V, SIZE, D1, D2 > const &v) |
Int32 | sqrti (Int32 v) |
Signed integer square root. More... | |
template<class R > | |
FFTWComplex< R >::SquaredNormType | squaredNorm (const FFTWComplex< R > &a) |
squared norm (= squared magnitude) | |
template<typename IntType > | |
NormTraits< Rational< IntType > >::SquaredNormType | squaredNorm (const Rational< IntType > &r) |
squared norm | |
template<int IntBits, FPOverflowHandling OverflowHandling> | |
NormTraits< FixedPoint16< IntBits, OverflowHandling > >::SquaredNormType | squaredNorm (FixedPoint16< IntBits, OverflowHandling > v) |
squared norm (same as v*v). | |
template<unsigned IntBits, unsigned FracBits> | |
FixedPointTraits< FixedPoint< IntBits, FracBits >, FixedPoint< IntBits, FracBits > >::MultipliesType | squaredNorm (FixedPoint< IntBits, FracBits > v) |
squared norm (same as v*v). | |
template<typename Type > | |
Quaternion< Type >::SquaredNormType | squaredNorm (Quaternion< Type > const &q) |
squared norm | |
NormTraits< T >::SquaredNormType | squaredNorm (T const &t) |
The squared norm of a numerical object. More... | |
template<class V , int SIZE> | |
TinyVector< V, SIZE >::SquaredNormType | squaredNorm (TinyVector< V, SIZE > const &t) |
squared norm | |
template<class V1 , int SIZE, class D1 , class D2 > | |
TinyVectorBase< V1, SIZE, D1, D2 >::SquaredNormType | squaredNorm (TinyVectorBase< V1, SIZE, D1, D2 > const &t) |
squared norm | |
template<... > | |
void | structureTensor (...) |
Calculate the Structure Tensor for each pixel of and image, using Gaussian (derivative) filters. More... | |
template<... > | |
void | structureTensorMultiArray (...) |
Calculate the structure tensor of a multi-dimensional arrays. More... | |
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3> | |
FixedPoint16< IntBits3, OverflowHandling > & | sub (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result) |
subtraction with enforced result type. | |
template<unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2, unsigned IntBits3, unsigned FracBits3> | |
void | sub (FixedPoint< IntBits1, FracBits1 > l, FixedPoint< IntBits2, FracBits2 > r, FixedPoint< IntBits3, FracBits3 > &result) |
subtraction with enforced result type. | |
template<class V , int SIZE, class D1 , class D2 > | |
NumericTraits< V >::Promote | sum (TinyVectorBase< V, SIZE, D1, D2 > const &l) |
sum of the vector's elements | |
template<class T > | |
void | symmetric2x2Eigenvalues (T a00, T a01, T a11, T *r0, T *r1) |
Compute the eigenvalues of a 2x2 real symmetric matrix. More... | |
template<class T > | |
void | symmetric3x3Eigenvalues (T a00, T a01, T a02, T a11, T a12, T a22, T *r0, T *r1, T *r2) |
Compute the eigenvalues of a 3x3 real symmetric matrix. More... | |
template<... > | |
void | symmetricGradientMultiArray (...) |
Calculate gradient of a multi-dimensional arrays using symmetric difference filters. More... | |
template<... > | |
void | tensorDeterminantMultiArray (...) |
Calculate the tensor determinant for every element of a ND tensor array. More... | |
template<... > | |
void | tensorEigenRepresentation (...) |
Calculate eigen representation of a symmetric 2x2 tensor. More... | |
template<... > | |
void | tensorEigenvaluesMultiArray (...) |
Calculate the tensor eigenvalues for every element of a N-D tensor array. More... | |
template<... > | |
void | tensorToEdgeCorner (...) |
Decompose a symmetric 2x2 tensor into its edge and corner parts. More... | |
template<... > | |
void | tensorTrace (...) |
Calculate the trace of a 2x2 tensor. More... | |
template<... > | |
void | tensorTraceMultiArray (...) |
Calculate the tensor trace for every element of a N-D tensor array. More... | |
template<... > | |
void | tiffToRGBImage (...) |
Import a RGB (3-band or color-mapped) TiffImage into a RGB image. More... | |
template<... > | |
void | tiffToScalarImage (...) |
Convert single-band TiffImage to scalar image. More... | |
std::string | tolower (std::string s) |
template<... > | |
void | totalVariationFilter (...) |
Performs standard Total Variation Regularization. More... | |
template<... > | |
void | transformImage (...) |
Apply unary point transformation to each pixel. More... | |
template<... > | |
void | transformImageIf (...) |
Apply unary point transformation to each pixel within the ROI (i.e., where the mask is non-zero). More... | |
template<... > | |
void | transformMultiArray (...) |
Transform a multi-dimensional array with a unary function or functor. More... | |
template<class SplineImage , class DestIterator , class DestAccessor > | |
void | transformToPolarCoordinates (SplineImage const &src, DestIterator d_ul, DestIterator d_lr, DestAccessor d_acc) |
Transforms a given image to its (image-centered) polar coordinates representation. More... | |
linalg::TemporaryMatrix< double > | translationMatrix2D (TinyVector< double, 2 > const &shift) |
Create homogeneous matrix representing a 2D translation. More... | |
template<class V , int SIZE, class T > | |
TinyVector< V, SIZE > | transpose (TinyVector< V, SIZE > const &t, TinyVector< T, SIZE > const &permutation) |
transposed copy More... | |
template<... > | |
void | transposeImage (...) |
Transpose an image over the major or minor diagonal. More... | |
void | uncompress (char const *source, std::size_t srcSize, char *dest, std::size_t destSize, CompressionMethod method) |
template<... > | |
unsigned int | unionFindWatershedsBlockwise (...) |
Blockwise union-find watersheds transform for MultiArrays and ChunkedArrays. More... | |
template<... > | |
void | upwindImage (...) |
This function calculates discrete upwinding scheme proposed by J. Weickert (2002) in Coherence-Enhancing Show Filters. More... | |
template<... > | |
void | vectorToTensor (...) |
Calculate the tensor (outer) product of a 2D vector with itself. More... | |
template<... > | |
void | vectorToTensorMultiArray (...) |
Calculate the tensor (outer) product of a N-D vector with itself. More... | |
template<... > | |
unsigned int | watersheds3D (...) |
Region Segmentation by means of the watershed algorithm. More... | |
template<... > | |
Label | watershedsMultiArray (...) |
Watershed segmentation of an arbitrary-dimensional array. More... | |
template<... > | |
unsigned int | watershedsRegionGrowing (...) |
Region segmentation by means of a flooding-based watershed algorithm. More... | |
template<... > | |
unsigned int | watershedsUnionFind (...) |
Region segmentation by means of the union-find watershed algorithm. More... | |
template<... > | |
void | writeHDF5 (...) |
Store array data in an HDF5 file. More... | |
template<class T > | |
void | writeHDF5Attr (hid_t loc, const char *name, ArrayVectorView< T > &array) |
template<size_t N, class C > | |
void | writeHDF5Attr (hid_t loc, const char *name, MultiArrayView< N, std::string, C > const &array) |
template<size_t N, class T , class C > | |
void | writeHDF5Attr (hid_t loc, const char *name, MultiArrayView< N, T, C > const &array) |
template<class Arr > | |
void | writeHDF5Attr (std::string filePath, std::string pathInFile, Arr &ar) |
template<class V > | |
TinyVector< float, 3 > | yPrimeCbCr2Polar (V const &ycbcr) |
Create polar representation form Y'CbCr. More... | |
template<class V > | |
TinyVector< float, 3 > | yPrimeIQ2Polar (V const &yiq) |
Create polar representation form Y'IQ. More... | |
template<class V > | |
TinyVector< float, 3 > | yPrimePbPr2Polar (V const &ypbpr) |
Create polar representation form Y'PbPr. More... | |
template<class V > | |
TinyVector< float, 3 > | yPrimeUV2Polar (V const &yuv) |
Create polar representation form Y'UV. More... | |
all VIGRA functionality is located in namespace vigra
This header provides definitions of graph-related algorithms
This header provides definitions of graph-related types and optionally provides a gateway to popular graph libraries (for now, BGL is supported).
typedef BasicImage<fftw_real> FFTWRealImage |
Float (fftw_real
) image.
The type fftw_real
is defined as double
(in FFTW 2 it used to be either float
or double
, as specified during compilation of FFTW). FFTWRealImage uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/fftw3.hxx> (for FFTW 3) or
#include <vigra/fftw.hxx> (for deprecated FFTW 2)
Namespace: vigra
typedef BasicImage<FFTWComplex<> > FFTWComplexImage |
Complex (FFTWComplex) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/fftw3.hxx> (for FFTW 3) or
#include <vigra/fftw.hxx> (for deprecated FFTW 2)
Namespace: vigra
typedef Diff2D CoordinateIterator |
Simulate an image where each pixel contains its coordinate.
CoordinateIterator used to be a separate class, but has now become an alias for vigra::Diff2D. This is possible because Diff2D now provides all the necessary functionality.
CoordinateIterator behaves like a read-only vigra::ImageIterator for an image in which each pixel contains its coordinate. This is useful for algorithms that need access to the current pixel's location. For example, you can use CoordinateIterator/Diff2D to find the center of mass of an image region. To implement this, we first need a functor for center-of-mass calculations:
Using this functor, we find the center of mass like so:
#include <vigra/imageiterator.hxx>
Namespace: vigra
typedef std::ptrdiff_t MultiArrayIndex |
Index type for a single dimension of a MultiArrayView or MultiArray.
Export vigra::FourNeighborhood::NeighborCode into the scope of namespace vigra.
Export vigra::EightNeighborhood::NeighborCode into the scope of namespace vigra.
Specialization of NeighborOffsetCirculator for 8-neighborhood.
Specialization of NeighborOffsetCirculator for 4-neighborhood.
typedef RandomNumberGenerator<detail::RandomState<detail::TT800> > RandomTT800 |
Shorthand for the TT800 random number generator class.
typedef RandomNumberGenerator<detail::RandomState<detail::TT800> > TemperedTwister |
Shorthand for the TT800 random number generator class (same as RandomTT800).
typedef RandomNumberGenerator<detail::RandomState<detail::MT19937> > RandomMT19937 |
Shorthand for the MT19937 random number generator class.
typedef RandomNumberGenerator<detail::RandomState<detail::MT19937> > MersenneTwister |
Shorthand for the MT19937 random number generator class (same as RandomMT19937).
typedef RidgeSplit<BestGiniOfColumn<GiniCriterion> > GiniRidgeSplit |
Standard ridge regression split
typedef BasicImage<UInt8> BImage |
Byte (8-bit unsigned) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<UInt8> UInt8Image |
Byte (8-bit unsigned) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<Int8> Int8Image |
Signed byte (8-bit signed) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<Int16> SImage |
Short integer (16-bit signed) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<UInt16> UInt16Image |
Short integer (16-bit unsigned) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<Int16> Int16Image |
Short integer (16-bit signed) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<Int32> IImage |
Integer (32-bit signed) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<UInt32> UInt32Image |
Integer (32-bit unsigned) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<Int32> Int32Image |
Integer (32-bit signed) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<float> FImage |
Float (float) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<double> DImage |
Double (double) image. It uses vigra::BasicImageIterator and vigra::StandardAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<UInt8> > BRGBImage |
Byte (3x 8-bit unsigned) RGB image. The pixel type is vigra::RGBValue<vigra::UInt8>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<UInt8> > UInt8RGBImage |
Byte (3x 8-bit unsigned) RGB image. The pixel type is vigra::RGBValue<vigra::UInt8>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<Int8> > Int8RGBImage |
Byte (3x 8-bit signed) RGB image. The pixel type is vigra::RGBValue<vigra::UInt8>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<Int16> > SRGBImage |
Short (3x 16-bit signed) RGB image. The pixel type is vigra::RGBValue<vigra::Int16>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<UInt16> > UInt16RGBImage |
Short (3x 16-bit unsigned) RGB image. The pixel type is vigra::RGBValue<vigra::Int16>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<Int16> > Int16RGBImage |
Short (3x 16-bit signed) RGB image. The pixel type is vigra::RGBValue<vigra::Int16>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<Int32> > IRGBImage |
Integer (3x 32-bit signed) RGB image. The pixel type is vigra::RGBValue<vigra::Int32>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<UInt32> > UInt32RGBImage |
Integer (3x 32-bit unsigned) RGB image. The pixel type is vigra::RGBValue<vigra::Int32>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<Int32> > Int32RGBImage |
Integer (3x 32-bit signed) RGB image. The pixel type is vigra::RGBValue<vigra::Int32>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<float> > FRGBImage |
Floating-point (3x float) RGB image. The pixel type is vigra::RGBValue<float>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<RGBValue<double> > DRGBImage |
Double-precision floating-point (3x double) RGB image. The pixel type is vigra::RGBValue<double>. It uses vigra::BasicImageIterator and vigra::RGBAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<TinyVector<float, 2> > FVector2Image |
Floating-point TinyVector image. The pixel type is vigra::TinyVector<float, 2>. It uses vigra::BasicImageIterator and vigra::VectorAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<TinyVector<float, 3> > FVector3Image |
Floating-point TinyVector image. The pixel type is vigra::TinyVector<float, 3>. It uses vigra::BasicImageIterator and vigra::VectorAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<TinyVector<float, 4> > FVector4Image |
Floating-point TinyVector image. The pixel type is vigra::TinyVector<float, 4>. It uses vigra::BasicImageIterator and vigra::VectorAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<TinyVector<double, 2> > DVector2Image |
Floating-point TinyVector image. The pixel type is vigra::TinyVector<double, 2>. It uses vigra::BasicImageIterator and vigra::VectorAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<TinyVector<double, 3> > DVector3Image |
Floating-point TinyVector image. The pixel type is vigra::TinyVector<double, 3>. It uses vigra::BasicImageIterator and vigra::VectorAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef BasicImage<TinyVector<double, 4> > DVector4Image |
Floating-point TinyVector image. The pixel type is vigra::TinyVector<double, 4>. It uses vigra::BasicImageIterator and vigra::VectorAccessor and their const counterparts to access the data.
#include <vigra/stdimage.hxx>
Namespace: vigra
typedef AtImageBorder AtVolumeBorder |
Encode whether a voxel is near the volume border.
This enum is used with isAtVolumeBorder() and vigra::RestrictedNeighborhoodCirculator.
#include <vigra/voxelneighborhood.hxx>
Namespace: vigra
Export vigra::Neighborhood3DSix::NeighborCode3D into the scope of namespace vigra.
Export vigra::Neighborhood3DTwentySix::NeighborCode3D into the scope of namespace vigra.
enum BoundaryDistanceTag |
Specify which boundary is used for boundaryMultiDistance().
Enumerator | |
---|---|
OuterBoundary | Pixels just outside of each region. |
InterpixelBoundary | Half-integer points between pixels of different labels. |
InnerBoundary | Pixels just inside of each region. |
Initialize a MultiArray in a standard way.
Enumerator | |
---|---|
LinearSequence | Initialize array by a linear sequence in scan order. |
enum NeighborhoodType |
Choose the neighborhood system in a dimension-independent way.
DirectNeighborhood corresponds to 4-neighborhood in 2D and 6-neighborhood in 3D, whereas IndirectNeighborhood means 8-neighborhood in 2D and 26-neighborhood in 3D. The general formula for N dimensions are 2*N for direct neighborhood and 3^N-1 for indirect neighborhood.
Enumerator | |
---|---|
DirectNeighborhood | use only direct neighbors |
IndirectNeighborhood | use direct and indirect neighbors |
enum AtImageBorder |
Encode whether a point is near the image border.
This enum is used with isAtImageBorder() and vigra::RestrictedNeighborhoodCirculator.
#include <vigra/pixelneighborhood.hxx>
Namespace: vigra
Enumerator | |
---|---|
NotAtBorder |
|
RightBorder |
|
LeftBorder |
|
TopBorder |
|
BottomBorder |
|
FrontBorder |
|
enum RF_OptionTag |
tags used with the RandomForestOptions class
enum SRGType |
Choose between different types of Region Growing
linalg::TemporaryMatrix<double> vigra::affineMatrix2DFromCorrespondingPoints | ( | SrcIterator | s, |
SrcIterator | send, | ||
DestIterator | d | ||
) |
Create homogeneous matrix that maps corresponding points onto each other.
For use with affineWarpImage(). When only two corresponding points are given, the matrix will only represent a similarity transform (translation, rotation, and uniform scaling). When only one point pair is given, the result will be a pure translation.
void vigra::estimateTranslation | ( | ... | ) |
Estimate the optical flow between two images according to a translation model.
This function applies the same algorithm as estimateAffineTransform() with the additional constraint that the motion model must be a translation rather than affine.
Declarations:
#include <vigra/affine_registration.hxx>
Namespace: vigra
pass 2D array views:
void vigra::estimateSimilarityTransform | ( | ... | ) |
Estimate the optical flow between two images according to a similarity transform model (e.g. translation, rotation, and uniform scaling).
This function applies the same algorithm as estimateAffineTransform() with the additional constraint that the motion model must be a similarity transform rather than affine.
Declarations:
#include <vigra/affine_registration.hxx>
Namespace: vigra
pass 2D array views:
void vigra::estimateAffineTransform | ( | ... | ) |
Estimate the optical flow between two images according to an affine transform model (e.g. translation, rotation, non-uniform scaling, and shearing).
This function implements the algorithm described in
J.R. Bergen, P. Anandan, K.J. Hanna, R. Hingorani: "Hierarchical model-based motion estimation", ECCV 1992
Specifically, it minimizes the squared loss between the images I at two consecutive time points t-1 and t:
where are the pixel coordinates and
is an affine motion model parameterized by
. Since the objective is non-linear, it is linearized by first-order Taylor expansion w.r.t.
, and a local optimum is determined iteratively by the Gauss-Newton method. To handle larger displacements, the algorithm employs a coarse-to-fine strategy, where the motion is first estimated on downsampled versions of the images and then refined at consecutively higher resolutions.
The algorithm's parameters can be controlled by the option object vigra::AffineMotionEstimationOptions. In particular, one can determine if
options.useLaplacianPyramid()
– makes motion estimation invariant against additive intensity offsets); options.highestPyramidLevel(h)
– images are downsampled to 2-h times their original size, default: h=4); options.iterationsPerLevel(i)
, default: i=4); The resulting affine model is stored in parameter affineMatrix
, which can be used by affineWarpImage() to apply the transformation to time frame t-1. See documentation there for the precise meaning of the matrix elements.
Declarations:
#include <vigra/affine_registration.hxx>
Namespace: vigra
pass 2D array views:
void vigra::transformToPolarCoordinates | ( | SplineImage const & | src, |
DestIterator | d_ul, | ||
DestIterator | d_lr, | ||
DestAccessor | d_acc | ||
) |
Transforms a given image to its (image-centered) polar coordinates representation.
This algorithm transforms a given image (by means of an spline image view) to its image-centered polar coordinates reprensentation. The sampling of the polar coordinate system is determined by the shape of the dest. image.
Declarations:
#include <vigra/affine_registration_fft.hxx>
Namespace: vigra
pass 2D array views:
void vigra::estimateGlobalRotation | ( | ... | ) |
Estimate the rotation between two images by means of a normalized cross correlation matching of the FFT spectra.
This algorithm uses the fast normalized cross correlation to determine a global rotation between two images (from image2 to image1). To derive the rotation, the algorithm performs the following steps:
The images are cropped to the corresponding images center-squared before the estimation takes place.
Declarations:
#include <vigra/affine_registration_fft.hxx>
Namespace: vigra
pass 2D array views:
void vigra::estimateGlobalTranslation | ( | ... | ) |
Estimate the translation between two images by means of a normalized cross correlation matching.
This algorithm uses the fast normalized cross correlation to determine a global translation between two images (from image2 to image1). To derive the translation, the algorithm consists of differents steps:
Declarations:
#include <vigra/affine_registration_fft.hxx>
Namespace: vigra
pass 2D array views:
void vigra::estimateGlobalRotationTranslation | ( | ... | ) |
Estimate the (global) rotation and translation between two images by means a normalized cross correlation matching.
This algorithm use the functions estimateGlobalRotation() and estimateGlobalTranslation() to estimate a matrix which describes the global rotation and translation from the second to the first image.
Declarations:
#include <vigra/affine_registration_fft.hxx>
Namespace: vigra
pass 2D array views:
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 vigra::affineWarpImage | ( | ... | ) |
Warp an image according to an affine transformation.
Declarations:
pass 2D array views:
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 written at that destination point.
The matrix represents 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:
#include <vigra/affinegeometry.hxx>
Namespace: vigra
See also: Functions to specify affine transformation: translationMatrix2D(), scalingMatrix2D(), shearMatrix2D(), rotationMatrix2DRadians(), rotationMatrix2DDegrees()
Iterator vigra::argMin | ( | Iterator | first, |
Iterator | last | ||
) |
Find the minimum element in a sequence.
The function returns the iterator referring to the minimum element. This is identical to the function std::min_element()
.
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
Iterator vigra::argMax | ( | Iterator | first, |
Iterator | last | ||
) |
Find the maximum element in a sequence.
The function returns the iterator referring to the maximum element. This is identical to the function std::max_element()
.
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
Iterator vigra::argMinIf | ( | Iterator | first, |
Iterator | last, | ||
UnaryFunctor | condition | ||
) |
Find the minimum element in a sequence conforming to a condition.
The function returns the iterator referring to the minimum element, where only elements conforming to the condition (i.e. where condition(*iterator)
evaluates to true
) are considered. If no element conforms to the condition, or the sequence is empty, the end iterator last is returned.
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
Iterator vigra::argMaxIf | ( | Iterator | first, |
Iterator | last, | ||
UnaryFunctor | condition | ||
) |
Find the maximum element in a sequence conforming to a condition.
The function returns the iterator referring to the maximum element, where only elements conforming to the condition (i.e. where condition(*iterator)
evaluates to true
) are considered. If no element conforms to the condition, or the sequence is empty, the end iterator last is returned.
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
void vigra::linearSequence | ( | Iterator | first, |
Iterator | last, | ||
Value | start, | ||
Value | step | ||
) |
Fill an array with a sequence of numbers.
The sequence starts at start and is incremented with step. Default start and stepsize are 0 and 1 respectively. This is a generalization of function std::iota()
in C++11.
Declaration:
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
void vigra::inspectSequence | ( | ... | ) |
Call an analyzing functor at every element of a sequence.
This function can be used to collect statistics of the sequence [first, last)
defined by these two input interators. The results must be stored in the functor, which serves as a return value.
Declarations:
Usage:
#include <vigra/algorithm.hxx>
Namespace: vigra
detail::IndexCompare<ArrayLike, Compare> vigra::makeIndexComparator | ( | ArrayLike | a, |
Compare | c | ||
) |
Create a compare functor for indirect sort.
Indirect sorting refers to the situation where you have an array holding data and another array holding indices referencing the first array, and you want to sort the index array according to some property of the data array without changing the data array itself. The factory function makeIndexComparator()
creates a sorting predicate for this task, given a sorting predicate for the data array.
Usage:
#include <vigra/algorithm.hxx>
Namespace: vigra
Declarations:
void vigra::indexSort | ( | Iterator | first, |
Iterator | last, | ||
IndexIterator | index_first, | ||
Compare | c | ||
) |
Return the index permutation that would sort the input array.
To actually sort an array according to the ordering thus determined, use applyPermutation().
Usage:
#include <vigra/algorithm.hxx>
Namespace: vigra
Declarations:
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
void vigra::applyPermutation | ( | IndexIterator | index_first, |
IndexIterator | index_last, | ||
InIterator | in, | ||
OutIterator | out | ||
) |
Sort an array according to the given index permutation.
The iterators in and out may not refer to the same array, as this would overwrite the input prematurely.
Declaration:
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
void vigra::inversePermutation | ( | InIterator | first, |
InIterator | last, | ||
OutIterator | out | ||
) |
Compute the inverse of a given permutation.
This is just another name for indexSort(), referring to another semantics.
Declaration:
Required Interface:
#include <vigra/algorithm.hxx>
Namespace: vigra
UInt32 vigra::checksum | ( | const char * | data, |
unsigned int | size | ||
) |
Compute the CRC-32 checksum of a byte array.
Implementation note: This function is slower on big-endian machines because the "4 bytes at a time" optimization is only implemented for little-endian.
Concatenate a byte array to an existing CRC-32 checksum.
void vigra::applyWindowFunction | ( | ... | ) |
Apply a window function to each pixels of a given image.
This function calculates the results for a window function (given as a functor) when applied to the complete image. Also allows a correct border handling! See medianFilter() for an example of a quite basic window function and its application. If you pass a functor to this function, which implements the two functions:
this function calculates the results for the complete image.
All border treatment modes (except BORDER_TREATMENT_CLIP) are supported.
The input pixel type T1
must be a linear space over the window functions' value_type T
, i.e. addition of source values, multiplication with functions' values, and NumericTraits must be defined. The filters' value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/applywindowfunction.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the window size.
void vigra::rotateImage | ( | ... | ) |
Rotate an image by a multiple of 90 degrees or by an arbitrary angle.
If you specify the angle as an integer which is a multiple of 90 degrees, rotateImage() just copies the pixels in the appropriate new order. It expects the destination image to have the correct shape for the desired rotation. That is, when the rotation is a multiple of 180 degrees, source and destination must have the same shape, otherwise destination must have the transposed shape of the source.
If you want to rotate by an arbitrary angle and around an arbitrary center point, you must specify the source image as a vigra::SplineImageView, which is used for interpolation at the required subpixel positions. If no center point is provided, the image center is used by default. The destination image must have the same size as the source SplineImageView.
Positive angles refer to counter-clockwise rotation, negative ones to clockwise rotation. All angles must be given in degrees.
Declarations:
pass 2D array views:
Usage:
#include <vigra/basicgeometry.hxx>
Namespace: vigra
Preconditions:
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 2D array views:
Usage:
#include <vigra/basicgeometry.hxx>
Namespace: vigra
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.)
Note that a similar effect can be chieved by MultiArrayView::transpose(). However, the latter can only transpose about the major diagonal, and it doesn't rearrange the data
Declarations:
pass 2D array views:
Usage:
#include <vigra/basicgeometry.hxx>
Namespace: vigra
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 of 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.
Declarations:
pass 2D array views:
Usage:
#include <vigra/basicgeometry.hxx>
Namespace: vigra
Preconditions:
double vigra::besselJ | ( | int | n, |
double | x | ||
) |
Bessel function of the first kind.
Computes the value of BesselJ of integer order n
and argument x
. Negative x
are unsupported and will result in a std::domain_error
.
This function wraps a number of existing implementations and falls back to a rather slow algorithm if none of them is available. In particular, it uses boost::math when HasBoostMath
is #defined, or native implementations on gcc and MSVC otherwise.
#include <vigra/bessel.hxx>
Namespace: vigra
double vigra::besselY | ( | int | n, |
double | x | ||
) |
Bessel function of the second kind.
Computes the value of BesselY of integer order n
and argument x
. Negative x
are unsupported and will result in a std::domain_error
.
This function wraps a number of existing implementations and falls back to a rather slow algorithm if none of them is available. In particular, it uses boost::math when HasBoostMath
is #defined, or native implementations on gcc and MSVC otherwise.
#include <vigra/bessel.hxx>
Namespace: vigra
vigra::doxygen_overloaded_function | ( | template<... > void | separableConvolveBlockwise | ) |
Separated convolution on ChunkedArrays.
Declarations:
This function computes a separated convolution for a given ChunkedArray. For infinite precision T1, this is equivalent to separableConvolveMultiArray. In practice, floating point inaccuracies will make the result differ slightly.
unsigned int vigra::labelMultiArrayBlockwise | ( | ... | ) |
Connected components labeling for MultiArrays and ChunkedArrays.
Declarations:
The resulting labeling is equivalent to a labeling by labelMultiArray, that is, the connected components are the same but may have different ids. NeighborhoodType and background value (if any) can be specified with the LabelOptions object. If the mapping parameter is provided, each chunk is labeled seperately and contiguously (starting at one, zero for background), with mapping containing a mapping of local labels to global labels for each chunk. Thus, the shape of 'mapping' has to be large enough to hold each chunk coordinate.
Return: the number of regions found (=largest global region label)
Usage:
#include <vigra/blockwise_labeling.hxx>
Namespace: vigra
unsigned int vigra::unionFindWatershedsBlockwise | ( | ... | ) |
Blockwise union-find watersheds transform for MultiArrays and ChunkedArrays.
Declaration:
The resulting labeling is equivalent to a labeling by watershedsUnionFind, that is, the components are the same but may have different ids. If temporary_storage is provided, this array is used for intermediate result storage. Otherwise, a newly created vigra::ChunkedArrayLazy is used.
Return: the number of labels assigned (=largest label, because labels start at one)
Usage:
#include <vigra/blockwise_watersheds.hxx>
Namespace: vigra
void vigra::rieszTransformOfLOG | ( | ... | ) |
Calculate Riesz transforms of the Laplacian of Gaussian.
The Riesz transforms of the Laplacian of Gaussian have the following transfer functions (defined in a polar coordinate representation of the frequency domain):
where n = xorder
and m = yorder
determine th e order of the transform, and sigma > 0
is the scale of the Laplacian of Gaussian. This function computes a good spatial domain approximation of these transforms for xorder + yorder <= 2
. The filter responses may be used to calculate the monogenic signal or the boundary tensor.
Declarations:
pass 2D array views:
Usage:
#include <vigra/boundarytensor.hxx>
Namespace: vigra
void vigra::boundaryTensor | ( | ... | ) |
Calculate the boundary tensor for a scalar valued image.
These functions calculate a spatial domain approximation of the boundary tensor as described in
U. Köthe: "Integrated Edge and Junction Detection with the Boundary Tensor", in: ICCV 03, Proc. of 9th Intl. Conf. on Computer Vision, Nice 2003, vol. 1, pp. 424-431, Los Alamitos: IEEE Computer Society, 2003
with the Laplacian of Gaussian as the underlying bandpass filter (see rieszTransformOfLOG()). The output image must have 3 bands which will hold the tensor components in the order t11, t12 (== t21), t22. The function boundaryTensor1() with the same interface implements a variant of the boundary tensor where the 0th-order Riesz transform has been dropped, so that the tensor is no longer sensitive to blobs.
Declarations:
pass 2D array views:
Usage:
#include <vigra/boundarytensor.hxx>
Namespace: vigra
void vigra::boundaryTensor1 | ( | ... | ) |
Boundary tensor variant.
This function implements a variant of the boundary tensor where the 0th-order Riesz transform has been dropped, so that the tensor is no longer sensitive to blobs. See boundaryTensor() for more detailed documentation.
Declarations:
#include <vigra/boundarytensor.hxx>
Namespace: vigra
pass 2D array views:
TinyVector<float, 3> vigra::polar2Lab | ( | double | color, |
double | brightness, | ||
double | saturation | ||
) |
Init L*a*b* color triple from polar representation.
#include <vigra/colorconversions.hxx>
Namespace: vigra
Declarations:
L*a*b* polar coordinates of some important colors:
TinyVector<float, 3> vigra::lab2Polar | ( | V const & | lab | ) |
Create polar representation form L*a*b*.
Declaration:
#include <vigra/colorconversions.hxx>
Namespace: vigra
This realizes the inverse of the transformation described in polar2Lab().
TinyVector<float, 3> vigra::polar2Luv | ( | double | color, |
double | brightness, | ||
double | saturation | ||
) |
Init L*u*v* color triple from polar representation.
#include <vigra/colorconversions.hxx>
Namespace: vigra
Declarations:
L*u*v* polar coordinates of some important colors:
TinyVector<float, 3> vigra::luv2Polar | ( | V const & | luv | ) |
Create polar representation form L*u*v*.
Declaration:
#include <vigra/colorconversions.hxx>
Namespace: vigra
This realizes the inverse of the transformation described in polar2Luv().
TinyVector<float, 3> vigra::polar2YPrimePbPr | ( | double | color, |
double | brightness, | ||
double | saturation | ||
) |
Init Y'PbPr color triple from polar representation.
#include <vigra/colorconversions.hxx>
Namespace: vigra
Declarations:
Y'PbPr polar coordinates of some important colors:
TinyVector<float, 3> vigra::yPrimePbPr2Polar | ( | V const & | ypbpr | ) |
Create polar representation form Y'PbPr.
Declaration:
#include <vigra/colorconversions.hxx>
Namespace: vigra
This realizes the inverse of the transformation described in polar2YPrimePbPr().
TinyVector<float, 3> vigra::polar2YPrimeCbCr | ( | double | color, |
double | brightness, | ||
double | saturation | ||
) |
Init Y'CbCr color triple from polar representation.
#include <vigra/colorconversions.hxx>
Namespace: vigra
Declarations:
Y'CbCr polar coordinates of some important colors:
TinyVector<float, 3> vigra::yPrimeCbCr2Polar | ( | V const & | ycbcr | ) |
Create polar representation form Y'CbCr.
Declaration:
#include <vigra/colorconversions.hxx>
Namespace: vigra
This realizes the inverse of the transformation described in polar2YPrimeCbCr().
TinyVector<float, 3> vigra::polar2YPrimeIQ | ( | double | color, |
double | brightness, | ||
double | saturation | ||
) |
Init Y'IQ color triple from polar representation.
#include <vigra/colorconversions.hxx>
Namespace: vigra
Declarations:
Y'IQ polar coordinates of some important colors:
TinyVector<float, 3> vigra::yPrimeIQ2Polar | ( | V const & | yiq | ) |
Create polar representation form Y'IQ.
Declaration:
#include <vigra/colorconversions.hxx>
Namespace: vigra
This realizes the inverse of the transformation described in polar2YPrimeIQ().
TinyVector<float, 3> vigra::polar2YPrimeUV | ( | double | color, |
double | brightness, | ||
double | saturation | ||
) |
Init Y'UV color triple from polar representation.
#include <vigra/colorconversions.hxx>
Namespace: vigra
Declarations:
Y'UV polar coordinates of some important colors:
TinyVector<float, 3> vigra::yPrimeUV2Polar | ( | V const & | yuv | ) |
Create polar representation form Y'UV.
Declaration:
#include <vigra/colorconversions.hxx>
Namespace: vigra
This realizes the inverse of the transformation described in polar2YPrimeUV().
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:
Usage:
#include <vigra/combineimages.hxx>
Namespace: vigra
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:
Usage:
#include <vigra/combineimages.hxx>
Namespace: vigra
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:
Usage:
#include <vigra/combineimages.hxx>
Namespace: vigra
void vigra::compress | ( | char const * | source, |
std::size_t | size, | ||
ArrayVector< char > & | dest, | ||
CompressionMethod | method | ||
) |
Compress the source buffer.
The destination array will be resized as required.
void vigra::uncompress | ( | char const * | source, |
std::size_t | srcSize, | ||
char * | dest, | ||
std::size_t | destSize, | ||
CompressionMethod | method | ||
) |
Uncompress the source buffer when the uncompressed size is known.
The destination buffer must be allocated to the correct size.
void vigra::convolveImage | ( | ... | ) |
Convolve an image with the given kernel(s).
If you pass vigra::Kernel2D to this function, it will perform an explicit 2-dimensional convolution. If you pass a single vigra::Kernel1D, it performs a separable convolution, i.e. it concatenates two 1D convolutions (along the x-axis and along the y-axis) with the same kernel via internal calls to separableConvolveX() and separableConvolveY(). If two 1D kernels are specified, separable convolution uses different kernels for the x- and y-axis.
All border treatment modes are supported.
The input pixel type T1
must be a linear space over the kernel's value_type T
, i.e. addition of source values, multiplication with kernel values, and NumericTraits must be defined. The kernel's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined. Typically, you will use double
for the kernel type.
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the kernel radius.
w > std::max(xkernel.right(), -xkernel.keft())
and h > std::max(ykernel.right(), -ykernel.left())
are required. w > std::max(kernel.lowerRight().x, -kernel.upperLeft().x)
and h > std::max(kernel.lowerRight().y, -kernel.upperLeft().y)
are required. If BORDER_TREATMENT_CLIP
is requested: the sum of kernel elements must be != 0.
void vigra::simpleSharpening | ( | ... | ) |
Perform simple sharpening function.
This function uses convolveImage() with the following 3x3 filter:
and uses BORDER_TREATMENT_REFLECT
as border treatment mode.
Preconditions:
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::gaussianSharpening | ( | ... | ) |
Perform sharpening function with gaussian filter.
This function uses gaussianSmoothing() at the given scale to create a temporary image 'smooth' and than blends the original and smoothed image according to the formula
Preconditions:
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::gaussianSmoothing | ( | ... | ) |
Perform isotropic Gaussian convolution.
This function is a shorthand for the concatenation of a call to separableConvolveX() and separableConvolveY() with a Gaussian kernel of the given scale. If two scales are provided, smoothing in x and y direction will have different strength. The function uses BORDER_TREATMENT_REFLECT
.
Function gaussianSmoothMultiArray() performs the same filter operation on arbitrary dimensional arrays.
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::gaussianGradient | ( | ... | ) |
Calculate the gradient vector by means of a 1st derivatives of Gaussian filter.
This function is a shorthand for the concatenation of a call to separableConvolveX() and separableConvolveY() with the appropriate kernels at the given scale. Note that this function can either produce two separate result images for the x- and y-components of the gradient, or write into a vector valued image (with at least two components).
Function gaussianGradientMultiArray() performs the same filter operation on arbitrary dimensional arrays.
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::gaussianGradientMagnitude | ( | ... | ) |
Calculate the gradient magnitude by means of a 1st derivatives of Gaussian filter.
This function calls gaussianGradient() and returns the pixel-wise magnitude of the resulting gradient vectors. If the original image has multiple bands, the squared gradient magnitude is computed for each band separately, and the return value is the square root of the sum of these squared magnitudes.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
use arbitrary-dimensional arrays:
Here, the input element types T1
and MT
can be arbitrary scalar types, and T1
may also be TinyVector
or RGBValue
. The output element type T2
should be the corresponding norm type (see NormTraits). In the Multiband<MT>
-version, the input array's right-most dimension is interpreted as a channel axis, therefore it must have one dimension more than the output array.
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
#include <vigra/convolution.hxx> (deprecated API version)
Namespace: vigra
void vigra::laplacianOfGaussian | ( | ... | ) |
Filter image with the Laplacian of Gaussian operator at the given scale.
This function calls separableConvolveX() and separableConvolveY() with the appropriate 2nd derivative of Gaussian kernels in x- and y-direction and then sums the results to get the Laplacian.
Function laplacianOfGaussianMultiArray() performs the same filter operation on arbitrary dimensional arrays.
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::hessianMatrixOfGaussian | ( | ... | ) |
Filter image with the 2nd derivatives of the Gaussian at the given scale to get the Hessian matrix.
The Hessian matrix is a symmetric matrix defined as:
where denote 2nd derivatives of Gaussians at the given scale, and
is the convolution symbol. This function calls separableConvolveX() and separableConvolveY() with the appropriate 2nd derivative of Gaussian kernels and puts the results in the three destination images. The first destination image will contain the second derivative in x-direction, the second one the mixed derivative, and the third one holds the derivative in y-direction.
Function hessianOfGaussianMultiArray() performs the same filter operation on arbitrary dimensional arrays.
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::structureTensor | ( | ... | ) |
Calculate the Structure Tensor for each pixel of and image, using Gaussian (derivative) filters.
The Structure Tensor is is a smoothed version of the Euclidean product of the gradient vector with itself. I.e. it's a symmetric matrix defined as:
where denotes Gaussian smoothing at the outer scale,
are the gradient components taken at the inner scale,
is the convolution symbol, and
etc. are pixelwise products of the 1st derivative images. This function calls separableConvolveX() and separableConvolveY() with the appropriate Gaussian kernels and puts the results in the three separate destination images (where the first one will contain
, the second one
, and the third one holds
), or into a single 3-band image (where the bands hold the result in the same order as above). The latter form is also applicable when the source image is a multi-band image (e.g. RGB). In this case, tensors are first computed for each band separately, and then summed up to get a single result tensor.
Function structureTensorMultiArray() performs the same filter operation on arbitrary dimensional arrays.
Declarations:
pass 2D array views:
Usage:
#include <vigra/convolution.hxx>
Namespace: vigra
void vigra::copyImage | ( | ... | ) |
Copy source image into destination image.
If necessary, type conversion takes place. Some variants of this function use accessors to access the pixel data.
See copyMultiArray() for a dimension-independent version of this algorithm.
Declarations:
pass 2D array views:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/copyimage.hxx>
Namespace: vigra
Use MultiArrayView API:
Use iterator-based API with accessor:
Required Interface:
void vigra::copyImageIf | ( | ... | ) |
Copy source ROI into destination image.
Pixel values are copied whenever the return value of the mask's accessor is not zero. If necessary, type conversion takes place. Some variants of this function use accessors to access the pixel data.
Declarations:
pass 2D array views:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/copyimage.hxx>
Namespace: vigra
Use MultiArrayView API:
Use iterator-based API with accessor:
Required Interface:
void vigra::cornerResponseFunction | ( | ... | ) |
Find corners in an image (1).
This algorithm implements the so called 'corner response function' to measure the 'cornerness' of each pixel in the image, according to [C.G. Harris and M.J. Stevens: "A Combined Corner and Edge Detector", Proc. of 4th Alvey Vision Conference, 1988]. Several studies have found this to be a very robust corner detector, although it moves the corners somewhat into one region, depending on the scale.
The algorithm first determines the structure tensor at each pixel by calling structureTensor(). Then the entries of the structure tensor are combined as
The local maxima of the corner response denote the corners in the gray level image.
The source value type must be a linear algebra, i.e. addition, subtraction, and multiplication with itself, multiplication with doubles and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/cornerdetection.hxx>
Namespace: vigra
void vigra::foerstnerCornerDetector | ( | ... | ) |
Find corners in an image (2).
This algorithm implements the so called 'Foerstner Corner Detector' to measure the 'cornerness' of each pixel in the image, according to [W. Förstner: "A feature based correspondence algorithms for image matching", Intl. Arch. Photogrammetry and Remote Sensing, vol. 24, pp 160-166, 1986]. It is also known as the "Plessey Detector" by Harris. However, it should not be confused with the "\link cornerResponseFunction Corner Response Function\endlink ", another detector invented by Harris.
The algorithm first determines the structure tensor at each pixel by calling structureTensor(), where the given scale is used for both the inner and outer scales. Then the entries of the structure tensor are combined as
The local maxima of the corner strength denote the corners in the gray level image. Its performance is similar to the cornerResponseFunction().
The source value type must be a division algebra, i.e. addition, subtraction, multiplication, and division with itself, multiplication with doubles and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/cornerdetection.hxx>
Namespace: vigra
void vigra::rohrCornerDetector | ( | ... | ) |
Find corners in an image (3).
This algorithm implements yet another structure tensor-based corner detector, according to [K. Rohr: "Untersuchung von grauwertabhängigen Transformationen zur Ermittlung der optischen Flusses in Bildfolgen", Diploma thesis, Inst. für Nachrichtensysteme, Univ. Karlsruhe, 1987, see also K. Rohr: "Modelling and Identification of Characteristic Intensity Variations", Image and Vision Computing 10:2 (1992) 66-76 and K. Rohr: "Localization Properties of Direct Corner Detectors", J. of Mathematical Imaging and Vision 4:2 (1994) 139-150].
The algorithm first determines the structure tensor at each pixel by calling structureTensor(), where the given scale is used for both the inner and outer scales. Then the entries of the structure tensor are combined as
The local maxima of the corner strength denote the corners in the gray level image. Its performance is similar to the cornerResponseFunction().
The source value type must be a linear algebra, i.e. addition, subtraction, and multiplication with itself, multiplication with doubles and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/cornerdetection.hxx>
Namespace: vigra
void vigra::beaudetCornerDetector | ( | ... | ) |
Find corners in an image (4).
This algorithm implements a corner detector
according to [P.R. Beaudet: "Rotationally Invariant Image Operators", Proc. Intl. Joint Conf. on Pattern Recognition, Kyoto, Japan, 1978, pp. 579-583].
The algorithm calculates the corner strength as the negative determinant of the Hessian Matrix. The local maxima of the corner strength denote the corners in the gray level image.
The source value type must be a linear algebra, i.e. addition, subtraction, and multiplication with itself, multiplication with doubles and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/cornerdetection.hxx>
Namespace: vigra
void vigra::fastCrossCorrelation | ( | ... | ) |
This function performes a fast cross-correlation.
This function performes a fast cross-correlation using the Fast Fourier Transform and the dependency of the convolution and the correlation in Fourier space.
The input pixel type T1
must be a linear space over the window functions' value_type T
, i.e. addition of source values, multiplication with functions' values, and NumericTraits must be defined. The mask's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
By default, the borders are filled with zeros. Use the clearBorders switch to change that behavior if you need to.
Declarations:
pass 2D array views:
Usage:
#include <vigra/correlation.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the size of the mask.
void vigra::fastNormalizedCrossCorrelation | ( | ... | ) |
This function performes a fast normalized cross-correlation.
To compute the normalized cross correlation in a fast way, it is using the Fast Fourier Transform and sum-image look-up-tables as it is suggested by J.P.Lewis (1995): "Fast Normalized Cross-Correlation".
The input pixel type T1
must be a linear space over the window functions' value_type T
, i.e. addition of source values, multiplication with functions' values, and NumericTraits must be defined. The mask's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
By default, the borders are filled with zeros. Use the clearBorders switch to change that behavior if you need to.
Declarations:
pass 2D array views:
Usage:
#include <vigra/correlation.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the size of the mask.
void vigra::crossCorrelation | ( | ... | ) |
This function performes a (slow) cross-correlation.
This function performes a (slow) cross-correlation using the window function environment and comparison of the mask with the underlying image part for each pixel. This may however be faster for very few comparisons.
The input pixel type T1
must be a linear space over the window functions' value_type T
, i.e. addition of source values, multiplication with functions' values, and NumericTraits must be defined. The mask's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/correlation.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the size of the mask.
void vigra::normalizedCrossCorrelation | ( | ... | ) |
This function performes a (slow) normalized cross-correlation.
This function performes a (slow) normalized cross-correlation using the window function environment and comparison of the mask with the underlying image part for each pixel. This may however be faster for very few comparisons.
The input pixel type T1
must be a linear space over the window functions' value_type T
, i.e. addition of source values, multiplication with functions' values, and NumericTraits must be defined. The mask's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/correlation.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the size of the mask.
Create vector by subtracting specified offset.
Create size by subtracting specified offset.
Calculate size of rect between two points.
The difference of two points is a size
Create vector by adding specified offset.
Create size by adding specified offset.
Create point by adding specified offset.
void vigra::distanceTransform | ( | ... | ) |
For all background pixels, calculate the distance to the nearest object or contour. The label of the pixels to be considered background in the source image is passed in the parameter 'background'. Source pixels with other labels will be considered objects. In the destination image, all pixels corresponding to background will be assigned the their distance value, all pixels corresponding to objects will be assigned 0.
The parameter 'norm' gives the distance norm to be used:
norm == 2: use Euclidean distance (L2 norm)
If you use the L2 norm, the destination pixels must be real valued to give correct results.
Declarations:
pass 2D array views:
Usage:
#include <vigra/distancetransform.hxx>
Namespace: vigra
void vigra::eccentricityCenters | ( | const MultiArrayView< N, T, S > & | src, |
Array & | centers | ||
) |
Find the (approximate) eccentricity center in each region of a labeled image.
Declarations:
pass arbitrary-dimensional array views:
[in] | src | : labeled array |
[out] | centers | : list of eccentricity centers (required interface: centers[k] = TinyVector<int, N>() must be supported) |
Usage:
#include <vigra/eccentricitytransform.hxx>
Namespace: vigra
void vigra::eccentricityTransformOnLabels | ( | MultiArrayView< N, T > const & | src, |
MultiArrayView< N, S > | dest, | ||
Array & | centers | ||
) |
Computes the (approximate) eccentricity transform on each region of a labeled image.
Declarations:
pass arbitrary-dimensional array views:
[in] | src | : labeled array |
[out] | dest | : eccentricity transform of src |
[out] | centers | : (optional) list of eccentricity centers (required interface: centers[k] = TinyVector<int, N>() must be supported) |
Usage:
#include <vigra/eccentricitytransform.hxx>
Namespace: vigra
void vigra::differenceOfExponentialEdgeImage | ( | ... | ) |
Detect and mark edges in an edge image using the Shen/Castan zero-crossing detector.
This operator applies an exponential filter to the source image at the given scale
and subtracts the result from the original image. Zero crossings are detected in the resulting difference image. Whenever the gradient at a zero crossing is greater than the given gradient_threshold
, an edge point is marked (using edge_marker
) in the destination image on the darker side of the zero crossing (note that zero crossings occur between pixels). For example:
Non-edge pixels (.
) remain untouched in the destination image. The result can be improved by the post-processing operation removeShortEdges(). A more accurate edge placement can be achieved with the function differenceOfExponentialCrackEdgeImage().
The source value type (SrcAccessor::value_type
) must be a linear algebra, i.e. addition, subtraction and multiplication of the type with itself, and multiplication with double and NumericTraits must be defined. In addition, this type must be less-comparable.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::differenceOfExponentialCrackEdgeImage | ( | ... | ) |
Detect and mark edges in a crack edge image using the Shen/Castan zero-crossing detector.
This operator applies an exponential filter to the source image at the given scale
and subtracts the result from the original image. Zero crossings are detected in the resulting difference image. Whenever the gradient at a zero crossing is greater than the given gradient_threshold
, an edge point is marked (using edge_marker
) in the destination image between the corresponding original pixels. Topologically, this means we must insert additional pixels between the original ones to represent the boundaries between the pixels (the so called zero- and one-cells, with the original pixels being two-cells). Within VIGRA, such an image is called Crack Edge Image. To allow insertion of the zero- and one-cells, the destination image must have twice the size of the original (precisely, (2*w-1)
by (2*h-1)
pixels). Then the algorithm proceeds as follows:
Thus the edge points are marked where they actually are - in between the pixels. An important property of the resulting edge image is that it conforms to the notion of well-composedness as defined by Latecki et al., i.e. connected regions and edges obtained by a subsequent Connected Components Labeling do not depend on whether 4- or 8-connectivity is used. The non-edge pixels (.
) in the destination image remain unchanged. The result conforms to the requirements of a Crack Edge Image. It can be further improved by the post-processing operations removeShortEdges() and closeGapsInCrackEdgeImage().
The source value type (SrcAccessor::value_type
) must be a linear algebra, i.e. addition, subtraction and multiplication of the type with itself, and multiplication with double and NumericTraits must be defined. In addition, this type must be less-comparable.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
The destination image must have twice the size of the source:
void vigra::removeShortEdges | ( | ... | ) |
Remove short edges from an edge image.
This algorithm can be applied as a post-processing operation of differenceOfExponentialEdgeImage() and differenceOfExponentialCrackEdgeImage(). It removes all edges that are shorter than min_edge_length
. The corresponding pixels are set to the non_edge_marker
. The idea behind this algorithms is that very short edges are probably caused by noise and don't represent interesting image structure. Technically, the algorithms executes a connected components labeling, so the image's value type must be equality comparable.
If the source image fulfills the requirements of a Crack Edge Image, it will still do so after application of this algorithm.
Note that this algorithm, unlike most other algorithms in VIGRA, operates in-place, i.e. on only one image. Also, the algorithm assumes that all non-edges pixels are already marked with the given non_edge_marker
value.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
void vigra::closeGapsInCrackEdgeImage | ( | ... | ) |
Close one-pixel wide gaps in a cell grid edge image.
This algorithm is typically applied as a post-processing operation of differenceOfExponentialCrackEdgeImage(). The source image must fulfill the requirements of a Crack Edge Image, and will still do so after application of this algorithm.
It closes one pixel wide gaps in the edges resulting from this algorithm. Since these gaps are usually caused by zero crossing slightly below the gradient threshold used in edge detection, this algorithms acts like a weak hysteresis thresholding. The newly found edge pixels are marked with the given edge_marker
. The image's value type must be equality comparable.
Note that this algorithm, unlike most other algorithms in VIGRA, operates in-place, i.e. on only one image.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
void vigra::beautifyCrackEdgeImage | ( | ... | ) |
Beautify crack edge image for visualization.
This algorithm is applied as a post-processing operation of differenceOfExponentialCrackEdgeImage(). The source image must fulfill the requirements of a Crack Edge Image, but will not do so after application of this algorithm. In particular, the algorithm removes zero-cells marked as edges to avoid staircase effects on diagonal lines like this:
Therefore, this algorithm should only be applied as a visualization aid, i.e. for human inspection. The algorithm assumes that edges are marked with edge_marker
, and background pixels with background_marker
. The image's value type must be equality comparable.
Note that this algorithm, unlike most other algorithms in VIGRA, operates in-place, i.e. on only one image.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
void vigra::cannyEdgelList | ( | ... | ) |
Simple implementation of Canny's edge detector.
The function can be called in two modes: If you pass a 'scale', it is assumed that the original image is scalar, and the Gaussian gradient is internally computed at the given 'scale'. If the function is called without scale parameter, it is assumed that the given image already contains the gradient (i.e. its value_type must be a vector of length 2).
On the basis of the gradient image, a simple non-maxima suppression is performed: for each 3x3 neighborhood, it is determined whether the center pixel has larger gradient magnitude than its two neighbors in gradient direction (where the direction is rounded into octants). If this is the case, a new Edgel is appended to the given vector of edgels
. The subpixel edgel position is determined by fitting a parabola to the three gradient magnitude values mentioned above. The sub-pixel location of the parabola's tip and the gradient magnitude and direction (from the pixel center) are written in the newly created edgel.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::cannyEdgelListThreshold | ( | ... | ) |
Canny's edge detector with thresholding.
This function works exactly like cannyEdgelList(), but you also pass a threshold for the minimal gradient magnitude, so that edgels whose strength is below the threshold are not inserted into the edgel list.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::cannyEdgeImage | ( | ... | ) |
Detect and mark edges in an edge image using Canny's algorithm.
This operator first calls cannyEdgelList() with the given scale to generate an edgel list for the given image. Then it scans this list and selects edgels whose strength is above the given gradient_threshold
. For each of these edgels, the edgel's location is rounded to the nearest pixel, and that pixel marked with the given edge_marker
.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::cannyEdgeImageFromGradWithThinning | ( | ... | ) |
Detect and mark edges in an edge image using Canny's algorithm.
The input pixels of this algorithm must be vectors of length 2 (see Required Interface below). It first searches for all pixels whose gradient magnitude is larger than the given gradient_threshold
and larger than the magnitude of its two neighbors in gradient direction (where these neighbors are determined by nearest neighbor interpolation, i.e. according to the octant where the gradient points into). The resulting edge pixel candidates are then subjected to topological thinning so that the remaining edge pixels can be linked into edgel chains with a provable, non-heuristic algorithm. Thinning is performed so that the pixels with highest gradient magnitude survive. Optionally, the outermost pixels are marked as edge pixels as well when addBorder
is true. The remaining pixels will be marked in the destination image with the value of edge_marker
(all non-edge pixels remain untouched).
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::cannyEdgeImageWithThinning | ( | ... | ) |
Detect and mark edges in an edge image using Canny's algorithm.
This operator first calls gaussianGradient() to compute the gradient of the input image, ad then cannyEdgeImageFromGradWithThinning() to generate an edge image. See there for more detailed documentation.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::cannyEdgelList3x3 | ( | ... | ) |
Improved implementation of Canny's edge detector.
This operator first computes pixels which are crossed by the edge using cannyEdgeImageWithThinning(). The gradient magnitudes in the 3x3 neighborhood of these pixels are then projected onto the normal of the edge (as determined by the gradient direction). The edgel's subpixel location is found by fitting a parabola through the 9 gradient values and determining the parabola's tip. A new Edgel is appended to the given vector of edgels
. Since the parabola is fitted to 9 points rather than 3 points as in cannyEdgelList(), the accuracy is higher.
The function can be called in two modes: If you pass a 'scale', it is assumed that the original image is scalar, and the Gaussian gradient is internally computed at the given 'scale'. If the function is called without scale parameter, it is assumed that the given image already contains the gradient (i.e. its value_type must be a vector of length 2).
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::cannyEdgelList3x3Threshold | ( | ... | ) |
Improved implementation of Canny's edge detector with thresholding.
This function works exactly like cannyEdgelList3x3(), but you also pass a threshold for the minimal gradient magnitude, so that edgels whose strength is below the threshold are not inserted into the edgel list.
Declarations:
pass 2D array views:
Usage:
#include <vigra/edgedetection.hxx>
Namespace: vigra
Preconditions:
void vigra::moveDCToCenter | ( | ... | ) |
Rearrange the quadrants of a Fourier image so that the origin is in the image center.
FFTW produces fourier images where the DC component (origin of fourier space) is located in the upper left corner of the image. The quadrants are placed like this (using a 4x4 image for example):
After applying the function, the quadrants are at their usual places:
This transformation can be reversed by moveDCToUpperLeft(). Note that the 2D versions of this transformation must not be executed in place - input and output images must be different. In contrast, the nD version (with MultiArrayView argument) always works in-place.
Declarations:
use MultiArrayView (this works in-place, with arbitrary dimension N):
pass iterators explicitly (2D only, not in-place):
use argument objects in conjunction with Argument Object Factories (2D only, not in-place):
Usage:
#include <vigra/fftw3.hxx> (for 2D variants)
#include <vigra/multi_fft.hxx> (for nD variants)
Namespace: vigra
void vigra::moveDCToUpperLeft | ( | ... | ) |
Rearrange the quadrants of a Fourier image so that the origin is in the image's upper left.
This function is the inversion of moveDCToCenter(). See there for a detailed description and usage examples.
Declarations:
use MultiArrayView (this works in-place, with arbitrary dimension N):
pass iterators explicitly (2D only, not in-place):
use argument objects in conjunction with Argument Object Factories (2D only, not in-place):
void vigra::fourierTransform | ( | ... | ) |
Compute forward and inverse Fourier transforms.
The array referring to the spatial domain (i.e. the input in a forward transform, and the output in an inverse transform) may be scalar or complex. The array representing the frequency domain (i.e. output for forward transform, input for inverse transform) must always be complex.
The new implementations (those using MultiArrayView arguments) perform a normalized transform, whereas the old ones (using 2D iterators or argument objects) perform an un-normalized transform (i.e. the result of the inverse transform is scaled by the number of pixels).
In general, input and output arrays must have the same shape, with the exception of the special R2C and C2R modes defined by FFTW.
The R2C transform reduces the redundancy in the Fourier representation of a real-valued signal: Since the Fourier representation of a real signal is symmetric, about half of the Fourier coefficients can simply be dropped. By convention, this reduction is applied to the first (innermost) dimension, such that fourier.shape(0) == spatial.shape(0)/2 + 1
holds. The correct frequency domain shape can be conveniently computed by means of the function fftwCorrespondingShapeR2C().
Note that your program must always link against libfftw3
. If you want to compute Fourier transforms for float
or long double
arrays, you must additionally link against libfftw3f
and libfftw3l
respectively. (Old-style functions only support double
).
The Fourier transform functions internally create FFTW plans which control the algorithm details. The plans are creates with the flag FFTW_ESTIMATE
, i.e. optimal settings are guessed or read from saved "wisdom" files. If you need more control over planning, you can use the class FFTWPlan.
Declarations:
use complex-valued MultiArrayView arguments (this works for arbitrary dimension N):
use real-valued MultiArrayView in the spatial domain, complex-valued MultiArrayView in the frequency domain (this works for arbitrary dimension N, and also supports the R2C and C2R transform, depending on the array shape in the frequency domain):
pass iterators explicitly (2D only, double only):
use argument objects in conjunction with Argument Object Factories (2D only, double only):
Usage:
#include <vigra/fftw3.hxx> (old-style 2D variants)
#include <vigra/multi_fft.hxx> (new-style nD variants)
Namespace: vigra
old-style example (using FFTWComplexImage):
new-style examples (using MultiArray):
Complex input arrays are handled in the same way.
void vigra::fourierTransformInverse | ( | ... | ) |
Compute inverse Fourier transforms.
See fourierTransform() for details.
void vigra::applyFourierFilter | ( | ... | ) |
Apply a filter (defined in the frequency domain) to an image.
After transferring the image into the frequency domain, it is multiplied pixel-wise with the filter and transformed back. The result is put into the given destination image which must have the right size. The result will be normalized to compensate for the two FFTs.
If the destination image is scalar, only the real part of the result image is retained. In this case, you are responsible for choosing a filter image which ensures a zero imaginary part of the result (e.g. use a real, even symmetric filter image, or a purely imaginary, odd symmetric one).
The DC entry of the filter must be in the upper left, which is the position where FFTW expects it (see moveDCToUpperLeft()).
See also convolveFFT() for corresponding functionality on the basis of the MultiArrayView interface.
Declarations:
pass 2D array views:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/fftw3.hxx>
Namespace: vigra
For inspection of the result, FFTWMagnitudeAccessor might be useful. If you want to apply the same filter repeatedly, it may be more efficient to use the FFTW functions directly with FFTW plans optimized for good performance.
void vigra::applyFourierFilterFamily | ( | ... | ) |
Apply an array of filters (defined in the frequency domain) to an image.
This provides the same functionality as applyFourierFilter(), but applying several filters at once allows to avoid repeated Fourier transforms of the source image.
Filters and result images must be stored in vigra::ImageArray data structures. In contrast to applyFourierFilter(), this function adjusts the size of the result images and the the length of the array.
Declarations:
pass 2D array views:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/fftw3.hxx>
Namespace: vigra
void vigra::fourierTransformReal | ( | ... | ) |
Real Fourier transforms for even and odd boundary conditions (aka. cosine and sine transforms).
If the image is real and has even symmetry, its Fourier transform is also real and has even symmetry. The Fourier transform of a real image with odd symmetry is imaginary and has odd symmetry. In either case, only about a quarter of the pixels need to be stored because the rest can be calculated from the symmetry properties. This is especially useful, if the original image is implicitly assumed to have reflective or anti-reflective boundary conditions. Then the "negative" pixel locations are defined as
end similar at the other boundary (see the FFTW documentation for details). This has the advantage that more efficient Fourier transforms that use only real numbers can be implemented. These are also known as cosine and sine transforms respectively.
If you use the odd transform it is important to note that in the Fourier domain, the DC component is always zero and is therefore dropped from the data structure. This means that index 0 in an odd symmetric Fourier domain image refers to the first harmonic. This is especially important if an image is first cosine transformed (even symmetry), then in the Fourier domain multiplied with an odd symmetric filter (e.g. a first derivative) and finally transformed back to the spatial domain with a sine transform (odd symmetric). For this to work properly the image must be shifted left or up by one pixel (depending on whether the x- or y-axis is odd symmetric) before the inverse transform can be applied. (see example below).
The real Fourier transform functions are named fourierTransformReal??
where the questions marks stand for either E
or O
indicating whether the x- and y-axis is to be transformed using even or odd symmetry. The same functions can be used for both the forward and inverse transforms, only the normalization changes. For signal processing, the following normalization factors are most appropriate:
where w
and h
denote the image width and height.
Declarations:
pass 2D array views:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/fftw3.hxx>
Namespace: vigra
TARGET vigra::fixed_point_cast | ( | FixedPoint< IntBits, FracBits > | v | ) |
Convert a FixedPoint to a built-in type. If the target is integral, the value is rounded.
Usage:
TARGET fixed_point_cast | ( | FixedPoint16< IntBits, OverflowHandling > | v | ) |
Convert a FixedPoint16 to a built-in type. If the target is integral, the value is rounded.
Usage:
void vigra::discRankOrderFilter | ( | ... | ) |
Apply rank order filter with disc structuring function to the image.
The pixel values of the source image must be in the range 0...255. Radius must be >= 0. Rank must be in the range 0.0 <= rank <= 1.0. The filter acts as a minimum filter if rank = 0.0, as a median if rank = 0.5, and as a maximum filter if rank = 1.0. Accessor are used to access the pixel data.
Declarations:
pass 2D array views:
Usage:
#include <vigra/flatmorphology.hxx>
Namespace: vigra
Preconditions:
void vigra::discErosion | ( | ... | ) |
Apply erosion (minimum) filter with disc of given radius to image.
This is an abbreviation for the rank order filter with rank = 0.0. See discRankOrderFilter() for more information.
Declarations:
pass 2D array views:
void vigra::discDilation | ( | ... | ) |
Apply dilation (maximum) filter with disc of given radius to image.
This is an abbreviation for the rank order filter with rank = 1.0. See discRankOrderFilter() for more information.
Declarations:
pass 2D array views:
void vigra::discMedian | ( | ... | ) |
Apply median filter with disc of given radius to image.
This is an abbreviation for the rank order filter with rank = 0.5. See discRankOrderFilter() for more information.
Declarations:
pass 2D array views:
void vigra::discRankOrderFilterWithMask | ( | ... | ) |
Apply rank order filter with disc structuring function to the image using a mask.
The pixel values of the source image must be in the range 0...255. Radius must be >= 0. Rank must be in the range 0.0 <= rank <= 1.0. The filter acts as a minimum filter if rank = 0.0, as a median if rank = 0.5, and as a maximum filter if rank = 1.0. Accessor are used to access the pixel data.
The mask is only applied to th input image, i.e. the function generates an output wherever the current disc contains at least one pixel with mask value 'true'. Source pixels with mask value 'false' are ignored during the calculation of the rank order.
Declarations:
pass 2D array views:
Usage:
#include <vigra/flatmorphology.hxx>
Namespace: vigra
Preconditions:
void vigra::discErosionWithMask | ( | ... | ) |
Apply erosion (minimum) filter with disc of given radius to image using a mask.
This is an abbreviation for the masked rank order filter with rank = 0.0. See discRankOrderFilterWithMask() for more information.
Declarations:
pass 2D array views:
void vigra::discDilationWithMask | ( | ... | ) |
Apply dilation (maximum) filter with disc of given radius to image using a mask.
This is an abbreviation for the masked rank order filter with rank = 1.0. See discRankOrderFilterWithMask() for more information.
Declarations:
pass 2D array views:
void vigra::discMedianWithMask | ( | ... | ) |
Apply median filter with disc of given radius to image using a mask.
This is an abbreviation for the masked rank order filter with rank = 0.5. See discRankOrderFilterWithMask() for more information.
Declarations:
pass 2D array views:
void vigra::createGaborFilter | ( | ... | ) |
Create a gabor filter in frequency space.
The orientation is given in radians, the other parameters are the center frequency (for example 0.375 or smaller) and the two angular and radial sigmas of the gabor filter. (See angularGaborSigma() for an explanation of possible values.)
The energy of the filter is explicitly normalized to 1.0.
Declarations:
pass 2D array views:
Usage:
#include <vigra/gaborfilter.hxx>
Namespace: vigra
double vigra::radialGaborSigma | ( | double | centerFrequency | ) |
Calculate sensible radial sigma for given parameters.
For a brief introduction what is meant with "sensible" sigmas, see angularGaborSigma().
Declaration:
double vigra::angularGaborSigma | ( | int | directionCount, |
double | centerFrequency | ||
) |
Calculate sensible angular sigma for given parameters.
"Sensible" means: If you use a range of gabor filters for feature detection, you are interested in minimal redundancy. This is hard to define but one possible try is to arrange the filters in frequency space, so that the half-peak-magnitude ellipses touch each other.
To do so, you must know the number of directions (first parameter for the angular sigma function) and the center frequency of the filter you want to calculate the sigmas for.
The exact formulas are:
Declaration:
void vigra::gradientEnergyTensor | ( | ... | ) |
Calculate the gradient energy tensor for a scalar valued image.
These function calculates the gradient energy tensor (GET operator) as described in
M. Felsberg, U. Köthe: "GET: The Connection Between Monogenic Scale-Space and Gaussian Derivatives", in: R. Kimmel, N. Sochen, J. Weickert (Eds.): Scale Space and PDE Methods in Computer Vision, Proc. of Scale-Space 2005, Lecture Notes in Computer Science 3459, pp. 192-203, Heidelberg: Springer, 2005.
U. Köthe, M. Felsberg: "Riesz-Transforms Versus Derivatives: On the Relationship Between the Boundary Tensor and the Energy Tensor", in: ditto, pp. 179-191.
with the given filters: The derivative filter derivKernel is applied to the appropriate image dimensions in turn (see the papers above for details), and the other dimension is smoothed with smoothKernel. The kernels can be as small as 3x1, e.g. [0.5, 0, -0.5] and [3.0/16.0, 10.0/16.0, 3.0/16.0] respectively.
The output image must have 3 bands which will hold the tensor components in the order t11, t12 (== t21), t22. The signs of the output are adjusted for a right-handed coordinate system. Thus, orientations derived from the tensor will be in counter-clockwise (mathematically positive) order, with the x-axis at zero degrees (this is the standard in all VIGRA functions that deal with orientation).
Declarations:
pass 2D array views:
Usage:
#include <vigra/gradient_energy_tensor.hxx>
Namespace: vigra
void vigra::edgeSort | ( | const GRAPH & | g, |
const WEIGHTS & | weights, | ||
const COMPERATOR & | comperator, | ||
std::vector< typename GRAPH::Edge > & | sortedEdges | ||
) |
get a vector of Edge descriptors
Sort the Edge descriptors given weights and a comperator
void vigra::makeRegionAdjacencyGraph | ( | GRAPH_IN | graphIn, |
GRAPH_IN_NODE_LABEL_MAP | labels, | ||
AdjacencyListGraph & | rag, | ||
typename AdjacencyListGraph::template EdgeMap< std::vector< typename GRAPH_IN::Edge > > & | affiliatedEdges, | ||
const Int64 | ignoreLabel = -1 |
||
) |
make a region adjacency graph from a graph and labels w.r.t. that graph
graphIn | : input graph | |
labels | : labels w.r.t. graphIn | |
[out] | rag | : region adjacency graph |
[out] | affiliatedEdges | : a vector of edges of graphIn for each edge in rag |
ignoreLabel | : optional label to ignore (default: -1 means no label will be ignored) |
void vigra::edgeWeightedWatershedsSegmentation | ( | const GRAPH & | g, |
const EDGE_WEIGHTS & | edgeWeights, | ||
const SEEDS & | seeds, | ||
LABELS & | labels | ||
) |
edge weighted watersheds Segmentataion
g | input graph | |
edgeWeights | : edge weights / edge indicator | |
seeds | : seed must be non empty! | |
[out] | labels | : resulting nodeLabeling (not necessarily dense) |
void vigra::carvingSegmentation | ( | const GRAPH & | g, |
const EDGE_WEIGHTS & | edgeWeights, | ||
const SEEDS & | seeds, | ||
const typename LABELS::Value | backgroundLabel, | ||
const typename EDGE_WEIGHTS::Value | backgroundBias, | ||
const typename EDGE_WEIGHTS::Value | noPriorBelow, | ||
LABELS & | labels | ||
) |
edge weighted watersheds Segmentataion
g | input graph | |
edgeWeights | : edge weights / edge indicator | |
seeds | : seed must be non empty! | |
backgroundLabel | : which label is background | |
backgroundBias | : bias for background | |
noPriorBelow | : don't bias the background if edge indicator is below this value | |
[out] | labels | : resulting nodeLabeling (not necessarily dense) |
void vigra::felzenszwalbSegmentation | ( | const GRAPH & | graph, |
const EDGE_WEIGHTS & | edgeWeights, | ||
const NODE_SIZE & | nodeSizes, | ||
float | k, | ||
NODE_LABEL_MAP & | nodeLabeling, | ||
const int | nodeNumStopCond = -1 |
||
) |
edge weighted watersheds Segmentataion
graph | input graph | |
edgeWeights | : edge weights / edge indicator | |
nodeSizes | : size of each node | |
k | : free parameter of felzenszwalb algorithm | |
[out] | nodeLabeling | : nodeLabeling (not necessarily dense) |
nodeNumStopCond | : optional stopping condition |
void vigra::graphSmoothing | ( | const GRAPH & | g, |
const NODE_FEATURES_IN & | nodeFeaturesIn, | ||
const EDGE_INDICATOR & | edgeIndicator, | ||
const float | lambda, | ||
const float | edgeThreshold, | ||
const float | scale, | ||
NODE_FEATURES_OUT & | nodeFeaturesOut | ||
) |
smooth node features of a graph
g | : input graph | |
nodeFeaturesIn | : input node features which should be smoothed | |
edgeIndicator | : edge indicator to indicate over which edges one should smooth | |
lambda | : scale edge indicator by lambda before taking negative exponent | |
edgeThreshold | : edge threshold | |
scale | : how much smoothing should be applied | |
[out] | nodeFeaturesOut | : smoothed node features |
void vigra::recursiveGraphSmoothing | ( | const GRAPH & | g, |
const NODE_FEATURES_IN & | nodeFeaturesIn, | ||
const EDGE_INDICATOR & | edgeIndicator, | ||
const float | lambda, | ||
const float | edgeThreshold, | ||
const float | scale, | ||
size_t | iterations, | ||
NODE_FEATURES_OUT & | nodeFeaturesBuffer, | ||
NODE_FEATURES_OUT & | nodeFeaturesOut | ||
) |
smooth node features of a graph
g | : input graph | |
nodeFeaturesIn | : input node features which should be smoothed | |
edgeIndicator | : edge indicator to indicate over which edges one should smooth | |
lambda | : scale edge indicator by lambda before taking negative exponent | |
edgeThreshold | : edge threshold | |
scale | : how much smoothing should be applied | |
iterations | : how often should this algorithm be called recursively | |
[out] | nodeFeaturesBuffer | : preallocated(!) buffer to store node features temp. |
[out] | nodeFeaturesOut | : smoothed node features |
void vigra::projectGroundTruth | ( | const RAG & | rag, |
const BASE_GRAPH & | baseGraph, | ||
const BASE_GRAPH_RAG_LABELS & | baseGraphRagLabels, | ||
const BASE_GRAPH_GT & | baseGraphGt, | ||
RAG_GT & | ragGt, | ||
RAG_GT_QT & | |||
) |
project ground truth from a base graph, to a region adjacency graph.
MultiArray<2, MultiArrayIndex> vigra::ragFindEdges | ( | const RAGGRAPH & | rag, |
const GRAPH & | graph, | ||
const RAGEDGES & | affiliatedEdges, | ||
MultiArrayView< N, T > | labelsArray, | ||
const typename RAGGRAPH::Node & | node | ||
) |
Find indices of points on the edges.
rag | : Region adjacency graph of the labels array |
graph | : Graph of labels array |
affiliatedEdges | : The affiliated edges of the region adjacency graph |
labelsArray | : The label image |
node | : The node (of the region adjacency graph), whose edges shall be found |
void vigra::edgeWeightsFromNodeWeights | ( | const GridGraph< N, DirectedTag > & | g, |
const NODEMAP & | nodeWeights, | ||
EDGEMAP & | edgeWeights, | ||
bool | euclidean, | ||
FUNCTOR const & | func | ||
) |
create edge weights from node weights
g | : input graph | |
nodeWeights | : node property map holding node weights | |
[out] | edgeWeights | : resulting edge weights |
euclidean | : if 'true', multiply the computed weights with the Euclidean distance between the edge's end nodes (default: 'false') | |
func | : binary function that computes the edge weight from the weights of the edge's end nodes (default: take the average) |
void vigra::edgeWeightsFromInterpolatedImage | ( | const GridGraph< N, DirectedTag > & | g, |
const MultiArrayView< N, T > & | interpolatedImage, | ||
EDGEMAP & | edgeWeights, | ||
bool | euclidean = false |
||
) |
create edge weights from an interpolated image
g | : input graph | |
interpolatedImage | : interpolated image | |
[out] | edgeWeights | : edge weights |
euclidean | : if 'true', multiply the weights with the Euclidean distance between the edge's end nodes (default: 'false') |
For each edge, the function reads the weight from interpolatedImage[u+v]
, where u
and v
are the coordinates of the edge's end points.
void vigra::projectBack | ( | const AdjacencyListGraph & | rag, |
const BASE_GRAPH & | bg, | ||
const Int64 | ignoreLabel, | ||
const BASE_GRAPH_LABELS | bgLabels, | ||
const RAG_FEATURES & | ragFeatures, | ||
BASE_GRAPH_FEATURES & | bgFeatures | ||
) |
project node features of a region adjacency graph back to the base graph.
This function can be used to show a segmentation or node features of RAG on pixel / voxel level
void vigra::readHDF5 | ( | ... | ) |
Read the data specified by the given vigra::HDF5ImportInfo object and write the into the given 'array'.
The array must have the correct number of dimensions and shape for the dataset represented by 'info'. When the element type of 'array' differs from the stored element type, HDF5 will convert the type on the fly (except when the HDF5 version is 1.6 or below, in which case an error will result). Multi-channel element types (i.e. vigra::RGBValue, vigra::TinyVector, and vigra::FFTWComplex) are recognized and handled correctly.
Declaration:
Usage:
#include <vigra/hdf5impex.hxx>
Namespace: vigra
void vigra::writeHDF5 | ( | ... | ) |
Store array data in an HDF5 file.
The number of dimensions, shape and element type of the stored dataset is automatically determined from the properties of the given array. Strided arrays are stored in an unstrided way, i.e. in contiguous scan-order. Multi-channel element types (i.e. vigra::RGBValue, vigra::TinyVector and vigra::FFTWComplex) are recognized and handled correctly (in particular, the will form the innermost dimension of the stored dataset). pathInFile may contain '/'-separated group names, but must end with the name of the dataset to be created.
Declaration:
Usage:
#include <vigra/hdf5impex.hxx>
Namespace: vigra
void vigra::writeHDF5Attr | ( | hid_t | loc, |
const char * | name, | ||
MultiArrayView< N, T, C > const & | array | ||
) |
Write a numeric MultiArray as an attribute with name name of the dataset specified by the handle loc.
#include <vigra/hdf5impex.hxx>
Namespace: vigra
void vigra::writeHDF5Attr | ( | hid_t | loc, |
const char * | name, | ||
MultiArrayView< N, std::string, C > const & | array | ||
) |
Write a string MultiArray as an attribute with name name of the dataset specified by the handle loc.
#include <vigra/hdf5impex.hxx>
Namespace: vigra
void vigra::writeHDF5Attr | ( | hid_t | loc, |
const char * | name, | ||
ArrayVectorView< T > & | array | ||
) |
Write a numeric ArrayVectorView as an attribute with name name of the dataset specified by the handle loc.
#include <vigra/hdf5impex.hxx>
Namespace: vigra
void vigra::writeHDF5Attr | ( | std::string | filePath, |
std::string | pathInFile, | ||
Arr & | ar | ||
) |
write an Attribute given a file and a path in the file. the path in the file should have the format [attribute] or /[subgroups/]dataset.attribute or /[subgroups/]group.attribute. The attribute is written to the root group, a dataset or a subgroup respectively
void vigra::hierarchicalClustering | ( | ... | ) |
Reduce the number of nodes in a graph by iteratively contracting the cheapest edge.
Declarations:
Hierarchical clustering is a simple and versatile image segmentation algorithm that typically operates either directly on the pixels (e.g. on a vigra::GridGraph) or on a region adjacency graph over suitable superpixels (e.g. on an vigra::AdjacencyListGraph). The graph is passed to the function in its first argument. After clustering is completed, the parameter labelMap contains a mapping from original node IDs to the ID of the cluster each node belongs to. Cluster IDs correspond to the ID of an arbitrarily chosen representative node within each cluster, i.e. they form a sparse subset of the original IDs.
Properties of the graph's edges and nodes are provided in the property maps edgeWeights, edgeLengths, nodeFeatures, and nodeSizes. These maps are indexed by edge or node ID and return the corresponding feature. Features must by arithmetic scalars or, in case of node features, scalars or vectors of scalars (precisely: objects that provide begin()
and end()
to create an STL range). Edge weights are typically derived from an edge indicator such as the gradient magnitude, and node features are either the responses of a filter family (when clustering on the pixel grid), or region statistics as computed by Feature Accumulators (when clustering on superpixels).
In each step, the algorithm merges the two nodes and
whose cluster distance is smallest, where the cluster distance is defined as
with denoting the weight of edge
,
and
being the node features (possibly vectors to be compared with metric
), and
and
the corresponding node sizes. The metric is defined in the option object by calling vigra::ClusteringOptions::nodeFeatureMetric() and must be selected from the tags defined in vigra::metrics::MetricType.
The parameters and
control the relative influence of the inputs: With
, the node features are ignored, whereas with
the edge weights are ignored. Similarly, with
, the node size is ignored, whereas with
, cluster distances are scaled by the harmonic mean of the cluster sizes, making the merging of small clusters more favorable. The parameters are defined in the option object by calling vigra::ClusteringOptions::nodeFeatureImportance() and vigra::ClusteringOptions::sizeImportance() respectively.
After each merging step, the features of the resulting cluster and the weights of its outgoing edges are updated by mean of the corresponding properties of the original clusters
and
, weighted by the respective node sizes
and edge lengths
:
Clustering normally stops when only one cluster remains. This default can be overridden by the option object parameters vigra::ClusteringOptions::minRegionCount() and vigra::ClusteringOptions::maxMergeDistance() to stop at a particular number of clusters or a particular cluster distance respectively.
Usage:
#include <vigra/hierarchical_clustering.hxx>
Namespace: vigra
A fully worked example can be found in graph_agglomerative_clustering.cxx
std::string vigra::impexListFormats | ( | ) |
List the image formats VIGRA can read and write.
This is useful for creating error messages if VIGRA encounters an image format it doesn't recognize.
Usage:
#include <vigra/imageinfo.hxx>
Namespace: vigra
std::string vigra::impexListExtensions | ( | ) |
List the file extension VIGRA understands.
This is useful for creating file dialogs that only list image files VIGRA can actually import.
Usage:
#include <vigra/imageinfo.hxx>
Namespace: vigra
bool vigra::isImage | ( | char const * | filename | ) |
Test whether a file is an image format known to VIGRA.
This checks the first few bytes of the file and compares them with the "magic strings" of each recognized image format.
Usage:
#include <vigra/imageinfo.hxx>
Namespace: vigra
void vigra::initImage | ( | ... | ) |
Write a value to every pixel in an image or rectangular ROI.
This function can be used to init the image.
The initial value can either be a constant of appropriate type (compatible with the destination's value_type), or a functor with compatible result_type. These two cases are automatically distinguished when FunctorTraits<FUNCTOR>::isInitializer
yields VigraTrueType
. Since the functor is passed by const
reference, its operator()
must be const, and its internal state may need to be mutable
.
Function initMultiArray() implements the same functionality for arbitrary dimensional arrays. In many situations, the assignment functions of vigra::MultiArrayView offer a simpler and more readable alternative to the init functions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/initimage.hxx>
Namespace: vigra
Initialize with a constant:
Initialize with a functor:
void vigra::initImageWithFunctor | ( | ... | ) |
Write the result of a functor call to every pixel in an image or rectangular ROI.
This function can be used to init the image by calling the given functor for each pixel. The functor is passed by reference, so that its internal state can be updated in each call.
Declarations:
pass 2D array views:
Usage:
#include <vigra/initimage.hxx>
Namespace: vigra
void vigra::initImageIf | ( | ... | ) |
Write value to pixel in the image if mask is true.
This function can be used to init a region-of-interest of the image.
The initial value can either be a constant of appropriate type (compatible with the destination's value_type), or a functor with compatible result_type. These two cases are automatically distinguished when FunctorTraits<FUNCTOR>::isInitializer
yields VigraTrueType
. Since the functor is passed by const
reference, its operator()
must be const, and its internal state may need to be mutable
.
Declarations:
pass 2D array views:
Usage:
#include <vigra/initimage.hxx>
Namespace: vigra
void vigra::initImageBorder | ( | ... | ) |
Write value to the specified border pixels in the image.
A pixel is initialized if its distance to the border is at most 'borderwidth'.
The initial value can either be a constant of appropriate type (compatible with the destination's value_type), or a functor with compatible result_type. These two cases are automatically distinguished when FunctorTraits<FUNCTOR>::isInitializer
yields VigraTrueType
. Since the functor is passed by const
reference, its operator()
must be const, and its internal state may need to be mutable
.
Declarations:
pass 2D array views:
Usage:
#include <vigra/initimage.hxx>
Namespace: vigra
void vigra::inspectImage | ( | ... | ) |
Apply read-only functor to every pixel in the image.
This function can be used to collect statistics of the image etc. The results must be stored in the functor, which serves as a return value (and is therefore passed by reference).
For many common statistics, the use of vigra::acc::extractFeatures() in combination with Feature Accumulators is more convenient.
Declarations:
pass 2D array views:
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
void vigra::inspectImageIf | ( | ... | ) |
Apply read-only functor to every pixel in the ROI.
This function can be used to collect statistics of the ROI etc. The functor is called whenever the return value of the mask's accessor is not zero. The results must be stored in the functor, which serves as a return value (and is therefore passed by reference.
Declarations:
pass 2D array views:
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
void vigra::inspectTwoImages | ( | ... | ) |
Apply read-only functor to every pixel of both images.
This function can be used to collect statistics for each region of a labeled image, especially in conjunction with the ArrayOfRegionStatistics functor. The results must be stored in the functor which serves as a return value.
Note: For many common statistics, the use of vigra::acc::extractFeatures() in combination with Feature Accumulators is more convenient.
Declarations:
pass 2D array views:
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
void vigra::inspectTwoImagesIf | ( | ... | ) |
Apply read-only functor to those pixels of both images where the mask image is non-zero.
This function can be used to collect statistics for selected regions of a labeled image, especially in conjunction with the ArrayOfRegionStatistics functor. The results must be stored in the functor which serves as a return value.
Declarations:
pass 2D array views:
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
unsigned int vigra::labelImage | ( | ... | ) |
Find the connected components of a segmented image.
Deprecated. Use labelMultiArray() instead.
Connected components are defined as regions with uniform pixel values. Thus, T1
either must be equality comparable, or a suitable EqualityFunctor must be provided that realizes the desired predicate. The destination's value type T2
should be large enough to hold the labels without overflow. Region numbers will be a consecutive sequence starting with one and ending with the region number returned by the function (inclusive). The parameter 'eight_neighbors
' determines whether the regions should be 4-connected (false) or 8-connected (true).
Return: the number of regions found (= largest region label)
See labelMultiArray() for a dimension-independent implementation of connected components labelling.
Declarations:
pass 2D array views:
Usage:
#include <vigra/labelimage.hxx>
Namespace: vigra
unsigned int vigra::labelImageWithBackground | ( | ... | ) |
Find the connected components of a segmented image, excluding the background from labeling.
Deprecated. Use labelMultiArray() instead.
This function works like labelImage(), but considers all background pixels (i.e. pixels having the given 'background_value
') as a single region that is ignored when determining connected components and remains untouched in the destination image. Usually, you will zero-initialize the output image, so that the background gets label 0 (remember that actual region labels start at one).
Return: the number of non-background regions found (= largest region label)
See labelMultiArrayWithBackground() for a dimension-independent implementation if this algorithm.
Declarations:
pass 2D array views:
Usage:
#include <vigra/labelimage.hxx>
Namespace: vigra
void vigra::regionImageToCrackEdgeImage | ( | ... | ) |
Transform a labeled image into a crack edge (interpixel edge) image.
Declarations:
pass 2D array views:
The destination image must be twice the size of the input image (precisely, (2*w-1)
by (2*h-1)
pixels) to have space for the so called "crack edges" or "interpixel edges" which are logically situated between pixels (at half-integer coordinates of the input image) and correspond to the odd-valued coordinates in the result image (see Crack Edge Image for more details).
When labelPolicy == CopyRegionLabels
(the default), this algorithm transfers the labels of a labeled image to the output image (repeating them as appropriate to account for the output image size) and inserts border pixels when the label changes. For example, if a
and c
are the original labels, and 0
is the value of edge_marker
, the transformation looks like this:
When labelPolicy == EdgeOverlayOnly
, the region pixels of the output image remain untouched, and only the edge marker is inserted. This is especially useful for visualization, when the output is the interpolated original image:
The algorithm assumes that the original labeled image contains no background. Therefore, it is suitable as a post-processing operation of labelImage() or seededRegionGrowing().
The source value type (SrcAccessor::value-type
) must be equality-comparable.
Usage:
#include <vigra/labelimage.hxx>
Namespace: vigra
Preconditions:
The destination image must have twice the size of the source:
void vigra::regionImageToEdgeImage | ( | ... | ) |
Transform a labeled image into an edge image.
Declarations:
pass 2D array views:
This algorithm marks all pixels with the given edge_marker
which belong to a different region (label) than their right or lower neighbors:
The non-edge pixels of the destination image will not be touched. The source value type T1
must be equality-comparable.
Usage:
#include <vigra/labelimage.hxx>
Namespace: vigra
unsigned int vigra::labelVolume | ( | ... | ) |
Find the connected components of a segmented volume.
Deprecated. Use labelMultiArray() instead.
Connected components are defined as regions with uniform voxel values. Thus, T1
either must be equality comparable, or an EqualityFunctor must be provided explicitly that realizes the desired equivalence predicate. The destination's value type T2
should be large enough to hold the labels without overflow. Region numbers will be a consecutive sequence starting with one and ending with the region number returned by the function (inclusive).
Return: the number of regions found (= largest region label)
See labelMultiArray() for a dimension-independent implementation of connected components labelling.
Declarations:
pass 3D array views:
Usage:
#include <vigra/labelvolume.hxx>
Namespace: vigra
unsigned int vigra::labelVolumeSix | ( | triple< SrcIterator, SrcShape, SrcAccessor > | src, |
pair< DestIterator, DestAccessor > | dest | ||
) |
Find the connected components of a segmented volume using the 6-neighborhood.
See labelVolume() for detailed documentation.
unsigned int vigra::labelVolumeWithBackground | ( | ... | ) |
Find the connected components of a segmented volume, excluding the background from labeling.
Deprecated. Use labelMultiArray() instead.
This function works like labelVolume(), but considers all background voxels (i.e. voxels having the given 'background_value
') as a single region that is ignored when determining connected components and remains untouched in the destination array. Usually, you will zero-initialize the output array, so that the background gets label 0 (remember that actual region labels start at one).
Return: the number of regions found (= largest region label)
See labelMultiArrayWithBackground() for a dimension-independent implementation if this algorithm.
Declarations:
pass 3D array views:
Usage:
#include <vigra/labelvolume.hxx>
Namespace: vigra
void vigra::localMinima | ( | ... | ) |
Find local minima in an image or multi-dimensional array.
By default, minima are defined as points which are not at the array border and whose value is lower than the value of all indirect neighbors (i.e. 8-neighbors in 2D, 26-neighbors in 3D, 3N-1 neighbors in N-D). The detected points will be marked with the default value 1 in the destination array.
The defaults can be overridden in various ways by providing LocalMinmaxOptions : you can switch to the direct neighborhood (i.e. 4-neighborhood in 2D, 6-neighborhood in 3D, 2*N neighborhood in N-D), allow minima at the border, discard minima where the function value is not below a given threshold, allow extended minima (i.e. minima that form minimal plateaus rather than isolated pixels – note that this option is only supported for 2D images), and change the marker in the destination image. See usage examples below for details.
There are also variants of the localMinima() function where parameters are passed explicitly rather than via an option object. These versions of the function are deprecated, but will be kept for compatibility.
Declarations:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/localminmax.hxx>
#include <vigra/multi_localminmax.hxx>
Namespace: vigra
void vigra::localMinima3D | ( | ... | ) |
Find local minima in a 3D multi array.
Deprecated, use localMinima() instead.
void vigra::localMaxima | ( | ... | ) |
Find local maxima in an image or multi-dimensional array.
By default, maxima are defined as points which are not at the array border and whose value is higher than the value of all indirect neighbors (i.e. 8-neighbors in 2D, 26-neighbors in 3D, 3N-1 neighbors in N-D). The detected points will be marked with the default value 1 in the destination array.
The defaults can be overridden in various ways by providing LocalMinmaxOptions : you can switch to the direct neighborhood (i.e. 4-neighborhood in 2D, 6-neighborhood in 3D, 2*N neighborhood in N-D), allow maxima at the border, discard maxima where the function value is not above a given threshold, allow extended maxima (i.e. maxima that form maximal plateaus rather than isolated pixels – note that this option is only supported for 2D images), and change the marker in the destination image. See usage examples below for details.
There are also variants of the localMaxima() function where parameters are passed explicitly rather than via an option object. These versions of the function are deprecated, but will be kept for compatibility.
Declarations:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/localminmax.hxx>
#include <vigra/multi_localminmax.hxx>
Namespace: vigra
void vigra::localMaxima3D | ( | ... | ) |
Find local maxima in a 3D multi array.
Deprecated, use localMaxima() instead.
void vigra::extendedLocalMinima | ( | ... | ) |
Find local minimal regions (plateaus) in an array.
This function is only needed when you want to pass a non-standard equality predicate via EqualityFunctor
. Otherwise (i.e. when equality is defined by the '==' operator of the source value type T1
), you can simply call localMinima() with the option LocalMinmaxOptions::allowPlateaus()
.
This function finds regions of uniform pixel values whose neighboring regions all have larger values, i.e. it finds minimal plateaus of arbitrary size (including size 1). The EqualityFunctor
determines when pixels are considered equal, so that one can allow for plateaus that are not quite constant (this is often necessary with float pixel values). Otherwise, the functionality is identical to localMinima().
Declarations:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/localminmax.hxx>
Namespace: vigra
void vigra::extendedLocalMinima3D | ( | ... | ) |
Find local minimal regions in a volume.
void vigra::extendedLocalMaxima | ( | ... | ) |
Find local maximal regions in an array.
This function is only needed when you want to pass a non-standard equality predicate via EqualityFunctor
. Otherwise (i.e. when equality is defined by the '==' operator of the source value type T1
), you can simply call localMaxima() with the option LocalMinmaxOptions::allowPlateaus()
.
This function finds regions of uniform pixel values whose neighboring regions all have smaller values, i.e. it finds maximal plateaus of arbitrary size (including size 1). The EqualityFunctor
determines when pixels are considered equal, so that one can allow for plateaus that are not quite constant (this is often necessary with float pixel values). Otherwise, the functionality is identical to localMaxima().
Declarations:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/localminmax.hxx>
Namespace: vigra
void vigra::extendedLocalMaxima3D | ( | ... | ) |
Find local maximal regions in 3D multi array.
REAL vigra::round | ( | REAL | v | ) |
The rounding function.
Defined for all floating point types. Rounds towards the nearest integer such that abs(round(t)) == round(abs(t))
for all t
.
#include <vigra/mathutil.hxx>
Namespace: vigra
long long vigra::roundi | ( | double | t | ) |
Round and cast to integer.
Rounds to the nearest integer like round(), but casts the result to long long
(this will be faster and is usually needed anyway).
#include <vigra/mathutil.hxx>
Namespace: vigra
Round up to the nearest power of 2.
Efficient algorithm for finding the smallest power of 2 which is not smaller than x (function clp2() from Henry Warren: "Hacker's Delight", Addison-Wesley, 2003, see http://www.hackersdelight.org/). If x > 2^31, the function will return 0 because integer arithmetic is defined modulo 2^32.
#include <vigra/mathutil.hxx>
Namespace: vigra
Round down to the nearest power of 2.
Efficient algorithm for finding the largest power of 2 which is not greater than x (function flp2() from Henry Warren: "Hacker's Delight", Addison-Wesley, 2003, see http://www.hackersdelight.org/).
#include <vigra/mathutil.hxx>
Namespace: vigra
Compute the base-2 logarithm of an integer.
Returns the position of the left-most 1-bit in the given number x, or -1 if x == 0. That is,
The function uses Robert Harley's algorithm to determine the number of leading zeros in x (algorithm nlz10() at http://www.hackersdelight.org/). But note that the functions floorPower2() or ceilPower2() are more efficient and should be preferred when possible.
#include <vigra/mathutil.hxx>
Namespace: vigra
NumericTraits<T>::Promote vigra::sq | ( | T | t | ) |
The square function.
sq(x) = x*x
is needed so often that it makes sense to define it as a function.
#include <vigra/mathutil.hxx>
Namespace: vigra
V vigra::power | ( | const V & | x | ) |
Exponentiation to a positive integer power by squaring.
#include <vigra/mathutil.hxx>
Namespace: vigra
Signed integer square root.
Unsigned integer square root.
Useful for fast fixed-point computations.
#include <vigra/mathutil.hxx>
Namespace: vigra
T vigra::sign | ( | T | t | ) |
The sign function.
Returns 1, 0, or -1 depending on the sign of t, but with the same type as t.
#include <vigra/mathutil.hxx>
Namespace: vigra
int vigra::signi | ( | T | t | ) |
The integer sign function.
Returns 1, 0, or -1 depending on the sign of t, converted to int.
#include <vigra/mathutil.hxx>
Namespace: vigra
T1 vigra::sign | ( | T1 | t1, |
T2 | t2 | ||
) |
The binary sign function.
Transfers the sign of t2 to t1.
#include <vigra/mathutil.hxx>
Namespace: vigra
bool vigra::even | ( | int | t | ) |
Check if an integer is even.
Defined for all integral types.
bool vigra::odd | ( | int | t | ) |
Check if an integer is odd.
Defined for all integral types.
NormTraits<T>::SquaredNormType vigra::squaredNorm | ( | T const & | t | ) |
The squared norm of a numerical object.
vigra::sq(t)
. vigra::dot(t, t)
. vigra::sq(t.real()) + vigra::sq(t.imag())
. NormTraits<T>::NormType vigra::norm | ( | T const & | t | ) |
The norm of a numerical object.
For scalar types: implemented as abs(t)
otherwise: implemented as sqrt(squaredNorm(t))
.
#include <vigra/mathutil.hxx>
Namespace: vigra
void vigra::symmetric2x2Eigenvalues | ( | T | a00, |
T | a01, | ||
T | a11, | ||
T * | r0, | ||
T * | r1 | ||
) |
Compute the eigenvalues of a 2x2 real symmetric matrix.
This uses the analytical eigenvalue formula
#include <vigra/mathutil.hxx>
Namespace: vigra
void vigra::symmetric3x3Eigenvalues | ( | T | a00, |
T | a01, | ||
T | a02, | ||
T | a11, | ||
T | a12, | ||
T | a22, | ||
T * | r0, | ||
T * | r1, | ||
T * | r2 | ||
) |
Compute the eigenvalues of a 3x3 real symmetric matrix.
This uses a numerically stable version of the analytical eigenvalue formula according to
David Eberly: "Eigensystems for 3 x 3 Symmetric Matrices (Revisited)", Geometric Tools Documentation, 2006
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::ellipticIntegralF | ( | double | x, |
double | k | ||
) |
The incomplete elliptic integral of the first kind.
This function computes
according to the algorithm given in Press et al. "Numerical Recipes".
Note: In some libraries (e.g. Mathematica), the second parameter of the elliptic integral functions must be k^2 rather than k. Check the documentation when results disagree!
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::ellipticIntegralE | ( | double | x, |
double | k | ||
) |
The incomplete elliptic integral of the second kind.
This function computes
according to the algorithm given in Press et al. "Numerical Recipes". The complete elliptic integral of the second kind is simply ellipticIntegralE(M_PI/2, k)
.
Note: In some libraries (e.g. Mathematica), the second parameter of the elliptic integral functions must be k^2 rather than k. Check the documentation when results disagree!
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::chi2 | ( | unsigned int | degreesOfFreedom, |
double | arg, | ||
double | accuracy = 1e-7 |
||
) |
Chi square distribution.
Computes the density of a chi square distribution with degreesOfFreedom and tolerance accuracy at the given argument arg by calling noncentralChi2(degreesOfFreedom, 0.0, arg, accuracy)
.
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::chi2CDF | ( | unsigned int | degreesOfFreedom, |
double | arg, | ||
double | accuracy = 1e-7 |
||
) |
Cumulative chi square distribution.
Computes the cumulative density of a chi square distribution with degreesOfFreedom and tolerance accuracy at the given argument arg, i.e. the probability that a random number drawn from the distribution is below arg by calling noncentralChi2CDF(degreesOfFreedom, 0.0, arg, accuracy)
.
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::noncentralChi2 | ( | unsigned int | degreesOfFreedom, |
double | noncentrality, | ||
double | arg, | ||
double | accuracy = 1e-7 |
||
) |
Non-central chi square distribution.
Computes the density of a non-central chi square distribution with degreesOfFreedom, noncentrality parameter noncentrality and tolerance accuracy at the given argument arg. It uses Algorithm AS 231 from Appl. Statist. (1987) Vol.36, No.3 (code ported from http://lib.stat.cmu.edu/apstat/231). The algorithm has linear complexity in the number of degrees of freedom.
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::noncentralChi2CDF | ( | unsigned int | degreesOfFreedom, |
double | noncentrality, | ||
double | arg, | ||
double | accuracy = 1e-7 |
||
) |
Cumulative non-central chi square distribution.
Computes the cumulative density of a chi square distribution with degreesOfFreedom, noncentrality parameter noncentrality and tolerance accuracy at the given argument arg, i.e. the probability that a random number drawn from the distribution is below arg It uses Algorithm AS 231 from Appl. Statist. (1987) Vol.36, No.3 (code ported from http://lib.stat.cmu.edu/apstat/231). The algorithm has linear complexity in the number of degrees of freedom (see noncentralChi2CDFApprox() for a constant-time algorithm).
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::noncentralChi2CDFApprox | ( | unsigned int | degreesOfFreedom, |
double | noncentrality, | ||
double | arg | ||
) |
Cumulative non-central chi square distribution (approximate).
Computes approximate values of the cumulative density of a chi square distribution with degreesOfFreedom, and noncentrality parameter noncentrality at the given argument arg, i.e. the probability that a random number drawn from the distribution is below arg It uses the approximate transform into a normal distribution due to Wilson and Hilferty (see Abramovitz, Stegun: "Handbook of Mathematical Functions", formula 26.3.32). The algorithm's running time is independent of the inputs, i.e. is should be used when noncentralChi2CDF() is too slow, and approximate values are sufficient. The accuracy is only about 0.1 for few degrees of freedom, but reaches about 0.001 above dof = 5.
#include <vigra/mathutil.hxx>
Namespace: vigra
REAL vigra::legendre | ( | unsigned int | l, |
int | m, | ||
REAL | x | ||
) |
Associated Legendre polynomial.
Computes the value of the associated Legendre polynomial of order l, m
for argument x
. x
must be in the range [-1.0, 1.0]
, otherwise an exception is thrown. The standard Legendre polynomials are the special case m == 0
.
#include <vigra/mathutil.hxx>
Namespace: vigra
REAL vigra::legendre | ( | unsigned int | l, |
REAL | x | ||
) |
Legendre polynomial.
Computes the value of the Legendre polynomial of order l
for argument x
. x
must be in the range [-1.0, 1.0]
, otherwise an exception is thrown.
#include <vigra/mathutil.hxx>
Namespace: vigra
REAL vigra::sin_pi | ( | REAL | x | ) |
sin(pi*x).
Essentially calls std::sin(M_PI*x)
but uses a more accurate implementation to make sure that sin_pi(1.0) == 0.0
(which does not hold for std::sin(M_PI)
due to round-off error), and sin_pi(0.5) == 1.0
.
#include <vigra/mathutil.hxx>
Namespace: vigra
REAL vigra::cos_pi | ( | REAL | x | ) |
cos(pi*x).
Essentially calls std::cos(M_PI*x)
but uses a more accurate implementation to make sure that cos_pi(1.0) == -1.0
and cos_pi(0.5) == 0.0
.
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::gamma | ( | double | x | ) |
The gamma function.
This function implements the algorithm from
Zhang and Jin: "Computation of Special Functions", John Wiley and Sons, 1996.
The argument must be <= 171.0 and cannot be zero or a negative integer. An exception is thrown when these conditions are violated.
#include <vigra/mathutil.hxx>
Namespace: vigra
double vigra::loggamma | ( | double | x | ) |
The natural logarithm of the gamma function.
This function is based on a free implementation by Sun Microsystems, Inc., see sourceware.org archive. It can be removed once all compilers support the new C99 math functions.
The argument must be positive and < 1e30. An exception is thrown when these conditions are violated.
#include <vigra/mathutil.hxx>
Namespace: vigra
bool vigra::closeAtTolerance | ( | T1 | l, |
T2 | r, | ||
typename PromoteTraits< T1, T2 >::Promote | epsilon | ||
) |
Tolerance based floating-point equality.
Check whether two floating point numbers are equal within the given tolerance. This is useful because floating point numbers that should be equal in theory are rarely exactly equal in practice. If the tolerance epsilon is not given, twice the machine epsilon is used.
#include <vigra/mathutil.hxx>
Namespace: vigra
bool vigra::lessEqualAtTolerance | ( | T1 | l, |
T2 | r, | ||
typename PromoteTraits< T1, T2 >::Promote | epsilon | ||
) |
Tolerance based floating-point less-or-equal.
Check whether two floating point numbers are less or equal within the given tolerance. That is, l can actually be greater than r within the given epsilon. This is useful because floating point numbers that should be equal in theory are rarely exactly equal in practice. If the tolerance epsilon is not given, twice the machine epsilon is used.
#include <vigra/mathutil.hxx>
Namespace: vigra
bool vigra::greaterEqualAtTolerance | ( | T1 | l, |
T2 | r, | ||
typename PromoteTraits< T1, T2 >::Promote | epsilon | ||
) |
Tolerance based floating-point greater-or-equal.
Check whether two floating point numbers are greater or equal within the given tolerance. That is, l can actually be less than r within the given epsilon. This is useful because floating point numbers that should be equal in theory are rarely exactly equal in practice. If the tolerance epsilon is not given, twice the machine epsilon is used.
#include <vigra/mathutil.hxx>
Namespace: vigra
void vigra::medianFilter | ( | ... | ) |
This function calculates the median of a window of given size for the complete image.
This function calculates the median of a window of given size for the complete image. It also allows a correct border handling, since it uses the applyWindowFunction environment for computation! All border treatment modes (except BORDER_TREATMENT_CLIP) are supported.
The input pixel type T1
must be a linear space over the window functions' value_type T
. Especially, the values must be sortable by std::sort, to derive the mean values aka the median.
Declarations:
pass 2D array views:
Usage:
#include <vigra/medianfilter.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the window size of the filter.
triple<Diff2D, Diff2D, MeshGridAccessor> vigra::meshGrid | ( | Diff2D | upperLeft, |
Diff2D | lowerRight | ||
) |
Create a mesh grid for the specified rectangle.
The mesh grid concept is adapted from MATLAB. It is a two banded image (i.e. with 2D vector pixel type) whose first band contains the x-coordinates of the current pixel, and whose second band contains the y-coordinates. If upperLeft is not the point (0,0), the mesh grid is translated relative to the pixel indices.
Declarations:
Usage:
BasicImageView<T> vigra::makeBasicImageView | ( | MultiArrayView< 2, T, Stride > const & | array | ) |
Create a vigra::BasicImageView from an unstrided 2-dimensional vigra::MultiArrayView.
The vigra::BasicImageView will have the same value_type
as the original vigra::MultiArrayView.
BasicImageView<T> vigra::makeBasicImageView | ( | MultiArray< 3, T > const & | array | ) |
Create a vigra::BasicImageView from a 3-dimensional vigra::MultiArray.
This wrapper flattens the two innermost dimensions of the array into single rows of the resulting image. The vigra::BasicImageView will have the same value_type
as the original vigra::MultiArray.
BasicImageView<RGBValue<T> > vigra::makeRGBImageView | ( | MultiArrayView< 3, T, Stride > const & | array | ) |
Create a vigra::BasicImageView from a 3-dimensional vigra::MultiArray.
This wrapper only works if T
is a scalar type and the array's innermost dimension has size 3. It then re-interprets the data array as a 2-dimensional array with value_type RGBValue<T>
.
ChunkedArray<N, T>::iterator vigra::createCoupledIterator | ( | ChunkedArray< N, T > & | m | ) |
Returns a CoupledScanOrderIterator to simultaneously iterate over image m1 and its coordinates.
void vigra::separableConvolveMultiArray | ( | ... | ) |
Separated convolution on multi-dimensional arrays.
This function computes a separated convolution on all dimensions of the given multi-dimensional array. Both source and destination arrays are represented by iterators, shape objects and accessors. The destination array is required to already have the correct size.
There are two variants of this functions: one takes a single kernel of type vigra::Kernel1D which is then applied to all dimensions, whereas the other requires an iterator referencing a sequence of vigra::Kernel1D objects, one for every dimension of the data. Then the first kernel in this sequence is applied to the innermost dimension (e.g. the x-axis of an image), while the last is applied to the outermost dimension (e.g. the z-axis in a 3D image).
This function may work in-place, which means that source.data() == dest.data()
is allowed. A full-sized internal array is only allocated if working on the destination array directly would cause round-off errors (i.e. if typeid(typename NumericTraits<T2>::RealPromote) != typeid(T2)
).
If start
and stop
have non-default values, they must represent a valid subarray of the input array. The convolution is then restricted to that subarray, and it is assumed that the output array only refers to the subarray (i.e. dest.shape() == stop - start
). Negative ROI boundaries are interpreted relative to the end of the respective dimension (i.e. if(stop[k] < 0) stop[k] += source.shape(k);
).
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx>
Namespace: vigra
void vigra::convolveMultiArrayOneDimension | ( | ... | ) |
Convolution along a single dimension of a multi-dimensional arrays.
This function computes a convolution along one dimension (specified by the parameter dim
of the given multi-dimensional array with the given kernel
. The destination array must already have the correct size.
If start
and stop
have non-default values, they must represent a valid subarray of the input array. The convolution is then restricted to that subarray, and it is assumed that the output array only refers to the subarray (i.e. dest.shape() == stop - start
). Negative ROI boundaries are interpreted relative to the end of the respective dimension (i.e. if(stop[k] < 0) stop[k] += source.shape(k);
).
This function may work in-place, which means that source.data() == dest.data()
is allowed.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx>
Namespace: vigra
void vigra::gaussianSmoothMultiArray | ( | ... | ) |
Isotropic Gaussian smoothing of a multi-dimensional arrays.
This function computes an isotropic convolution of the given N-dimensional array with a Gaussian filter at the given standard deviation sigma
. Both source and destination arrays are represented by iterators, shape objects and accessors. The destination array is required to already have the correct size. This function may work in-place, which means that source.data() == dest.data()
is allowed. It is implemented by a call to separableConvolveMultiArray() with the appropriate kernel.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Multi-threaded execution:
Usage with anisotropic data:
void vigra::gaussianGradientMultiArray | ( | ... | ) |
Calculate Gaussian gradient of a multi-dimensional arrays.
This function computes the Gaussian gradient of the given N-dimensional array with a sequence of first-derivative-of-Gaussian filters at the given standard deviation sigma
(differentiation is applied to each dimension in turn, starting with the innermost dimension). The destination array is required to have a vector valued pixel type with as many elements as the number of dimensions. This function is implemented by calls to separableConvolveMultiArray() with the appropriate kernels.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Usage with anisotropic data:
void vigra::symmetricGradientMultiArray | ( | ... | ) |
Calculate gradient of a multi-dimensional arrays using symmetric difference filters.
This function computes the gradient of the given N-dimensional array with a sequence of symmetric difference filters a (differentiation is applied to each dimension in turn, starting with the innermost dimension). The destination array is required to have a vector valued pixel type with as many elements as the number of dimensions. This function is implemented by calls to convolveMultiArrayOneDimension() with the symmetric difference kernel.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Usage with anisotropic data:
void vigra::laplacianOfGaussianMultiArray | ( | ... | ) |
Calculate Laplacian of a N-dimensional arrays using Gaussian derivative filters.
This function computes the Laplacian of the given N-dimensional array with a sequence of second-derivative-of-Gaussian filters at the given standard deviation sigma
. Both source and destination arrays must have scalar value_type. This function is implemented by calls to separableConvolveMultiArray() with the appropriate kernels, followed by summation.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Usage with anisotropic data:
void vigra::gaussianDivergenceMultiArray | ( | ... | ) |
Calculate the divergence of a vector field using Gaussian derivative filters.
This function computes the divergence of the given N-dimensional vector field with a sequence of first-derivative-of-Gaussian filters at the given standard deviation sigma
. The input vector field can either be given as a sequence of scalar array views (one for each vector field component), represented by an iterator range, or by a single vector array with the appropriate shape. This function is implemented by calls to separableConvolveMultiArray() with the suitable kernels, followed by summation.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Usage with anisotropic data:
void vigra::hessianOfGaussianMultiArray | ( | ... | ) |
Calculate Hessian matrix of a N-dimensional arrays using Gaussian derivative filters.
This function computes the Hessian matrix the given scalar N-dimensional array with a sequence of second-derivative-of-Gaussian filters at the given standard deviation sigma
. The destination array must have a vector valued element type with N*(N+1)/2 elements (it represents the upper triangular part of the symmetric Hessian matrix, flattened row-wise). This function is implemented by calls to separableConvolveMultiArray() with the appropriate kernels.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameter sigma
is omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Usage with anisotropic data:
void vigra::structureTensorMultiArray | ( | ... | ) |
Calculate the structure tensor of a multi-dimensional arrays.
This function computes the gradient (outer product) tensor for each element of the given N-dimensional array with first-derivative-of-Gaussian filters at the given innerScale
, followed by Gaussian smoothing at outerScale
. The destination array must have a vector valued pixel type with N*(N+1)/2 elements (it represents the upper triangular part of the symmetric structure tensor matrix, flattened row-wise). If the source array is also vector valued, the resulting structure tensor is the sum of the individual tensors for each channel. This function is implemented by calls to separableConvolveMultiArray() with the appropriate kernels.
Anisotropic data should be provided with appropriate vigra::ConvolutionOptions to adjust the filter sizes for the resolution of each axis. Otherwise, the parameter opt
is optional unless the parameters innerScale
and outerScale
are both omitted.
If you pass vigra::BlockwiseConvolutionOptions instead, the algorithm will be executed in parallel on data blocks of a certain size. The block size can be customized via BlockwiseConvolutionOptions::blockShape()
, but the defaults usually work reasonably. By default, the number of threads equals the capabilities of your hardware, but you can change this via BlockwiseConvolutionOptions::numThreads()
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_convolution.hxx> (sequential version)
#include <vigra/multi_blockwise.hxx> (parallel version)
Namespace: vigra
Usage with anisotropic data:
void vigra::separableMultiDistSquared | ( | ... | ) |
Euclidean distance squared on multi-dimensional arrays.
The algorithm is taken from Donald Bailey: "An Efficient Euclidean Distance Transform", Proc. IWCIA'04, Springer LNCS 3322, 2004.
Declarations:
pass arbitrary-dimensional array views:
This function performs a squared Euclidean squared distance transform on the given multi-dimensional array. Both source and destination arrays are represented by iterators, shape objects and accessors. The destination array is required to already have the correct size.
This function expects a mask as its source, where background pixels are marked as zero, and non-background pixels as non-zero. If the parameter background is true, then the squared distance of all background pixels to the nearest object is calculated. Otherwise, the distance of all object pixels to the nearest background pixel is calculated.
Optionally, one can pass an array that specifies the pixel pitch in each direction. This is necessary when the data have non-uniform resolution (as is common in confocal microscopy, for example).
This function may work in-place, which means that siter == diter
is allowed. A full-sized internal array is only allocated if working on the destination array directly would cause overflow errors (i.e. if NumericTraits<typename DestAccessor::value_type>::max() < N * M*M
, where M is the size of the largest dimension of the array.
Usage:
#include <vigra/multi_distance.hxx>
Namespace: vigra
void vigra::separableMultiDistance | ( | ... | ) |
Euclidean distance on multi-dimensional arrays.
Declarations:
pass arbitrary-dimensional array views:
This function performs a Euclidean distance transform on the given multi-dimensional array. It simply calls separableMultiDistSquared() and takes the pixel-wise square root of the result. See separableMultiDistSquared() for more documentation.
Usage:
#include <vigra/multi_distance.hxx>
Namespace: vigra
void vigra::boundaryMultiDistance | ( | ... | ) |
Euclidean distance to the implicit boundaries of a multi-dimensional label array.
Declarations:
pass arbitrary-dimensional array views:
This function computes the distance transform of a labeled image simultaneously for all regions. Depending on the requested type of boundary, three modes are supported:
OuterBoundary
: In each region, compute the distance to the nearest pixel not belonging to that regions. This is the same as if a normal distance transform where applied to a binary image containing just this region. InterpixelBoundary
(default): Like OuterBoundary
, but shift the distance to the interpixel boundary by subtractiong 1/2. This make the distences consistent accross boundaries. InnerBoundary
: In each region, compute the distance to the nearest pixel in the region which is adjacent to the boundary. If array_border_is_active=true
, the outer border of the array (i.e. the interpixel boundary between the array and the infinite region) is also used. Otherwise (the default), regions touching the array border are treated as if they extended to infinity.
Usage:
#include <vigra/multi_distance.hxx>
Namespace: vigra
TinyVector<T, N> vigra::fftwCorrespondingShapeR2C | ( | TinyVector< T, N > | shape | ) |
Find frequency domain shape for a R2C Fourier transform.
When a real valued array is transformed to the frequency domain, about half of the Fourier coefficients are redundant. The transform can be optimized as a R2C transform that doesn't compute and store the redundant coefficients. This function computes the appropriate frequency domain shape for a given shape in the spatial domain. It simply replaces shape[0]
with shape[0] / 2 + 1
.
#include <vigra/multi_fft.hxx>
Namespace: vigra
void vigra::convolveFFT | ( | ... | ) |
Convolve an array with a kernel by means of the Fourier transform.
Thanks to the convolution theorem of Fourier theory, a convolution in the spatial domain is equivalent to a multiplication in the frequency domain. Thus, for certain kernels (especially large, non-separable ones), it is advantageous to perform the convolution by first transforming both array and kernel to the frequency domain, multiplying the frequency representations, and transforming the result back into the spatial domain. Some kernels have a much simpler definition in the frequency domain, so that they are readily computed there directly, avoiding Fourier transformation of those kernels.
The following functions implement various variants of FFT-based convolution:
convolveFFT
, but you may provide many kernels at once (using an iterator pair specifying the kernel sequence). This has the advantage that the forward transform of the input array needs to be executed only once. convolveFFTComplex
, but you may provide many kernels at once (using an iterator pair specifying the kernel sequence). This has the advantage that the forward transform of the input array needs to be executed only once. The output arrays must have the same shape as the input arrays. In the "Many" variants of the convolution functions, the kernels must all have the same shape.
The origin of the kernel is always assumed to be in the center of the kernel array (precisely, at the point floor(kernel.shape() / 2.0)
, except when the half-space format is used, see below). The function moveDCToUpperLeft() will be called internally to align the kernel with the transformed input as appropriate.
If a real input is combined with a real kernel, the kernel is automatically assumed to be defined in the spatial domain. If a real input is combined with a complex kernel, the kernel is assumed to be defined in the Fourier domain in half-space format. If the input array is complex, a flag fourierDomainKernel
determines where the kernel is defined.
When the kernel is defined in the spatial domain, the convolution functions will automatically pad (enlarge) the input array by at least the kernel radius in each direction. The newly added space is filled according to reflective boundary conditions in order to minimize border artifacts during convolution. It is thus ensured that convolution in the Fourier domain yields the same results as convolution in the spatial domain (e.g. when separableConvolveMultiArray() is called with the same kernel). A little further padding may be added to make sure that the padded array shape uses integers which have only small prime factors, because FFTW is then able to use the fastest possible algorithms. Any padding is automatically removed from the result arrays before the function returns.
When the kernel is defined in the frequency domain, it must be complex-valued, and its shape determines the shape of the Fourier representation (i.e. the input is padded according to the shape of the kernel). If we are going to perform a complex-valued convolution, the kernel must be defined for the entire frequency domain, and its shape directly determines the size of the FFT.
In contrast, a frequency domain kernel for a real-valued convolution must have symmetry properties that allow to drop half of the kernel coefficients, as in the R2C transform. That is, the kernel must have the half-space format, that is the shape returned by fftwCorrespondingShapeR2C(fourier_shape)
, where fourier_shape
is the desired logical shape of the frequency representation (and thus the size of the padded input). The origin of the kernel must be at the point (0, floor(fourier_shape[0] / 2.0), ..., floor(fourier_shape[N-1] / 2.0))
(i.e. as in a regular kernel except for the first dimension).
The Real
type in the declarations can be double
, float
, and long double
. Your program must always link against libfftw3
. If you use float
or long double
arrays, you must additionally link against libfftw3f
and libfftw3l
respectively.
The Fourier transform functions internally create FFTW plans which control the algorithm details. The plans are created with the flag FFTW_ESTIMATE
, i.e. optimal settings are guessed or read from saved "wisdom" files. If you need more control over planning, you can use the class FFTWConvolvePlan.
See also applyFourierFilter() for corresponding functionality on the basis of the old image iterator interface.
Declarations:
Real-valued convolution with kernel in the spatial domain:
Real-valued convolution with kernel in the Fourier domain (half-space format):
Series of real-valued convolutions with kernels in the spatial or Fourier domain (the kernel and out sequences must have the same length):
Complex-valued convolution (parameter fourierDomainKernel
determines if the kernel is defined in the spatial or Fourier domain):
Series of complex-valued convolutions (parameter fourierDomainKernel
determines if the kernels are defined in the spatial or Fourier domain, the kernel and out sequences must have the same length):
Usage:
#include <vigra/multi_fft.hxx>
Namespace: vigra
void vigra::convolveFFTComplex | ( | ... | ) |
Convolve a complex-valued array by means of the Fourier transform.
See convolveFFT() for details.
void vigra::convolveFFTMany | ( | ... | ) |
Convolve a real-valued array with a sequence of kernels by means of the Fourier transform.
See convolveFFT() for details.
void vigra::convolveFFTComplexMany | ( | ... | ) |
Convolve a complex-valued array with a sequence of kernels by means of the Fourier transform.
See convolveFFT() for details.
void vigra::correlateFFT | ( | ... | ) |
Correlate an array with a kernel by means of the Fourier transform.
This function correlates a real-valued input array with a real-valued kernel such that the result is also real-valued. Thanks to the correlation theorem of Fourier theory, a correlation in the spatial domain is equivalent to a multiplication with the complex conjugate in the frequency domain. Thus, for certain kernels (especially large, non-separable ones), it is advantageous to perform the correlation by first transforming both array and kernel to the frequency domain, multiplying the frequency representations, and transforming the result back into the spatial domain.
The output arrays must have the same shape as the input arrays.
See also convolveFFT() for corresponding functionality.
Declarations:
Usage:
#include <vigra/multi_fft.hxx>
Namespace: vigra
CoupledHandleCast< TARGET_INDEX, Handle >::reference get | ( | Handle & | handle | ) |
Returns reference to the element in the band of the handle with index TARGET_INDEX.
CoupledHandleCast< TARGET_INDEX, Handle >::const_reference get | ( | Handle const & | handle | ) |
Returns a constant reference to the element in the band of the handle with index TARGET_INDEX.
HierarchicalIteratorType<N>::type vigra::createHierarchicalIterator | ( | TinyVector< MultiArrayIndex, N > const & | shape | ) |
Alias for vigra::CoupledIteratorType (maybe easier to remember). / template <unsigned int N, class T1=void, class T2=void, class T3=void, class T4=void, class T5=void> struct CoupledArrays : public CoupledIteratorType<N, T1, T2, T3, T4, T5> {};
/** Returns a HierarchicalIterator from shape to iterate over coordinates.
HierarchicalIteratorType<N1, T1>::type vigra::createHierarchicalIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1 | ) |
Returns a HierarchicalIterator to simultaneously iterate over image m1 and its coordinates.
HierarchicalIteratorType<N1, T1, T2>::type vigra::createHierarchicalIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2 | ||
) |
Returns a HierarchicalIterator to simultaneously iterate over images m1, m2 and their coordinates.
HierarchicalIteratorType<N1, T1, T2, T3>::type vigra::createHierarchicalIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2, | ||
MultiArrayView< N3, T3, S3 > const & | m3 | ||
) |
Returns a HierarchicalIterator to simultaneously iterate over images m1, m2, m3 and their coordinates.
HierarchicalIteratorType<N1, T1, T2, T3, T4>::type vigra::createHierarchicalIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2, | ||
MultiArrayView< N3, T3, S3 > const & | m3, | ||
MultiArrayView< N4, T4, S4 > const & | m4 | ||
) |
Returns a HierarchicalIterator to simultaneously iterate over images m1, m2, m3, m4 and their coordinates.
HierarchicalIteratorType<N1, T1, T2, T3, T4, T5>::type vigra::createHierarchicalIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2, | ||
MultiArrayView< N3, T3, S3 > const & | m3, | ||
MultiArrayView< N4, T4, S4 > const & | m4, | ||
MultiArrayView< N5, T5, S5 > const & | m5 | ||
) |
Returns a HierarchicalIterator to simultaneously iterate over images m1, m2, m3, m4, m5 and their coordinates.
void vigra::importVolume | ( | ... | ) |
Function for importing a 3D volume.
Declarations:
Data can be read either from a single file containing 3D data (supported formats: Andor .SIF or multi-page TIFF), a ".info" text file which describes the contents of an accompanying raw data file, or a stack of 2D images (numbered according to the scheme name_base+"[0-9]+"+name_extension
) each representing a slice of the volume. The decision which of these possibilities applies is taken in the VolumeImportInfo constructor, see there for full details.
Variant 1 is the basic version of this function. Here, the info object and a destination array of approriate size must already be constructed. The other variants are just abbreviations provided for your convenience:
Usage:
#include <vigra/multi_impex.hxx>
Namespace: vigra
Notice that slice numbers in a stack need not be consecutive (i.e. gaps are allowed) and will be interpreted according to their numerical order (i.e. "009", "010", "011" are read in the same order as "9", "10", "11"). The number of images found determines the depth of the volume.
void vigra::exportVolume | ( | ... | ) |
Function for exporting a 3D volume.
Declarations:
The volume can either be exported as a multi-page TIFF file (variant 2, only available if libtiff is installed), or as a stack of 2D images, one image per slice (variant 3, files are named according to the scheme name_base+"000"+name_ext
, name_base+"001"+name_ext
etc.). If the target image format does not support the source value_type
, all slices will be mapped to the appropriate target range in the same way.
Variant 1 is the basic version of the function. It allows full control over the export via an already constructed vigra::VolumeExportInfo object. The other two are just abbreviations that construct the VolumeExportInfo object internally.
Usage:
#include <vigra/multi_impex.hxx>
Namespace: vigra
CoupledIteratorType<N>::type vigra::createCoupledIterator | ( | TinyVector< MultiArrayIndex, N > const & | shape | ) |
Returns a CoupledScanOrderIterator from shape to iterate over coordinates.
CoupledIteratorType<N1, T1>::type vigra::createCoupledIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1 | ) |
Returns a CoupledScanOrderIterator to simultaneously iterate over image m1 and its coordinates.
CoupledIteratorType<N1, T1, T2>::type vigra::createCoupledIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2 | ||
) |
Returns a CoupledScanOrderIterator to simultaneously iterate over images m1, m2 and their coordinates.
CoupledIteratorType<N1, T1, T2, T3>::type vigra::createCoupledIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2, | ||
MultiArrayView< N3, T3, S3 > const & | m3 | ||
) |
Returns a CoupledScanOrderIterator to simultaneously iterate over images m1, m2, m3 and their coordinates.
CoupledIteratorType<N1, T1, T2, T3, T4>::type vigra::createCoupledIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2, | ||
MultiArrayView< N3, T3, S3 > const & | m3, | ||
MultiArrayView< N4, T4, S4 > const & | m4 | ||
) |
Returns a CoupledScanOrderIterator to simultaneously iterate over images m1, m2, m3, m4 and their coordinates.
CoupledIteratorType<N1, T1, T2, T3, T4, T5>::type vigra::createCoupledIterator | ( | MultiArrayView< N1, T1, S1 > const & | m1, |
MultiArrayView< N2, T2, S2 > const & | m2, | ||
MultiArrayView< N3, T3, S3 > const & | m3, | ||
MultiArrayView< N4, T4, S4 > const & | m4, | ||
MultiArrayView< N5, T5, S5 > const & | m5 | ||
) |
Returns a CoupledScanOrderIterator to simultaneously iterate over images m1, m2, m3, m4, m5 and their coordinates.
unsigned int vigra::labelMultiArray | ( | ... | ) |
Find the connected components of a MultiArray with arbitrary many dimensions.
See also labelMultiArrayBlockwise() for a parallel version of this algorithm.
By specifying a background value in the vigra::LabelOptions, this function can also realize the behavior of labelMultiArrayWithBackground().
Declaration:
Connected components are defined as regions with uniform values. Thus, the value type T
of the input array data either must be equality comparable, or an EqualityFunctor must be provided that realizes the desired predicate. The destination array's value type Label
should be large enough to hold the labels without overflow. Region numbers will form a consecutive sequence starting at one and ending with the region number returned by the function (inclusive).
Argument neighborhood specifies the type of connectivity used. It can take the values DirectNeighborhood
(which corresponds to 4-neighborhood in 2D and 6-neighborhood in 3D, default) or IndirectNeighborhood
(which corresponds to 8-neighborhood in 2D and 26-neighborhood in 3D).
Return: the highest region label used
Usage:
#include <vigra/multi_labeling.hxx>
Namespace: vigra
Required Interface:
unsigned int vigra::labelMultiArrayWithBackground | ( | ... | ) |
Find the connected components of a MultiArray with arbitrary many dimensions, excluding the background from labeling.
From a user's point of view, this function is no longer needed because labelMultiArray() can realizes the same behavior when an appropriate background value is specified in its vigra::LabelOptions. Similarly, labelMultiArrayBlockwise() implements a parallel version of this algorithm.
Declaration:
This function is the same as labelMultiArray(), except for the additional parameter backgroundValue. Points in the input array data with this value (which default to zero) are ignored during labeling, and their output label is automatically set to zero. Region numbers will be a consecutive sequence starting at zero (when background was present) or at one (when no background was present) and ending with the region number returned by the function (inclusive).
Return: the number of non-background regions found (= highest region label, because background has label 0)
Usage:
#include <vigra/multi_labeling.hxx>
Namespace: vigra
Required Interface:
void vigra::multiBinaryErosion | ( | ... | ) |
Binary erosion on multi-dimensional arrays.
This function applies a flat circular erosion operator with a given radius. The operation is isotropic. The input is interpreted as a binary multi-dimensional array where non-zero pixels represent foreground and zero pixels represent background. In the output, foreground is always represented by ones (i.e. NumericTrais<typename DestAccessor::value_type>::one()).
This function may work in-place, which means that siter == diter
is allowed. A temporary internal array is only allocated if working on the destination array directly would cause overflow errors (that is if NumericTraits<typename DestAccessor::value_type>::max() < squaredNorm(shape)
, i.e. the squared length of the image diagonal doesn't fit into the destination type).
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_morphology.hxx>
Namespace: vigra
void vigra::multiBinaryDilation | ( | ... | ) |
Binary dilation on multi-dimensional arrays.
This function applies a flat circular dilation operator with a given radius. The operation is isotropic. The input is interpreted as a binary multi-dimensional array where non-zero pixels represent foreground and zero pixels represent background. In the output, foreground is always represented by ones (i.e. NumericTrais<typename DestAccessor::value_type>::one()).
This function may work in-place, which means that siter == diter
is allowed. A temporary internal array is only allocated if working on the destination array directly would cause overflow errors (that is if NumericTraits<typename DestAccessor::value_type>::max() < squaredNorm(shape)
, i.e. the squared length of the image diagonal doesn't fit into the destination type).
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_morphology.hxx>
Namespace: vigra
void vigra::multiGrayscaleErosion | ( | ... | ) |
Parabolic grayscale erosion on multi-dimensional arrays.
This function applies a parabolic erosion operator with a given spread (sigma) on a grayscale array. The operation is isotropic. The input is a grayscale multi-dimensional array.
This function may work in-place, which means that siter == diter
is allowed. A full-sized internal array is only allocated if working on the destination array directly would cause overflow errors (i.e. if typeid(typename DestAccessor::value_type) < N * M*M
, where M is the size of the largest dimension of the array.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_morphology.hxx>
Namespace: vigra
void vigra::multiGrayscaleDilation | ( | ... | ) |
Parabolic grayscale dilation on multi-dimensional arrays.
This function applies a parabolic dilation operator with a given spread (sigma) on a grayscale array. The operation is isotropic. The input is a grayscale multi-dimensional array.
This function may work in-place, which means that siter == diter
is allowed. A full-sized internal array is only allocated if working on the destination array directly would cause overflow errors (i.e. if typeid(typename DestAccessor::value_type) < N * M*M
, where M is the size of the largest dimension of the array.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_morphology.hxx>
Namespace: vigra
void vigra::initMultiArray | ( | ... | ) |
Write a value to every element in a multi-dimensional array.
The initial value can either be a constant of appropriate type (compatible with the destination's value_type), or a functor with compatible result_type. These two cases are automatically distinguished when FunctorTraits<FUNCTOR>::isInitializer
yields VigraTrueType
. Since the functor is passed by const
reference, its operator()
must be const, and its internal state may need to be mutable
.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
void vigra::initMultiArrayBorder | ( | ... | ) |
Write values to the specified border values in the array.
This functions is similar to initMultiArray(), but it initializes only the array elements whose distance from any array border is at most border_width.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
void vigra::copyMultiArray | ( | ... | ) |
Copy a multi-dimensional array.
This function can be applied in two modes:
The arrays must be represented by iterators compatible with vigra::MultiIterator, and the iteration range is specified by means of shape objects. If only the source shape is given the destination array is assumed to have the same shape, and standard mode is applied. If two shapes are given, the size of corresponding dimensions must be either equal (standard copy), or the source length must be 1 (expanding copy).
Declarations:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
pass arbitrary-dimensional array views:
Usage - Standard Mode:
Usage - Expanding Mode:
The source array is effectively only a 2D image (it has a 3D shape, but 'depth' is a singleton dimension with length 1). Thus, the destination will contain 50 identical copies of this image:
void vigra::transformMultiArray | ( | ... | ) |
Transform a multi-dimensional array with a unary function or functor.
Note: The effect of this function can often be achieved in a simpler and more readable way by means of array expressions.
This function can be applied in three modes:
std::accumulate()
. The arrays must be represented by MultiArrayViews. If source and destination shapes match, standard mode is applied. If the shapes differ, the size of corresponding dimensions must either be equal, or the source length must be 1 (expand mode), or the destination length must be 1 (reduce mode). However, reduction and expansion cannot be executed at the same time, so the latter conditions are mutual exclusive, even if they apply to different dimensions.
Declarations:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
pass arbitrary-dimensional array views:
Usage - Standard Mode:
Source and destination array have the same size.
Usage - Expand Mode:
The source array is effectively only a 2D image(it has a 3D shape, but depth is a singleton dimension with length 1). Thus, the destination will contain 50 identical copies of the transformed source image.
Usage - Reduce Mode:
The destination array is effectively only 1D (it's width and height are singleton dimensions). Thus, it will contain accumulated data for every slice of the source volume (or for every frame, if the source is interpreted as an image sequence). In the example, we use the functor vigra::FindAverage to calculate the average gray value of every slice.
Note that the functor must define the appropriate traits described below in order to be recognized as a reduce functor. This is most easily achieved by deriving from UnaryReduceFunctorTag
(see vigra::FunctorTraits).
Required Interface:
In standard and expand mode, the functor must be a model of UnaryFunction (i.e. support one-argument function call which accepts values of type T1
and a return value that is convertible into T2
.
In reduce mode, it must be a model of UnaryAnalyser (i.e. support function call with one argument and no return value functor(arg)
) and Initializer (i.e. support function call with no argument, but return value res = functor()
). Internally, such functors are recognized by the meta functions FunctorTraits<FUNCTOR>::isUnaryAnalyser
and FunctorTraits<FUNCTOR>::isInitializer
which must both yield VigraTrueType
. Make sure that your functor correctly defines FunctorTraits
because otherwise reduce mode will not work. This is most easily achieved by deriving the functor from UnaryReduceFunctorTag
(see vigra::FunctorTraits). In addition, the functor must be copy constructible in order to start each reduction with a fresh functor.
void vigra::combineTwoMultiArrays | ( | ... | ) |
Combine two multi-dimensional arrays into one using a binary function or functor.
Note: The effect of this function can often be achieved in a simpler and more readable way by means of array expressions.
This function can be applied in three modes:
std::accumulate()
. The arrays must be represented by MultiArrayViews. If all shapes are identical, standard mode is applied. If the shapes differ, the size of corresponding dimensions must either be equal, or the length of this dimension must be 1 in one or both source arrays (expand mode), or the destination length must be 1 (reduce mode). However, reduction and expansion cannot be executed at the same time, so the latter conditions are mutual exclusive, even if they apply to different dimensions.
Declarations:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
pass arbitrary-dimensional array views:
Usage - Standard Mode:
Source and destination arrays have the same size.
Usage - Expand Mode:
One source array is effectively only a 2D image (it has depth 1). This image will be added to every slice of the other source array, and the result is written into the corresponding destination slice.
Usage - Reduce Mode:
The destination array is only 1D (it's width and height are singleton dimensions). Thus, it will contain accumulated data for every slice of the source volumes (or for every frame, if the sources are interpreted as image sequences). In the example, we use vigra::ReduceFunctor together with a functor expression (see Functor Expressions) to calculate the total absolute difference of the gray values in every pair of source slices.
Note that the functor must define the appropriate traits described below in order to be recognized as a reduce functor. This is most easily achieved by deriving from BinaryReduceFunctorTag
(see vigra::FunctorTraits).
Required Interface:
In standard and expand mode, the functor must be a model of BinaryFunction (i.e. support function call with two arguments and a return value which is convertible into T2
: T2 res = functor(arg1, arg2)
):
In reduce mode, it must be a model of BinaryAnalyser (i.e. support function call with two arguments and no return value functor(arg1, arg2)
) and Initializer (i.e. support function call with no argument, but return value res = functor()
). Internally, such functors are recognized by the meta functions FunctorTraits<FUNCTOR>::isBinaryAnalyser
and FunctorTraits<FUNCTOR>::isInitializer
which must both yield VigraTrueType
. Make sure that your functor correctly defines FunctorTraits
because otherwise reduce mode will not work. This is most easily achieved by deriving the functor from BinaryReduceFunctorTag
(see vigra::FunctorTraits). In addition, the functor must be copy constructible in order to start each reduction with a fresh functor.
void vigra::combineThreeMultiArrays | ( | ... | ) |
Combine three multi-dimensional arrays into one using a ternary function or functor.
Note: The effect of this function can often be achieved in a simpler and more readable way by means of array expressions.
Except for the fact that it operates on three input arrays, this function is identical to the standard mode of combineTwoMultiArrays() (reduce and expand modes are not supported).
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
void vigra::inspectMultiArray | ( | ... | ) |
Call an analyzing functor at every element of a multi-dimensional array.
This function can be used to collect statistics of the array etc. The results must be stored in the functor, which serves as a return value (therefore, it is passed to the function by reference). The array must be represented as a MultiArrayView.
For many common statistics, the use of vigra::acc::extractFeatures() in combination with Feature Accumulators is more convenient.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
The functor must support function call with one argument.
void vigra::inspectTwoMultiArrays | ( | ... | ) |
Call an analyzing functor at all corresponding elements of two multi-dimensional arrays.
This function can be used to collect statistics over tow arrays. For example, one can holde data, and the other region labels or weights. The results must be stored in the functor, which serves as a return value (and is therefore passed by reference). The arrays must be represented by MultiArrayViews.
For many common statistics, the use of vigra::acc::extractFeatures() in combination with Feature Accumulators is more convenient.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_pointoperators.hxx>
Namespace: vigra
The functor must support function call with two arguments.
void vigra::resizeMultiArraySplineInterpolation | ( | ... | ) |
Resize MultiArray using B-spline interpolation.
Declarations:
pass arbitrary-dimensional array views:
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 function 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:
#include <vigra/multi_resize.hxx>
Namespace: vigra
void vigra::vectorToTensorMultiArray | ( | ... | ) |
Calculate the tensor (outer) product of a N-D vector with itself.
This function is useful to transform vector arrays into a tensor representation that can be used as input to tensor based processing and analysis functions (e.g. tensor smoothing). When the input array has N dimensions, the input value_type must be a vector of length N, whereas the output value_type mus be vectors of length N*(N-1)/2 which will represent the upper triangular part of the resulting (symmetric) tensor. That is, for 2D arrays the output contains the elements [t11, t12 == t21, t22]
in this order, whereas it contains the elements [t11, t12, t13, t22, t23, t33]
for 3D arrays.
Currently, N <= 3
is required.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_tensorutilities.hxx>
Namespace: vigra
void vigra::tensorTraceMultiArray | ( | ... | ) |
Calculate the tensor trace for every element of a N-D tensor array.
This function turns a N-D tensor (whose value_type is a vector of length N*(N+1)/2, see vectorToTensorMultiArray()) representing the upper triangular part of a symmetric tensor into a scalar array holding the tensor trace.
Currently, N <= 3
is required.
Declarations:
pass arbitrary-dimensional array views:
Usage:
#include <vigra/multi_tensorutilities.hxx>
Namespace: vigra
Preconditions:
N == 2
or N == 3
void vigra::tensorEigenvaluesMultiArray | ( | ... | ) |
Calculate the tensor eigenvalues for every element of a N-D tensor array.
This function turns a N-D tensor (whose value_type is a vector of length N*(N+1)/2, see vectorToTensorMultiArray()) representing the upper triangular part of a symmetric tensor into a vector-valued array holding the tensor eigenvalues (thus, the destination value_type must be vectors of length N).
Currently, N <= 3
is required.
Declarations:
pass arbitrary-dimensional array views:
Usage (MultiArrayView API):
#include <vigra/multi_tensorutilities.hxx>
Namespace: vigra
Preconditions:
N == 2
or N == 3
void vigra::tensorDeterminantMultiArray | ( | ... | ) |
Calculate the tensor determinant for every element of a ND tensor array.
This function turns a N-D tensor (whose value_type is a vector of length N*(N+1)/2, see vectorToTensorMultiArray()) representing the upper triangular part of a symmetric tensor into the a scalar array holding the tensor determinant.
Currently, N <= 3
is required.
Declarations:
pass arbitrary-dimensional array views:
Usage (MultiArrayView API):
#include <vigra/multi_tensorutilities.hxx>
Namespace: vigra
Preconditions:
N == 2
or N == 3
Label vigra::watershedsMultiArray | ( | ... | ) |
Watershed segmentation of an arbitrary-dimensional array.
See also unionFindWatershedsBlockwise() for a parallel version of the watershed algorithm.
This function implements variants of the watershed algorithms described in
[1] L. Vincent and P. Soille: "Watersheds in digital spaces: An efficient algorithm based on immersion simulations", IEEE Trans. Patt. Analysis Mach. Intell. 13(6):583-598, 1991
[2] J. Roerdink, R. Meijster: "The watershed transform: definitions, algorithms, and parallelization strategies", Fundamenta Informaticae, 41:187-228, 2000
The source array data is a boundary indicator such as the gaussianGradientMagnitude() or the trace of the boundaryTensor(), and the destination labels is a label array designating membership of each point in one of the regions found. Plateaus in the boundary indicator are handled via simple tie breaking strategies. Argument neighborhood specifies the connectivity between points and can be DirectNeighborhood
(meaning 4-neighborhood in 2D and 6-neighborhood in 3D, default) or IndirectNeighborhood
(meaning 8-neighborhood in 2D and 26-neighborhood in 3D).
The watershed variant to be applied can be selected in the WatershedOptions object: When you call WatershedOptions::regionGrowing()
(default), the flooding algorithm from [1] is used. Alternatively, WatershedOptions::unionFind()
uses the scan-line algorithm 4.7 from [2]. The latter is faster, but does not support any options (if you pass options nonetheless, they are silently ignored).
The region growing algorithm needs a seed for each region. Seeds can either be provided in the destination array labels (which will then be overwritten with the result) or computed automatically by an internal call to generateWatershedSeeds(). In the former case you have full control over seed placement, while the latter is more convenient. Automatic seed computation is performed when you provide seeding options via WatershedOptions::seedOptions()
or when the array labels is empty (all zeros), in which case default seeding options are chosen. The destination image should be zero-initialized for automatic seed computation.
Further options to be specified via WatershedOptions are:
keepContours()
: Whether to keep a 1-pixel-wide contour (with label 0) between regions (otherwise, a complete grow is performed, i.e. all pixels are assigned to a region). stopAtThreshold()
: Whether to stop growing when the boundaryness exceeds a threshold (remaining pixels keep label 0). biasLabel()
: Whether one region (label) is to be preferred or discouraged by biasing its cost with a given factor (smaller than 1 for preference, larger than 1 for discouragement). The option turboAlgorithm()
is implied by method regionGrowing()
(this is in contrast to watershedsRegionGrowing(), which supports an additional algorithm in 2D only).
watershedsMultiArray() returns the number of regions found (= the highest region label, because labels start at 1).
Declaration:
Usage:
#include <vigra/multi_watersheds.hxx>
Namespace: vigra
Example: watersheds of the gradient magnitude (the example works likewise for higher dimensions).
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:
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
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:
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
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:
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
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:
Declarations:
pass 2D array views:
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
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:
Declarations:
pass 2D array views:
Usage:
#include <vigra/noise_normalization.hxx>
Namespace: vigra
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 vigra::nonlinearDiffusion | ( | ... | ) |
Perform edge-preserving smoothing at the given scale.
The algorithm solves the non-linear diffusion equation
where t is the time, x is the location vector, u( x , t) is the smoothed image at time t, and g(.) is the location dependent diffusivity. At time zero, the image u( x , 0) is simply the original image. The time is proportional to the square of the scale parameter: . The diffusion equation is solved iteratively according to the Additive Operator Splitting Scheme (AOS) from
J. Weickert: "Recursive Separable Schemes for Nonlinear Diffusion Filters", in: B. ter Haar Romeny, L. Florack, J. Koenderingk, M. Viergever (eds.): 1st Intl. Conf. on Scale-Space Theory in Computer Vision 1997, Springer LNCS 1252
DiffusivityFunctor
implements the gradient-dependent local diffusivity. It is passed as an argument to gradientBasedTransform(). The return value must be between 0 and 1 and determines the weight a pixel gets when its neighbors are smoothed. Weickert recommends the use of the diffusivity implemented by class DiffusivityFunctor. It's also possible to use other functors, for example one that always returns 1, in which case we obtain the solution to the linear diffusion equation, i.e. Gaussian convolution.
The source value type must be a linear space with internal addition, scalar multiplication, and NumericTraits defined. The value_type of the DiffusivityFunctor must be the scalar field over wich the source value type's linear space is defined.
In addition to nonlinearDiffusion()
, there is an algorithm nonlinearDiffusionExplicit()
which implements the Explicit Scheme described in the above article. Both algorithms have the same interface, but the explicit scheme gives slightly more accurate approximations of the diffusion process at the cost of much slower processing.
Declarations:
pass 2D array views:
Usage:
#include <vigra/nonlineardiffusion.hxx>
Namespace: vigra
Precondition:
scale > 0
void vigra::nonlinearDiffusionExplicit | ( | ... | ) |
Perform edge-preserving smoothing at the given scale using an explicit scheme.
See nonlinearDiffusion().
void vigra::hourGlassFilter | ( | ... | ) |
Anisotropic tensor smoothing with the hourglass filter.
This function implements anisotropic tensor smoothing by an hourglass-shaped filters as described in
U. Köthe: "Edge and Junction Detection with an Improved Structure Tensor", in: Proc. of 25th DAGM Symposium, Magdeburg 2003, Lecture Notes in Computer Science 2781, pp. 25-32, Heidelberg: Springer, 2003
It is closely related to the structure tensor (see structureTensor()), but replaces the linear tensor smoothing with a smoothing along edges only. Smoothing across edges is largely suppressed. This means that the image structure is preserved much better because nearby features such as parallel edges are not blended into each other.
The hourglass filter is typically applied to a gradient tensor, i.e. the Euclidean product of the gradient with itself, which can be obtained by a gradient operator followed with vectorToTensor(), see example below. The hourglass shape of the filter can be interpreted as indicating the likely continuations of a local edge element. The parameter sigma
determines the radius of the hourglass (i.e. how far the influence of the edge element reaches), and rho
controls its opening angle (i.e. how narrow the edge orientation os followed). Recommended values are sigma = 1.4
(or, more generally, two to three times the scale of the gradient operator used in the first step), and rho = 0.4
which corresponds to an opening angle of 22.5 degrees to either side of the edge.
Declarations:
pass 2D array views:
Usage:
#include <vigra/orientedtensorfilters.hxx>
Namespace: vigra
AtImageBorder vigra::isAtImageBorder | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Find out whether a point is at the image border.
This function checks if x == 0 or x == width - 1 and y == 0 or y == height - 1 and returns the appropriate value of vigra::AtImageBorder, or zero when the point is not at the image border. The behavior of the function is undefined if (x,y) is not inside the image.
#include <vigra/pixelneighborhood.hxx>
Namespace: vigra
void vigra::extractContour | ( | MultiArrayView< 2, T, S > const & | label_image, |
Shape2 const & | anchor_point, | ||
PointArray & | contour_points | ||
) |
Create a polygon from the interpixel contour of a labeled region.
The point anchor_point must be in the region whose contour we want to extract, and must be adjacent to the contour. The algorithm uses the 'left hand on the wall' algorithm to trace the connected component whose label equals the label of the anchor_point. The contour is returned in countour_points as a closed polygon that circles the region counter-clockwise in the image coordinate system (i.e. the coordinate system where x points to the right and y points downwards). Since the resulting polygon represents the interpixel contour, all points will have one integer and one half-integer coordinate.
void vigra::convexHull | ( | const PointArray1 & | points, |
PointArray2 & | convex_hull | ||
) |
Compute convex hull of a 2D polygon.
The input array points contains a (not necessarily ordered) set of 2D points whose convex hull is to be computed. The array's value_type
(i.e. the point type) must be compatible with std::vector (in particular, it must support indexing, copying, and have size() == 2
). The points of the convex hull will be appended to the output array convex_hull (which must support std::back_inserter(convex_hull)
). Since the convex hull is a closed polygon, the first and last point of the output will be the same (i.e. the first point will simply be inserted at the end again). The points of the convex hull will be ordered counter-clockwise, starting with the leftmost point of the input. The function implements Andrew's Monotone Chain algorithm.
void vigra::fillPolygon | ( | Polygon< Point > const & | p, |
MultiArrayView< 2, T, S > & | output_image, | ||
Value | value | ||
) |
Render closed polygon p into the image output_image.
All pixels on the polygon's contour and in its interior are set to the given value. Parts of the polygon outside the image region are clipped. The function uses a robust X-intersection array algorithm that is able to handle all corner cases (concave and self-intersecting polygons, knots on integer coordinates).
bool vigra::polynomialRoots | ( | POLYNOMIAL const & | poriginal, |
VECTOR & | roots, | ||
bool | polishRoots | ||
) |
Determine the roots of the polynomial poriginal
.
The roots are appended to the vector roots
, with optional root polishing as specified by polishRoots
(default: do polishing). The function uses an improved version of Laguerre's algorithm. The improvements are as follows:
The algorithm has been successfully used for polynomials up to order 80. The function stops and returns false
if an iteration fails to converge within 80 steps. The type POLYNOMIAL
must be compatible to vigra::PolynomialView, VECTOR
must be compatible to std::vector
with a value_type
compatible to the type POLYNOMIAL::Complex
.
Declaration:
pass arguments explicitly:
Usage:
#include <vigra/polynomial.hxx>
Namespace: vigra
bool vigra::polynomialRealRoots | ( | POLYNOMIAL const & | p, |
VECTOR & | roots, | ||
bool | polishRoots | ||
) |
Determine the real roots of the polynomial p
.
This function simply calls polynomialRoots() and than throws away all complex roots. Accordingly, VECTOR
must be compatible to std::vector
with a value_type
compatible to the type POLYNOMIAL::Real
.
Declaration:
pass arguments explicitly:
Usage:
#include <vigra/polynomial.hxx>
Namespace: vigra
std::vector<double> vigra::polynomialWarpWeights | ( | double | x, |
double | y, | ||
unsigned int | polynom_order | ||
) |
Iterative function for determinination of the polynom weights:
Example: order=2, x, y --—> [1, x, y, x^2, x*y, y^2]
This function is needed, because the polynomial transformation Matrix has the the same number of rows. the target position is then determined by multiplying each x- and y-transformation result value with the corresponding weight for the current x- and y-coordinate, given by this function.
linalg::TemporaryMatrix<double> vigra::polynomialMatrix2DFromCorrespondingPoints | ( | SrcPointIterator | s, |
SrcPointIterator | s_end, | ||
DestPointIterator | d | ||
) |
Create polynomial matrix of a certain degree that maps corresponding points onto each other.
For use with polynomialWarpImage() of same degree.
Since polynoms are usually non-linear functions, a special semantics is embedded to define a matrix here. Each matrix consist of two rows, containing x- and y-factors of the polynom.
The meaning of the matrix is explained at the example of a polynom of 2nd order:
First Row = [a_x b_x c_x d_x e_x f_x] Second Row = [a_y b_y c_y d_y e_y f_y]
The transformed coordinate p'=[x' y'] of a position p=[x y] is then:
x' = a_x + b_x*x + c_x*y + d_x*x^2 + e_x*x*y + f_x*y^2 y' = a_y + b_y*x + c_y*y + d_y*x^2 + e_y*x*y + f_y*y^2
Note that the order of the polynom's factors is directly influenced by the polynomialWarpWeights() function and follows the intuitive scheme.
void vigra::polynomialWarpImage | ( | ... | ) |
Warp an image according to an polynomial transformation.
To get more information about the structure of the matrix, see polynomialMatrix2DFromCorrespondingPoints().
#include <vigra/polynomial_registration.hxx>
Namespace: vigra
pass 2D array views:
linalg::TemporaryMatrix<double> vigra::projectiveMatrix2DFromCorrespondingPoints | ( | SrcPointIterator | s, |
SrcPointIterator | send, | ||
DestPointIterator | d | ||
) |
Create homogeneous matrix that maps corresponding points onto each other.
For use with projectiveWarpImage(). Since four corresponding points are needed to be given, the matrix will compute a full projective transform.
void vigra::projectiveWarpImage | ( | ... | ) |
Warp an image according to an projective transformation.
The matrix can be computed from a set of correspondung points using projectiveMatrix2DFromCorrespondingPoints().
Declarations:
#include <vigra/projective_registration.hxx>
Namespace: vigra
pass 2D array views:
The algorithm applies the given projectiveMatrix 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 written at that destination point.
The matrix represent a 2-dimensional projective transform by means of homogeneous coordinates, i.e. it must be a 3x3 matrix whose last row is (p1,p2,1).
Required Interface:
See also: Functions to specify projective transformation: translationMatrix2D(), scalingMatrix2D(), shearMatrix2D(), rotationMatrix2DRadians(), rotationMatrix2DDegrees() and projectiveMatrix2DFromCorrespondingPoints()
unsigned int vigra::quadraticProgramming | ( | ... | ) |
Solve Quadratic Programming Problem.
The quadraticProgramming() function implements the algorithm described in
D. Goldfarb, A. Idnani: "A numerically stable dual method for solving strictly convex quadratic programs", Mathematical Programming 27:1-33, 1983.
for the solution of (convex) quadratic programming problems by means of a primal-dual method.
#include <vigra/quadprog.hxx>
Namespaces: vigra
Declaration:
The problem must be specified in the form:
Matrix G G must be symmetric positive definite, and matrix CE must have full row rank. Matrix and vector dimensions must be as follows:
The function writes the optimal solution into the vector x and returns the cost of this solution. If the problem is infeasible, std::numeric_limits::infinity()
is returned. In this case the value of vector x is undefined.
Usage:
Minimize f = 0.5 * x'*G*x + g'*x
subject to -1 <= x <= 1
. The solution is x' = [1.0, 0.5, -1.0]
with f = -22.625
.
This algorithm can also be used to solve non-negative least squares problems (see nonnegativeLeastSquares() for an alternative algorithm). Consider the problem to minimize f = (A*x - b)' * (A*x - b)
subject to x >= 0
. Expanding the product in the objective gives f = x'*A'*A*x - 2*b'*A*x + b'*b
. This is equivalent to the problem of minimizing fn = 0.5 * x'*G*x + g'*x
with G = A'*A
and g = -A'*b
(the constant term b'*b
has no effect on the optimal solution and can be dropped). The following code computes the solution x' = [18.4493, 0, 4.50725]
:
RandomTT800& vigra::randomTT800 | ( | ) |
Access the global (program-wide) instance of the TT800 random number generator.
RandomMT19937& vigra::randomMT19937 | ( | ) |
Access the global (program-wide) instance of the MT19937 random number generator.
detail::RF_DEFAULT & rf_default | ( | ) |
factory function to return a RF_DEFAULT tag
void vigra::rf_export_HDF5 | ( | const RandomForest< T, Tag > & | rf, |
HDF5File & | h5context, | ||
const std::string & | pathname = "" |
||
) |
void vigra::rf_export_HDF5 | ( | const RandomForest< T, Tag > & | rf, |
const std::string & | filename, | ||
const std::string & | pathname = "" |
||
) |
Save a random forest to a named HDF5 file into a specified HDF5 group.
The random forest is saved as a set of HDF5 datasets, groups, and attributes below a certain HDF5 group (default: root). No additional data should be stored in that group.
rf | Random forest object to be exported |
filename | Name of an HDF5 file to open |
pathname | If empty or not supplied, save the random forest to the root group of the HDF5 file. Otherwise, save to a new-created group specified by the path name (relative to the root group). |
void vigra::rf_export_HDF5 | ( | const RandomForest< T, Tag > & | rf, |
hid_t | outf_id, | ||
const std::string & | pathname = "" |
||
) |
Save a random forest to an HDF5 file specified by its id.
The random forest is saved as a set of HDF5 datasets, groups, and attributes below a certain HDF5 group (default: root). No additional data should be stored in that group.
rf | Random forest object to be exported |
outf_id | HDF5 file id |
pathname | If empty or not supplied, save the random forest to the root group of the HDF5 file. Otherwise, save to a new-created group specified by the path name (relative to the root group). |
bool vigra::rf_import_HDF5 | ( | RandomForest< T, Tag > & | rf, |
HDF5File & | h5context, | ||
const std::string & | pathname = "" |
||
) |
bool vigra::rf_import_HDF5 | ( | RandomForest< T, Tag > & | rf, |
const std::string & | filename, | ||
const std::string & | pathname = "" |
||
) |
Read a random forest from a named HDF5 file's specified group.
The random forest is read from a certain HDF5 group (default: root group of the HDF5 file) as a set of HDF5 datasets, groups, and attributes. No additional data should be present in that group.
rf | Random forest object to be imported |
filename | Name of an HDF5 file to open |
pathname | If empty or not supplied, read from the random forest from the current group of the HDF5 file. Otherwise, use the group specified by the path name, which may be either relative or absolute. |
bool vigra::rf_import_HDF5 | ( | RandomForest< T, Tag > & | rf, |
hid_t | inf_id, | ||
const std::string & | pathname = "" |
||
) |
Read a random forest from an HDF5 file specified by its id.
The random forest is read from a certain HDF5 group (default: root group of the HDF5 file) as a set of HDF5 datasets, groups, and attributes. No additional data should be present in that group.
rf | Random forest object to be imported |
inf_id | HDF5 file id |
pathname | If empty or not supplied, read from the random forest from the current group of the HDF5 file. Otherwise, use the group specified by the path name, which may be either relative or absolute. |
IntType vigra::gcd | ( | IntType | n, |
IntType | m | ||
) |
Calculate the greatest common divisor.
This function works for arbitrary integer types, including user-defined (e.g. infinite precision) ones.
#include <vigra/rational.hxx>
Namespace: vigra
IntType vigra::lcm | ( | IntType | n, |
IntType | m | ||
) |
Calculate the lowest common multiple.
This function works for arbitrary integer types, including user-defined (e.g. infinite precision) ones.
#include <vigra/rational.hxx>
Namespace: vigra
integer powers
throws bad_rational
if indeterminate expression.
T vigra::rational_cast | ( | const Rational< IntType > & | src | ) |
Type conversion
Executes static_cast<T>(numerator()) / denominator()
.
Usage:
linalg::TemporaryMatrix<double> vigra::rbfMatrix2DFromCorrespondingPoints | ( | SrcPointIterator | s, |
SrcPointIterator | s_end, | ||
DestPointIterator | d, | ||
RadialBasisFunctor const & | rbf | ||
) |
Create a matrix that maps corresponding points onto each other using a given RBF.
For use with rbfWarpImage(). For n given (corresponding) points, the matrix will be of size (n+3,2). Note that the representation of this matrix is exactly the same as the "W" matrix of Bookstein. More information can be found in the following article:
Fred L. Bookstein. Principal Warps: Thin-Plate Splines and the Decomposition of Deformations. IEEE PAMI, Vol 11, No 8. 1989
void vigra::rbfWarpImage | ( | SplineImageView< ORDER, T > const & | src, |
DestIterator | dul, | ||
DestIterator | dlr, | ||
DestAccessor | dest, | ||
DestPointIterator | d, | ||
DestPointIterator | d_end, | ||
MultiArrayView< 2, double, C > const & | W, | ||
RadialBasisFunctor | rbf | ||
) |
Warp an image according to an radial basis function based transformation.
To get more information about the structure of the matrix, see rbfMatrix2DFromCorrespondingPoints()
#include <vigra/rbf_registration.hxx>
Namespace: vigra
pass 2D array views:
void vigra::recursiveFilterLine | ( | ... | ) |
Performs a 1-dimensional recursive convolution of the source signal.
The function performs a causal and an anti-causal first or second order recursive filtering with the given filter parameter b1
and border treatment border
(first order filter, b2 = 0
) or parameters b1, b2
and BORDER_TREATMENT_REFLECT
(second order filter). Thus, the result is always a filtering with linear phase.
The signal's value_type (SrcAccessor::value_type) must be a linear space over double
, i.e. addition of source values, multiplication with double
, and NumericTraits
must be defined.
Declaration:
First order recursive filter:
Second order recursive filter:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
Required Interface:
Preconditions:
void vigra::recursiveGaussianFilterLine | ( | ... | ) |
Compute a 1-dimensional recursive approximation of Gaussian smoothing.
The function applies a causal and an anti-causal third order recursive filter which optimally approximates the Gaussian filter, as proposed in
I. Young, L. van Vliet: Recursive implementation of the Gaussian filter
Signal Processing 44:139-151, 1995
The formulas for transforming the given scale parameter sigma
into the actual filter coefficients are taken from Luigi Rosa's Matlab implementation.
The signal's value_type (SrcAccessor::value_type) must be a linear space over double
, i.e. addition of source values, multiplication with double
, and NumericTraits
must be defined.
Declaration:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
Required Interface:
Preconditions:
void vigra::recursiveSmoothLine | ( | ... | ) |
Convolves the image with a 1-dimensional exponential filter.
This function calls recursiveFilterLine() with b = exp(-1.0/scale)
and border = BORDER_TREATMENT_REPEAT
. See recursiveFilterLine() for more documentation.
Declaration:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
Required Interface:
Preconditions:
void vigra::recursiveFirstDerivativeLine | ( | ... | ) |
Performs a 1 dimensional recursive convolution of the source signal.
It uses the first derivative an exponential d/dx exp(-abs(x)/scale)
as a kernel. The signal's value_type (SrcAccessor::value_type) must be a linear space over double
, i.e. addition and subtraction of source values, multiplication with double
, and NumericTraits
must be defined. Border treatment is always BORDER_TREATMENT_REPEAT
.
Declaration:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
Required Interface:
Preconditions:
void vigra::recursiveSecondDerivativeLine | ( | ... | ) |
Performs a 1 dimensional recursive convolution of the source signal.
It uses the second derivative an exponential d2/dx2 exp(-abs(x)/scale)
as a kernel. The signal's value_type (SrcAccessor::value_type) must be a linear space over double
, i.e. addition and subtraction of source values, multiplication with double
, and NumericTraits
must be defined. Border treatment is always BORDER_TREATMENT_REPEAT
.
Declaration:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
Required Interface:
Preconditions:
void vigra::recursiveFilterX | ( | ... | ) |
Performs 1 dimensional recursive filtering (1st and 2nd order) in x direction.
It calls recursiveFilterLine() for every row of the image. See recursiveFilterLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveGaussianFilterX | ( | ... | ) |
Compute 1 dimensional recursive approximation of Gaussian smoothing in y direction.
It calls recursiveGaussianFilterLine() for every column of the image. See recursiveGaussianFilterLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveSmoothX | ( | ... | ) |
Performs 1 dimensional recursive smoothing in x direction.
It calls recursiveSmoothLine() for every row of the image. See recursiveSmoothLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveFilterY | ( | ... | ) |
Performs 1 dimensional recursive filtering (1st and 2nd order) in y direction.
It calls recursiveFilterLine() for every column of the image. See recursiveFilterLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveGaussianFilterY | ( | ... | ) |
Compute 1 dimensional recursive approximation of Gaussian smoothing in y direction.
It calls recursiveGaussianFilterLine() for every column of the image. See recursiveGaussianFilterLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveSmoothY | ( | ... | ) |
Performs 1 dimensional recursive smoothing in y direction.
It calls recursiveSmoothLine() for every column of the image. See recursiveSmoothLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveFirstDerivativeX | ( | ... | ) |
Recursively calculates the 1 dimensional first derivative in x direction.
It calls recursiveFirstDerivativeLine() for every row of the image. See recursiveFirstDerivativeLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveFirstDerivativeY | ( | ... | ) |
Recursively calculates the 1 dimensional first derivative in y direction.
It calls recursiveFirstDerivativeLine() for every column of the image. See recursiveFirstDerivativeLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveSecondDerivativeX | ( | ... | ) |
Recursively calculates the 1 dimensional second derivative in x direction.
It calls recursiveSecondDerivativeLine() for every row of the image. See recursiveSecondDerivativeLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::recursiveSecondDerivativeY | ( | ... | ) |
Recursively calculates the 1 dimensional second derivative in y direction.
It calls recursiveSecondDerivativeLine() for every column of the image. See recursiveSecondDerivativeLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/recursiveconvolution.hxx>
Namespace: vigra
void vigra::nonlinearLeastSquares | ( | ... | ) |
Fit a non-linear model to given data by minimizing least squares loss.
Declarations:
This function implements the Levenberg-Marquardt algorithm to fit a non-linear model to given data. The model depends on a vector of parameters p which are to be choosen such that the least-squares residual between the data and the model's predictions is minimized according to the objective function:
where is the model to be optimized (with arguments
and parameters
), and
are the feature/response pairs of the given data. Since the model is non-linear (otherwise, you should use ordinary leastSquares()), it must be linearized in terms of a first-order Taylor expansion, and the optimal parameters p have to be determined iteratively. In order for the iterations to converge to the desired solution, a good initial guess on p is required.
The model must be specified by a functor which takes one of the following forms:
Each call to the functor's operator()
computes the model's prediction for a single data point. The current model parameters are specified in a TinyVector of appropriate length. The type T
must be templated: normally, it is the same as DataType
, but the nonlinearLeastSquares() function will temporarily replace it with a special number type that supports automatic differentiation (see vigra::autodiff::DualVector). In this way, the derivatives needed in the model's Taylor expansion can be computed automatically.
When the model is univariate (has a single scalar argument), the samples must be passed to nonlinearLeastSquares() in a pair 'x', 'y' of 1D MultiArrayView
s (variant 1). When the model is multivariate (has a vector-valued argument), the 'x' input must be a 2D MultiArrayView
(variant 2) whose rows represent a single data sample (i.e. the number of columns corresponds to the length of the model's argument vector). The number of rows in 'x' defines the number of data samples and must match the length of array 'y'.
The TinyVector
'model_parameters' holds the initial guess for the model parameters and will be overwritten by the optimal values found by the algorithm. The algorithm's internal behavior can be controlled by customizing the option object vigra::NonlinearLSQOptions.
The function returns the residual sum of squared errors of the final solution.
Usage:
#include <vigra/regression.hxx>
Namespace: vigra
Suppose that we want to fit a centered Gaussian function of the form
to noisy data , i.e. we want to find parameters a, s, b such that the residual
is minimized. The model parameters are placed in a
TinyVector<T, 3>
p according to the rules
p[0] <=> a
, p[1] <=> s
and p[2] <=> b
.
The following functor computes the model's prediction for a single data point x
:
Now we can find optimal values for the parameters like this:
void vigra::resamplingConvolveLine | ( | ... | ) |
Performs a 1-dimensional resampling convolution of the source signal using the given set of kernels.
This function is mainly used internally: It is called for each dimension of a higher dimensional array in order to perform a separable resize operation.
Declaration:
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
void vigra::resamplingConvolveX | ( | ... | ) |
Apply a resampling filter in the x-direction.
This function implements a convolution operation in x-direction (i.e. applies a 1D filter to every row) where the width of the source and destination images differ. This is typically used to avoid aliasing if the image is scaled down, or to interpolate smoothly if the image is scaled up. The target coordinates are transformed into source coordinates by
The samplingRatio
and offset
must be given as vigra::Rational in order to avoid rounding errors in this transformation. It is required that for all pixels of the target image, xsource
remains within the range of the source image (i.e. 0 <= xsource <= sourceWidth-1
. Since xsource
is in general not an integer, the kernel
must be a functor that can be accessed at arbitrary (double
) coordinates. It must also provide a member function radius()
which specifies the support (non-zero interval) of the kernel. VIGRA already provides a number of suitable functors, e.g. vigra::Gaussian, vigra::BSpline vigra::CatmullRomSpline, and vigra::CoscotFunction. The function resizeImageSplineInterpolation() is implemented by means of resamplingConvolveX() and resamplingConvolveY().
Declarations:
pass 2D array views:
Usage:
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
void vigra::resamplingConvolveY | ( | ... | ) |
Apply a resampling filter in the y-direction.
This function implements a convolution operation in y-direction (i.e. applies a 1D filter to every column) where the height of the source and destination images differ. This is typically used to avoid aliasing if the image is scaled down, or to interpolate smoothly if the image is scaled up. The target coordinates are transformed into source coordinates by
The samplingRatio
and offset
must be given as vigra::Rational in order to avoid rounding errors in this transformation. It is required that for all pixels of the target image, ysource
remains within the range of the source image (i.e. 0 <= ysource <= sourceHeight-1
. Since ysource
is in general not an integer, the kernel
must be a functor that can be accessed at arbitrary (double
) coordinates. It must also provide a member function radius()
which specifies the support (non-zero interval) of the kernel. VIGRA already provides a number of suitable functors, e.g. vigra::Gaussian, vigra::BSpline vigra::CatmullRomSpline, and vigra::CoscotFunction. The function resizeImageSplineInterpolation() is implemented by means of resamplingConvolveX() and resamplingConvolveY().
Declarations:
pass 2D array views:
Usage:
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
void vigra::resamplingConvolveImage | ( | ... | ) |
Apply two separable resampling filters successively, the first in x-direction, the second in y-direction.
This function is a shorthand for the concatenation of a call to resamplingConvolveX() and resamplingConvolveY() with the given kernels. See there for detailed documentation.
Declarations:
pass 2D array views:
Usage:
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
void vigra::pyramidReduceBurtFilter | ( | ... | ) |
Two-fold down-sampling for image pyramid construction.
This function implements the reduction by one resolution level (first signature) or across several pyramid levels (last signature) of a Gaussian pyramid as described in
P. Burt, E. Adelson: "The Laplacian Pyramid as a Compact Image Code", IEEE Trans. Communications, 9(4):532-540, 1983
That is, it applies the smoothing filter
to the source image and then copies all pixels with even coordinates to the destination image. The destination image shape must be dest_shape = ceil(src_shape / 2.0)
. centerValue
must be between 0.25 and 0.5 and determines the strength of smoothing (bigger values correspond to less smoothing). If toLevel - fromLevel > 1
in the pyramid variant of the function, this process is repeated until toLevel
is reached.
Typically, this functions is used in connection with a vigra::ImagePyramid (last signature below) to perform several levels of reduction in one go.
Declarations:
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
pass 2D array views:
use a vigra::ImagePyramid :
void vigra::pyramidExpandBurtFilter | ( | ... | ) |
Two-fold up-sampling for image pyramid reconstruction.
This function implements the expansion by one resolution level (first signature) or across several pyramid levels (last signature) of a Gaussian pyramid as described in
P. Burt, E. Adelson: "The Laplacian Pyramid as a Compact Image Code", IEEE Trans. Communications, 9(4):532-540, 1983
That is, the function first places the pixel values of the low-resolution image at the even pixel coordinates of the high-resolution image (pixels with at least one odd coordinate are zero-initialized) and then applies the interpolation filter
to the high-resolution image. The source image shape must be src_shape = ceil(dest_shape / 2.0)
. centerValue
must be between 0.25 and 0.5 and determines the sharpness of the interpolation (bigger values correspond to sharper images). If fromLevel - toLevel > 1
in the pyramid variant of the function, this process is repeated until toLevel
is reached.
Typically, this functions is used in connection with a vigra::ImagePyramid (last signature below) to perform several levels of expansion in one go.
Declarations:
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
pass 2D array views:
use a vigra::ImagePyramid :
void vigra::pyramidReduceBurtLaplacian | ( | ImagePyramid< Image, Alloc > & | pyramid, |
int | fromLevel, | ||
int | toLevel, | ||
double | centerValue = 0.4 |
||
) |
Create a Laplacian pyramid.
This function implements the reduction across several resolution levels of a Laplacian pyramid as described in
P. Burt, E. Adelson: "The Laplacian Pyramid as a Compact Image Code", IEEE Trans. Communications, 9(4):532-540, 1983
It first creates a Gaussian pyramid using pyramidReduceBurtFilter(), then upsamples each level once using pyramidExpandBurtFilter(), and finally stores the difference between the upsampled and original versions of each level (i.e. the Laplacian of Gaussian is approximated by a difference of Gaussian).
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
void vigra::pyramidExpandBurtLaplacian | ( | ImagePyramid< Image, Alloc > & | pyramid, |
int | fromLevel, | ||
int | toLevel, | ||
double | centerValue = 0.4 |
||
) |
Reconstruct a Laplacian pyramid.
This function implements the reconstruction of a Gaussian pyramid across several resolution levels of a Laplacian pyramid as described in
P. Burt, E. Adelson: "The Laplacian Pyramid as a Compact Image Code", IEEE Trans. Communications, 9(4):532-540, 1983
At each level starting from fromLevel
, this function calls pyramidExpandBurtFilter() to interpolate the image to the next highest resolution, and then adds the interpolated image to the image stored at the next level.
#include <vigra/resampling_convolution.hxx>
Namespace: vigra
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.
Declarations:
pass 2D array views:
Usage:
#include <vigra/resizeimage.hxx>
Namespace: vigra
Preconditions:
Source and destination must have at least 2 pixels along each axis.
void vigra::resizeImageLinearInterpolation | ( | ... | ) |
Resize image using linear interpolation.
The function uses the standard separable bilinear interpolation algorithm to obtain a good compromise 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.
Declarations:
pass 2D array views:
Usage:
#include <vigra/resizeimage.hxx>
Namespace: vigra
Preconditions:
Source and destination must have at least 2 pixels along each axis.
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 function 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 2D array views:
Usage:
#include <vigra/resizeimage.hxx>
Namespace: vigra
Preconditions:
Source and destination must have at least 2 pixels along each axis.
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 2D array views:
#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 2D array views:
#include <vigra/resizeimage.hxx>
Namespace: vigra
Apply ceil() function to each RGB component.
Apply floor() function to each RGB component.
void vigra::seededRegionGrowing | ( | ... | ) |
Region Segmentation by means of Seeded Region Growing.
This algorithm implements seeded region growing as described in
R. Adams, L. Bischof: "Seeded Region Growing", IEEE Trans. on Pattern Analysis and Maschine Intelligence, vol 16, no 6, 1994, and
Ullrich Köthe: Primary Image Segmentation, in: G. Sagerer, S. Posch, F. Kummert (eds.): Mustererkennung 1995, Proc. 17. DAGM-Symposium, Springer 1995
The seed image is a partly segmented image which contains uniquely labeled regions (the seeds) and unlabeled pixels (the candidates, label 0). The highest seed label found in the seed image is returned by the algorithm.
Seed regions can be as large as you wish and as small as one pixel. If there are no candidates, the algorithm will simply copy the seed image into the output image. Otherwise it will aggregate the candidates into the existing regions so that a cost function is minimized. Candidates are taken from the neighborhood of the already assigned pixels, where the type of neighborhood is determined by parameter neighborhood
which can take the values FourNeighborCode()
(the default) or EightNeighborCode()
. The algorithm basically works as follows (illustrated for 4-neighborhood, but 8-neighborhood works in the same way):
Find all candidate pixels that are 4-adjacent to a seed region. Calculate the cost for aggregating each candidate into its adjacent region and put the candidates into a priority queue.
While( priority queue is not empty and termination criterion is not fulfilled)
Take the candidate with least cost from the queue. If it has not already been merged, merge it with it's adjacent region.
Put all candidates that are 4-adjacent to the pixel just processed into the priority queue.
SRGType
can take the following values:
CompleteGrow
KeepContours
StopAtThreshold
max_cost
. KeepContours | StopAtThreshold
max_cost
. The cost is determined jointly by the source image and the region statistics functor. The source image contains feature values for each pixel which will be used by the region statistics functor to calculate and update statistics for each region and to calculate the cost for each candidate. The RegionStatisticsArray
must be compatible to the ArrayOfRegionStatistics functor and contains an array of statistics objects for each region. The indices must correspond to the labels of the seed regions. The statistics for the initial regions must have been calculated prior to calling seededRegionGrowing()
(for example by means of inspectTwoImagesIf()).
For each candidate x
that is adjacent to region i
, the algorithm will call stats[i].cost(as(x))
to get the cost (where x
is a SrcIterator
and as
is the SrcAccessor). When a candidate has been merged with a region, the statistics are updated by calling stats[i].operator()(as(x))
. Since the RegionStatisticsArray
is passed by reference, this will overwrite the original statistics.
If a candidate could be merged into more than one regions with identical cost, the algorithm will favour the nearest region. If StopAtThreshold
is active, and the cost of the current candidate at any point in the algorithm exceeds the optional max_cost
value (which defaults to NumericTraits<double>::max()
), region growing is aborted, and all voxels not yet assigned to a region remain unlabeled.
In some cases, the cost only depends on the feature value of the current pixel. Then the update operation will simply be a no-op, and the cost()
function returns its argument. This behavior is implemented by the SeedRgDirectValueFunctor. With SRGType == KeepContours
, this is equivalent to the watershed algorithm.
Declarations:
pass 2D array views:
Usage:
#include <vigra/seededregiongrowing.hxx>
Namespace: vigra
Example: implementation of the voronoi tesselation
Further requirements are determined by the RegionStatisticsArray
.
void vigra::seededRegionGrowing3D | ( | ... | ) |
Three-dimensional Region Segmentation by means of Seeded Region Growing.
This algorithm implements seeded region growing as described in
The seed image is a partly segmented multi-dimensional array which contains uniquely labeled regions (the seeds) and unlabeled voxels (the candidates, label 0). Seed regions can be as large as you wish and as small as one voxel. If there are no candidates, the algorithm will simply copy the seed array into the output array. Otherwise it will aggregate the candidates into the existing regions so that a cost function is minimized. Candidates are taken from the neighborhood of the already assigned pixels, where the type of neighborhood is determined by parameter neighborhood
which can take the values NeighborCode3DSix()
(the default) or NeighborCode3DTwentySix()
. The algorithm basically works as follows (illustrated for 6-neighborhood, but 26-neighborhood works in the same way):
Find all candidate pixels that are 6-adjacent to a seed region. Calculate the cost for aggregating each candidate into its adjacent region and put the candidates into a priority queue.
While( priority queue is not empty)
Take the candidate with least cost from the queue. If it has not already been merged, merge it with it's adjacent region.
Put all candidates that are 4-adjacent to the pixel just processed into the priority queue.
SRGType
can take the following values:
CompleteGrow
KeepContours
StopAtThreshold
max_cost
. KeepContours | StopAtThreshold
max_cost
. The cost is determined jointly by the source array and the region statistics functor. The source array contains feature values for each pixel which will be used by the region statistics functor to calculate and update statistics for each region and to calculate the cost for each candidate. The RegionStatisticsArray
must be compatible to the ArrayOfRegionStatistics functor and contains an array of statistics objects for each region. The indices must correspond to the labels of the seed regions. The statistics for the initial regions must have been calculated prior to calling seededRegionGrowing3D()
For each candidate x
that is adjacent to region i
, the algorithm will call stats[i].cost(as(x))
to get the cost (where x
is a SrcImageIterator
and as
is the SrcAccessor). When a candidate has been merged with a region, the statistics are updated by calling stats[i].operator()(as(x))
. Since the RegionStatisticsArray
is passed by reference, this will overwrite the original statistics.
If a candidate could be merged into more than one regions with identical cost, the algorithm will favour the nearest region. If StopAtThreshold
is active, and the cost of the current candidate at any point in the algorithm exceeds the optional max_cost
value (which defaults to NumericTraits<double>::max()
), region growing is aborted, and all voxels not yet assigned to a region remain unlabeled.
In some cases, the cost only depends on the feature value of the current voxel. Then the update operation will simply be a no-op, and the cost()
function returns its argument. This behavior is implemented by the SeedRgDirectValueFunctor.
Declarations:
pass 3D array views:
Usage:
#include <vigra/seededregiongrowing3d.hxx>
Namespace: vigra
See seededRegionGrowing() for an example
void vigra::convolveLine | ( | ... | ) |
Performs a 1-dimensional convolution of the source signal using the given kernel.
The KernelIterator must point to the center iterator, and the kernel's size is given by its left (kleft <= 0) and right (kright >= 0) borders. The signal must always be larger than the kernel. At those positions where the kernel does not completely fit into the signal's range, the specified BorderTreatmentMode is applied.
The signal's value_type (SrcAccessor::value_type) must be a linear space over the kernel's value_type (KernelAccessor::value_type), i.e. addition of source values, multiplication with kernel values, and NumericTraits must be defined. The kernel's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
If start
and stop
are non-zero, the relation 0 <= start < stop <= width
must hold (where width
is the length of the input array). The convolution is then restricted to that subrange, and it is assumed that the output array only refers to that subrange (i.e. id
points to the element corresponding to start
). If start
and stop
are both zero (the default), the entire array is convolved.
Declarations:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/separableconvolution.hxx>
Namespace: vigra
Required Interface:
If border == BORDER_TREATMENT_CLIP:
Preconditions:
If border == BORDER_TREATMENT_CLIP: Sum of kernel elements must be != 0.
void vigra::separableConvolveX | ( | ... | ) |
Performs a 1 dimensional convolution in x direction.
It calls convolveLine() for every row of the image. See convolveLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/separableconvolution.hxx>
Namespace: vigra
Preconditions:
w > std::max(kernel.right(), -kernel.left())
. border == BORDER_TREATMENT_CLIP
: The sum of kernel elements must be != 0. void vigra::separableConvolveY | ( | ... | ) |
Performs a 1 dimensional convolution in y direction.
It calls convolveLine() for every column of the image. See convolveLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/separableconvolution.hxx>
Namespace: vigra
Preconditions:
h > std::max(kernel.right(), -kernel.left())
. border == BORDER_TREATMENT_CLIP
: The sum of kernel elements must be != 0. void upwindImage | ( | ... | ) |
This function calculates discrete upwinding scheme proposed by J. Weickert (2002) in Coherence-Enhancing Show Filters.
This function calculates of the coherence enhancing shock filter proposed by J. Weickert (2002) in Coherence-Enhancing Show Filters.
This function calculates of the coherence enhancing shock filter proposed by J. Weickert (2002): Coherence-Enhancing Show Filters. It uses the structure tensor information of an image and an iterative discrete upwinding scheme instead of pure dilation and erosion to perform the necessary morphological operations on the image. An image is upwinded positively (dilation), if the given second src is positive. Otherwise it is upwinds negatively (eroded). The effect can be steered by an upwinding factor.
Declarations:
pass 2D array views:
Declarations:
pass 2D array views:
Usage:
#include <vigra/shockilter.hxx>
Namespace: vigra
Preconditions:
The image must be larger than the window size of the filter.
void vigra::readSIF | ( | const SIFImportInfo & | info, |
MultiArrayView< 3, float > | array | ||
) |
Read the image data specified by the given vigra::SIFImportInfo object and write them into the given 'array'.
The array must have the correct number of dimensions and shape for the dataset represented by 'info'.
Declaration:
Usage:
#include <vigra/sifImport.hxx>
Namespace: vigra
void vigra::readSIFBlock | ( | const SIFImportInfo & | info, |
Shape3 | offset, | ||
Shape3 | shape, | ||
MultiArrayView< 3, float > | array | ||
) |
Read parts of the image data from an Andor SIF file specified with an SIFImportInfo object and write them into the MultiArray array.
std::ostream& vigra::operator<< | ( | std::ostream & | os, |
const SIFImportInfo & | info | ||
) |
Output all information such as shutter, Temperature etc. as human readable output.
Usage:
#include <vigra/sifImport.hxx>
Namespace: vigra
void vigra::skeletonizeImage | ( | ... | ) |
Skeletonization of all regions in a labeled 2D image.
Declarations:
This function computes the skeleton for each region in the 2D label image labels and paints the results into the result image dest. Input label 0
is interpreted as background and always ignored. Skeletons will be marked with the same label as the corresponding region (unless options returnLength()
or returnSalience()
are selected, see below). Non-skeleton pixels will receive label 0
.
For each region, the algorithm proceeds in the following steps:
dontPrune()
is selected. pruneCenterLine()
is selected, delete all skeleton points that do not belong to the two longest tree branches and skip the remaining steps. length
attribute as the depth of the pixel's longest subtree. Compute its salience
attribute as the ratio between length
and distance
, where distance
is the pixel's distance to the nearest boundary point according to the distance transform. It holds that length >= 0.5
and salience >= 1.0
. length
and salience
of each segment as the maximum of these attributes among the pixels in the segment. When options returnLength()
or returnSalience()
are selected, skip the remaining steps and return the requested segment attribute in dest
. In this case, dest
's value_type
should be a floating point type to exactly accomodate the attribute values. pruneLength(threshold, preserve_topology)
: Retain only segments whose length attribute exceeds the given threshold
. When preserve_topology
is true (the defult), cycles around holes are preserved regardless of their length. Otherwise, they are pruned as well. pruneLengthRelative(threshold, preserve_topology)
: Like pruneLength()
, but the threshold is specified as a fraction of the maximum segment length in the present region. pruneSalience(threshold, preserve_topology)
: Retain only segments whose salience attribute exceeds the given threshold
. When preserve_topology
is true (the defult), cycles around holes are preserved regardless of their salience. Otherwise, they are pruned as well. pruneSalienceRelative(threshold, preserve_topology)
: Like pruneSalience()
, but the threshold is specified as a fraction of the maximum segment salience in the present region. pruneTopology(preserve_center)
: Retain only segments that are essential for the region's topology. If preserve_center
is true (the default), the eccentricity center is also preserved, even if it is not essential. Otherwise, it might be removed. The eccentricity center is always the only remaining point when the region has no holes. The skeleton has the following properties:
Remark: If you have an application where a skeleton graph would be more useful than a skeleton image, function skeletonizeImage()
can be changed/extended easily.
Usage:
#include <vigra/skeleton.hxx>
Namespace: vigra
void vigra::slantedEdgeMTF | ( | ... | ) |
Determine the magnitude transfer function of the camera.
This operator estimates the magnitude transfer function (MTF) of a camera by means of the slanted edge method described in:
ISO Standard No. 12233: "Photography - Electronic still picture cameras - Resolution measurements", 2000
The input must be an image that contains a single step edge with bright pixels on one side and dark pixels on the other. However, the intensity values must be neither saturated nor zero. The algorithms computes the MTF from the Fourier transform of the edge's derivative. Thus, if the actual MTF is anisotropic, the estimated MTF does actually only apply in the direction perpendicular to the edge - several edges at different orientations are required to estimate an anisotropic MTF.
The algorithm returns a sequence of frequency / attenuation pairs. The frequency axis is normalized so that the Nyquist frequency of the original image is 0.5. Since the edge's derivative is computed with subpixel accuracy, the attenuation can usually be computed for frequencies significantly above the Nyquist frequency as well. The MTF estimate ends at either the first zero crossing of the MTF or at frequency 1, whichever comes earlier.
The present implementation improves the original slanted edge algorithm according to ISO 12233 in a number of ways:
The edge is not required to run nearly vertically or horizontally (i.e. with a slant of approximately 5 degrees). The algorithm will automatically compute the edge's actual angle and adjust estimates accordingly. However, it is still necessary for the edge to be somewhat slanted, because subpixel-accurate estimation of the derivative is impossible otherwise (i.e. the edge position perpendicular to the edge direction must differ by at least 1 pixel between the two ends of the edge).
Our implementation uses a more accurate subpixel derivative algorithm. In addition, we first perform a shading correction in order to reduce possible derivative bias due to nonuniform illumination.
The source value type T1
must be a scalar type which is convertible to double
. The result is written into the result sequence, which must be back-insertable (supports push_back()
) and whose value_type
must be constructible from two double
values. Algorithm options can be set via the options object (see vigra::NoiseNormalizationOptions for details).
Declarations:
pass 2D array views:
Usage:
#include <vigra/slanted_edge_mtf.hxx>
Namespace: vigra
double vigra::mtfFitGaussian | ( | Vector const & | mtf | ) |
Fit a Gaussian function to a given MTF.
This function expects a sequence of frequency / attenuation pairs as produced by slantedEdgeMTF() and finds the best fitting Gaussian point spread function (Gaussian functions are good approximations of the PSF of many real cameras). It returns the standard deviation (scale) of this function. The algorithm computes the standard deviation by means of a linear least square on the logarithm of the MTF, i.e. an algebraic fit rather than a Euclidean fit - thus, the resulting Gaussian may not be the one that intuitively fits the data optimally.
Declaration:
Usage:
#include <vigra/slanted_edge_mtf.hxx>
Namespace: vigra
Required Interface:
unsigned int vigra::generateSlicSeeds | ( | ... | ) |
Generate seeds for SLIC superpixel computation in arbitrary dimensions.
The source array src must be a scalar boundary indicator such as the gradient magnitude. Seeds are initially placed on a regular Cartesian grid with spacing seedDist und then moved to the point with smallest boundary indicator within a search region of radius searchRadius around the initial position. The resulting points are then marked in the output array seeds by consecutive labels.
The function returns the number of selected seeds, which equals the largest seed label because labeling starts at 1.
Declaration:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/slic.hxx>
Namespace: vigra
For more details and examples see slicSuperpixels().
unsigned int vigra::slicSuperpixels | ( | ... | ) |
Compute SLIC superpixels in arbitrary dimensions.
This function implements the algorithm described in
R. Achanta et al.: "SLIC Superpixels Compared to State-of-the-Art Superpixel Methods", IEEE Trans. Patt. Analysis Mach. Intell. 34(11):2274-2281, 2012
The value type T
of the source array src must provide the necessary functionality to compute averages and squared distances (i.e. it must fulfill the requirements of a LinearSpace and support squaredNorm(T const &)). This is true for all scalar types as well as vigra::TinyVector and vigra::RGBValue. The output array labels will be filled with labels designating membership of each point in one of the superpixel regions.
The output array can optionally contain seeds (which will be overwritten by the output) to give you full control over seed placement. If labels is empty, seeds will be created automatically by an internal call to generateSlicSeeds().
The parameter seedDistance specifies the radius of the window around each seed (or, more precisely, around the present regions centers) where the algorithm looks for potential members of the corresponding superpixel. It thus places an upper limit on the superpixel size. When seeds are computed automatically, this parameter also determines the grid spacing for seed placement.
The parameter intensityScaling is used to normalize (i.e. divide) the color/intensity difference before it is compared with the spatial distance. This corresponds to parameter m in equation (2) of the paper.
The options object can be used to specify the number of iterations (SlicOptions::iterations()
) and an explicit minimal superpixel size (SlicOptions::minSize()
). By default, the algorithm merges all regions that are smaller than 1/4 of the average superpixel size.
The function returns the number of superpixels, which equals the largest label because labeling starts at 1.
Declaration:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/slic.hxx>
Namespace: vigra
This works for arbitrary-dimensional arrays.
void vigra::frostFilter | ( | ... | ) |
This function tries to reduce the speckle noise of an image by applying the basic Frost filter.
This function tries to reduce the speckle noise of an image by means of applying the basic Frost filter using a window of given size and a damping factor k. The implementation is according to the article by Lopez & Touzi & Nezry (1990): Adaptive speckle filters and scene heterogenity. The user has to provide a window size and a damping factor k. The implementation is according to the article by
Lopez & Touzi & Nezry (1990): Adaptive speckle filters and scene heterogenity.
All restrictions of the called functions applyWindowFunction apply.
Preconditions:
Declarations:
pass 2D array views:
Usage:
#include <vigra/specklefilters.hxx>
Namespace: vigra
void vigra::normalizedConvolveImage | ( | ... | ) |
Performs a 2-dimensional normalized convolution, i.e. convolution with a mask image.
This functions computes normalized convolution as defined in Knutsson, H. and Westin, C-F.: Normalized and differential convolution: Methods for Interpolation and Filtering of incomplete and uncertain data. Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition, 1993, 515-523.
The mask image must be binary and encodes which pixels of the original image are valid. It is used as follows: Only pixel under the mask are used in the calculations. Whenever a part of the kernel lies outside the mask, it is ignored, and the kernel is renormalized to its original norm (analogous to the CLIP BorderTreatmentMode). Thus, a useful convolution result is computed whenever at least one valid pixel is within the current window Thus, destination pixels not under the mask still receive a value if they are near the mask. Therefore, this algorithm is useful as an interpolator of sparse input data. If you are only interested in the destination values under the mask, you can perform a subsequent copyImageIf().
The KernelIterator must point to the center of the kernel, and the kernel's size is given by its upper left (x and y of distance <= 0) and lower right (distance >= 0) corners. The image must always be larger than the kernel. At those positions where the kernel does not completely fit into the image, the specified BorderTreatmentMode is applied. Only BORDER_TREATMENT_CLIP and BORDER_TREATMENT_AVOID are currently supported.
The images's pixel type (SrcAccessor::value_type) must be a linear space over the kernel's value_type (KernelAccessor::value_type), i.e. addition of source values, multiplication with kernel values, and NumericTraits must be defined. The kernel's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
Declarations:
pass 2D array views:
Usage:
#include <vigra/stdconvolution.hxx>
Namespace: vigra
Preconditions:
w > std::max(kernel.lowerRight().x, -kernel.upperLeft().x)
and h > std::max(kernel.lowerRight().y, -kernel.upperLeft().y)
. border == BORDER_TREATMENT_CLIP || border == BORDER_TREATMENT_AVOID
void vigra::convolveImageWithMask | ( | ... | ) |
Deprecated name of 2-dimensional normalized convolution, i.e. convolution with a mask image.
See normalizedConvolveImage() for documentation.
Declarations:
pass 2D array views:
void vigra::radialSymmetryTransform | ( | ... | ) |
Find centers of radial symmetry in an image.
This algorithm implements the Fast Radial Symmetry Transform according to [G. Loy, A. Zelinsky: "A Fast Radial Symmetry Transform for Detecting
Points of Interest", in: A. Heyden et al. (Eds.): Proc. of 7th European Conf. on Computer Vision, Part 1, pp. 358-368, Springer LNCS 2350, 2002]. Minima of the algorithm response mark dark blobs, maxima correspond to light blobs. The "radial strictness parameter" is fixed at alpha
= 2.0, the spatial spreading of the raw response is done by a Gaussian convolution at 0.25*scale
(these values are recommendations from the paper). Loy and Zelinsky additionally propose to add the operator response from several scales (see usage example below).
Declarations:
pass 2D array views:
Usage:
#include <vigra/symmetry.hxx>
Namespace: vigra
void vigra::vectorToTensor | ( | ... | ) |
Calculate the tensor (outer) product of a 2D vector with itself.
This function is useful to transform vector images into a tensor representation that can be used as input to tensor based processing and analysis functions (e.g. tensor smoothing). The input pixel type must be vectors of length 2, whereas the output must contain vectors of length 3 which will represent the tensor components in the order t11, t12 (== t21 due to symmetry), t22.
Note: In order to account for the left-handedness of the image coordinate system, the second tensor component (t12) can be negated by setting negateComponent2 = false
. Angles will then be interpreted counter-clockwise rather than clockwise. By default, this behavior is switched off.
Declarations:
pass 2D array views:
Usage:
#include <vigra/tensorutilities.hxx>
Namespace: vigra
void vigra::tensorEigenRepresentation | ( | ... | ) |
Calculate eigen representation of a symmetric 2x2 tensor.
This function turns a 3-band image representing the tensor components t11, t12 (== t21 due to symmetry), t22 into the a 3-band image holding the eigen representation e1, e2, and angle, where e1 > e2. When the tensor is defined in a left-handed coordinate system (the default on images), the angle will then be given in clockwise orientation, starting at the x-axis. Otherwise, it will be given in counter-clockwise orientation.
Declarations:
pass 2D array views:
Usage:
#include <vigra/tensorutilities.hxx>
Namespace: vigra
void vigra::tensorTrace | ( | ... | ) |
Calculate the trace of a 2x2 tensor.
This function turns a 3-band image representing the tensor components t11, t12 (== t21 due to symmetry), t22 into the a 1-band image holding the tensor trace t11 + t22.
Declarations:
pass 2D array views:
Usage:
#include <vigra/tensorutilities.hxx>
Namespace: vigra
void vigra::tensorToEdgeCorner | ( | ... | ) |
Decompose a symmetric 2x2 tensor into its edge and corner parts.
This function turns a 3-band image representing the tensor components t11, t12 (== t21 due to symmetry), t22 into the a 2-band image holding the tensor's edgeness (difference of the tensor's eigenvalues) and orientation, and a 1-band image representing its corner part (equal to the twice the small eigen value). The original tensor must be positive definite and defined in a right-handed coordinate system (e.g. the tensor resulting from boundaryTensor()).
Declarations:
pass 2D array views:
Usage:
#include <vigra/tensorutilities.hxx>
Namespace: vigra
void vigra::parallel_foreach | ( | ... | ) |
Apply a functor to all items in a range in parallel.
Declarations:
Create a thread pool (or use an existing one) to apply the functor
[begin, end)
in parallel. size_t
and T
, where the first argument is the thread index (starting at 0) and T is convertible from the iterator's reference_type
(i.e. the result of *begin
).If the iterators are forward iterators (std::forward_iterator_tag
), you can provide the optional argument nItems
to avoid the a std::distance(begin, end)
call to compute the range's length.
Parameter nThreads
controls the number of threads. parallel_foreach
will split the work into about three times as many parallel tasks. If nThreads = ParallelOptions::Auto
, the number of threads is set to the machine default (std::thread::hardware_concurrency()
).
If nThreads = 0
, the function will not use threads, but will call the functor sequentially. This can also be enforced by setting the preprocessor flag VIGRA_SINGLE_THREADED
, ignoring the value of nThreads
(useful for debugging).
Usage:
void vigra::importTiffImage | ( | ... | ) |
Read a given TIFF image.
This function calls tiffToScalarImage() or tiffToRGBImage(), depending on the destinations's value_type. Usually, it is better to use importImage(). importTiffImage() should only be used if explicit access to the TIFF object TiffImage
is required.
Declarations:
pass 2D array views:
Usage:
#include <vigra/tiff.hxx>
Namespace: vigra
Required Interface:
see tiffToScalarImage() and tiffToRGBImage()
Preconditions:
see tiffToScalarImage() and tiffToRGBImage()
void vigra::tiffToScalarImage | ( | ... | ) |
Convert single-band TiffImage to scalar image.
Note that unexpected results can occur when the destination pixel type is weaker than the pixel type in the file (e.g. when a float
file is imported into a unsigned char
image).
Declarations:
pass 2D array views:
Usage:
#include <vigra/tiff.hxx>
Namespace: vigra
Preconditions:
The output array must have the correct shape.
void vigra::tiffToRGBImage | ( | ... | ) |
Import a RGB (3-band or color-mapped) TiffImage into a RGB image.
Note that unexpected results can occur when the destination pixel type is weaker than the pixel type in the file (e.g. when a float
file is imported into a unsigned char
image).
Declarations:
pass 2D array views:
Usage:
#include <vigra/tiff.hxx>
Namespace: vigra
Preconditions:
The destination image must have the appropriate size.
void vigra::createTiffImage | ( | ... | ) |
Create a TiffImage from the given iterator range.
Type and size of the TiffImage are determined by the input image. Currently, the function can create scalar images and RGB images of type unsigned char, short, int, float, and double.
Usually, it is better to use exportImage(). createTiffImage() should only be used if explicit access to the TIFF object TiffImage
is required.
Declarations:
pass 2D array views:
Usage:
#include <vigra/tiff.hxx>
Namespace: vigra
void vigra::createScalarTiffImage | ( | ... | ) |
Create a single-band TiffImage from the given scalar image.
Type and size of the TiffImage are determined by the input image (may be one of unsigned char, short, int, float, or double).
Declarations:
pass 2D array views:
Usage:
#include <vigra/tiff.hxx>
Namespace: vigra
void vigra::createRGBTiffImage | ( | ... | ) |
Create a 3-band TiffImage from the given RGB image.
Type and size of the TiffImage are determined by the input image (may be one of unsigned char, int, float, or double).
Declarations:
pass 2D array views:
Usage:
#include <vigra/tiff.hxx>
Namespace: vigra
TinyVector<V, SIZE> vigra::operator- | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |
Unary negation (construct TinyVector with negative values)
TinyVector<V, SIZE> vigra::ceil | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |
Apply ceil() function to each vector component.
TinyVector<V, SIZE> vigra::floor | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |
Apply floor() function to each vector component.
TinyVector<V, SIZE> vigra::round | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |
Apply round() function to each vector component.
TinyVector<std::ptrdiff_t, SIZE> vigra::roundi | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |
Apply roundi() function to each vector component, i.e. return an integer vector.
TinyVector<V, SIZE> vigra::sqrt | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |
Apply sqrt() function to each vector component.
TinyVector<V, SIZE> vigra::pow | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v, |
E | exponent | ||
) |
Apply pow() function to each vector component.
TinyVector<V, SIZE> vigra::transpose | ( | TinyVector< V, SIZE > const & | t, |
TinyVector< T, SIZE > const & | permutation | ||
) |
transposed copy
Elements are arranged such that res[k] = t[permutation[k]]
.
TinyVector<V, SIZE> vigra::clipLower | ( | TinyVector< V, SIZE > const & | t | ) |
Clip negative values.
All elements smaller than 0 are set to zero.
TinyVector<V, SIZE> vigra::clipLower | ( | TinyVector< V, SIZE > const & | t, |
const V | val | ||
) |
Clip values below a threshold.
All elements smaller than val are set to val.
TinyVector<V, SIZE> vigra::clipUpper | ( | TinyVector< V, SIZE > const & | t, |
const V | val | ||
) |
Clip values above a threshold.
All elements bigger than val are set to val.
TinyVector<V, SIZE> vigra::clip | ( | TinyVector< V, SIZE > const & | t, |
const V | valLower, | ||
const V | valUpper | ||
) |
Clip values to an interval.
All elements less than valLower are set to valLower, all elements bigger than valUpper are set to valUpper.
TinyVector<V, SIZE> vigra::clip | ( | TinyVector< V, SIZE > const & | t, |
TinyVector< V, SIZE > const & | valLower, | ||
TinyVector< V, SIZE > const & | valUpper | ||
) |
Clip values to a vector of intervals.
All elements less than valLower are set to valLower, all elements bigger than valUpper are set to valUpper.
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.
void vigra::totalVariationFilter | ( | ... | ) |
Performs standard Total Variation Regularization.
The algorithm minimizes
where are the two dimensional noisy data,
are the smoothed data,
is the filter parameter and
is the total variation semi-norm.
Declarations:
totalVariationFilter() implements a primal-dual algorithm to solve (1).
Input:
data: | input data to be smoothed. |
alpha: | smoothing parameter. |
steps: | maximal number of iteration steps. |
eps: | The algorithm stops, if the primal-dual gap is below the threshold eps. |
Output:
out contains the filtered data.
In addition, a point-wise weight ( ) for the data term can be provided (overloaded function).
Usage:
#include <vigra/tv_filter.hxx>
or
void vigra::getAnisotropy | ( | ... | ) |
Sets up directional data for anisotropic regularization.
This routine provides a two-dimensional normalized vector field , which is normal to edges in the given data, found as the eigenvector of the structure tensor belonging to the largest eigenvalue.
is encoded by a scalar field
of angles, i.e.
.
In addition, two scalar fields and
are generated from scalar parameters
and
, such that
![]() |
![]() |
![]() |
Declarations:
Output:
Three scalar fields phi, alpha and beta. |
Input:
data: | two-dimensional scalar field. |
alpha_par,beta_par: | two positive values for setting up the scalar fields alpha and beta |
sigma_par: | non-negative parameter for presmoothing the data. |
rho_par: | non-negative parameter for presmoothing the structure tensor. |
K_par: | positive edge sensitivity parameter. |
(see anisotropicTotalVariationFilter() and secondOrderTotalVariationFilter() for usage in an application).
void vigra::anisotropicTotalVariationFilter | ( | ... | ) |
Performs Anisotropic Total Variation Regularization.
The algorithm minimizes
where are the noisy data,
are the smoothed data,
is the image gradient in the sense of Total Variation and
is a locally varying symmetric, positive definite 2x2 matrix.
Matrix is described by providing for each data point a normalized eigenvector (via angle
) and two eigenvalues
and
.
getAnisotropy() can be use to set up such data by providing a vector field normal to edges.
Declarations:
anisotropicTotalVariationFilter() implements a primal-dual algorithm to solve (2).
Input:
data: | input data to be filtered. |
steps: | iteration steps. |
weight : | a point-wise weight ( ![]() |
phi,alpha and beta : | describe matrix ![]() |
Output:
out : | contains filtered data. |
Usage:
E.g. with a solution-dependent adaptivity cf. [1], by updating the matrix in an outer loop:
#include <vigra/tv_filter.hxx>
[1] Frank Lenzen, Florian Becker, Jan Lellmann, Stefania Petra and Christoph Schnörr, A Class of Quasi-Variational Inequalities for Adaptive Image Denoising and Decomposition, Computational Optimization and Applications, Springer, 2012.
void vigra::secondOrderTotalVariationFilter | ( | ... | ) |
Performs Anisotropic Total Variation Regularization.
The algorithm minimizes
where are the noisy data,
are the smoothed data,
is the image gradient in the sense of Total Variation,
is a locally varying symmetric, positive-definite 2x2 matrix and
is the Frobenius norm of the Hessian of
.
Matrix is described by providing for each data point a normalized eigenvector (via angle
) and two eigenvalues
and
. getAnisotropy() can be use to set up such data
by providing a vector field normal to edges.
is the locally varying regularization parameter for second order.
Declarations:
secondOrderTotalVariationFilter() implements a primal-dual algorithm to solve (3).
Input:
data: | the input data to be filtered. |
steps : | number of iteration steps. |
out : | contains the filtered data. |
weight : | point-wise weight ( ![]() |
phi,alpha,beta: | describe matrix ![]() |
xedges and yedges : | binary arrays indicating the presence of horizontal (between (x,y) and (x+1,y)) and vertical edges (between (x,y) and (x,y+1)). These data are considered in the calculation of ![]() |
Usage:
E.g. with a solution-dependent adaptivity (cf.[1]), by updating the matrix in an outer loop:
#include <vigra/tv_filter.hxx>
[1] Frank Lenzen, Florian Becker, Jan Lellmann, Stefania Petra and Christoph Schnörr, A Class of Quasi-Variational Inequalities for Adaptive Image Denoising and Decomposition, Computational Optimization and Applications, Springer, 2012.
void vigra::principalComponents | ( | MultiArrayView< 2, T, C1 > const & | features, |
MultiArrayView< 2, T, C2 > | fz, | ||
MultiArrayView< 2, T, C3 > | zv | ||
) |
Decompose a matrix according to the PCA algorithm.
This function implements the PCA algorithm (principal component analysis).
(numFeatures * numSamples)
, which is decomposed into the matrices (numFeatures * numComponents)
and (numComponents * numSamples)
such that
(this formula requires that the features have been centered around the mean by linalg::prepareRows (features, features, ZeroMean)
).
The shape parameter numComponents
determines the complexity of the decomposition model and therefore the approximation quality (if numComponents == numFeatures
, the representation becomes exact). Intuitively, fz
is a projection matrix from the reduced space into the original space, and zv
is the reduced representation of the data, using just numComponents
features.
Declaration:
#include <vigra/unsupervised_decomposition.hxx>
Usage:
void vigra::pLSA | ( | ... | ) |
Decompose a matrix according to the pLSA algorithm.
This function implements the pLSA algorithm (probabilistic latent semantic analysis) proposed in
T. Hofmann: "Probabilistic Latent Semantic Analysis", in: UAI'99, Proc. 15th Conf. on Uncertainty in Artificial Intelligence, pp. 289-296, Morgan Kaufmann, 1999
(numFeatures * numSamples)
and non-negative entries, which is decomposed into the matrices (numFeatures * numComponents)
and (numComponents * numSamples)
such that
(this formula applies when pLSA is called with PLSAOptions.normalizedComponentWeights(false)
. Otherwise, you must normalize the features by calling linalg::prepareColumns (features, features, UnitSum)
to make the formula hold).
The shape parameter numComponents
determines the complexity of the decomposition model and therefore the approximation quality. Intuitively, features are a set of words, and the samples a set of documents. The entries of the features
matrix denote the relative frequency of the words in each document. The components represents a (presumably small) set of topics. The matrix fz
encodes the relative frequency of words in the different topics, and the matrix zv
encodes to what extend each topic explains the content of each document.
The option object determines the iteration termination conditions and the output normalization. In addition, you may pass a random number generator to pLSA() which is used to create the initial solution.
Declarations:
#include <vigra/unsupervised_decomposition.hxx>
Usage:
std::string vigra::asString | ( | T | t | ) |
Convert a value to a string. Available for integral and floating point types and void *.
std::string vigra::tolower | ( | std::string | s | ) |
Convert string to lower case.
std::string vigra::normalizeString | ( | std::string const & | s | ) |
Convert string to lower case and remove any white space characters.
void vigra::for_each_in_tuple | ( | TPL && | t, |
FUNCTOR && | f | ||
) |
The for_each_in_tuple function calls the functor f on all elements of the tuple t. For each element type in the tuple, the functor must have an appropriate overload of operator().
Example:
void vigra::separableVectorDistance | ( | ... | ) |
Compute the vector distance transform of a N-dimensional binary array.
Declarations:
This function works like separableMultiDistance() (see there for details), but returns in each pixel the vector to the nearest background pixel rather than the scalar distance. This enables much more powerful applications.
Usage:
#include <vigra/vector_distance.hxx>
Namespace: vigra
void vigra::boundaryVectorDistance | ( | ... | ) |
Compute the vector distance transform to the implicit boundaries of a multi-dimensional label array.
Declarations:
This function works like boundaryMultiDistance() (see there for details), but returns in each pixel the vector to the nearest boundary pixel rather than the scalar distance. This enables much more powerful applications. Additionally, it support a pixelPitch
parameter which allows to adjust the distance calculations for anisotropic grid resolution.
Usage:
#include <vigra/vector_distance.hxx>
Namespace: vigra
AtVolumeBorder vigra::isAtVolumeBorder | ( | int | x, |
int | y, | ||
int | z, | ||
int | width, | ||
int | height, | ||
int | depth | ||
) |
Find out whether a voxel is at the volume border.
This function checks if x == 0 or x == width - 1 and y == 0 or y == height - 1 and so on and returns the appropriate value of vigra::AtVolumeBorder, or zero when the voxel is not at te volume border. The behavior of the function is undefined if (x,y,z) is not inside the volume.
AtVolumeBorder vigra::isAtVolumeBorderAntiCausal | ( | int | x, |
int | y, | ||
int | z, | ||
int | width, | ||
int | height, | ||
int | depth | ||
) |
Find out whether a voxel is at a scan-order relevant volume border. This function checks if x == 0 or y == 0 or z == 0 and returns the appropriate value of vigra::AtVolumeBorder, or zero when the voxel is not at te volume border. The behavior of the function is undefined if (x,y,z) is not inside the volume.
TODO: Write new comment
unsigned int vigra::generateWatershedSeeds | ( | ... | ) |
Generate seeds for watershed computation and seeded region growing.
The source image is a boundary indicator such as the gradient magnitude or the trace of the boundaryTensor(). Seeds are generally generated at locations where the boundaryness (i.e. the likelihood of the point being on the boundary) is very small. In particular, seeds can be placed by either looking for local minima (possibly including minimal plateaus) of the boundaryness, of by looking at level sets (i.e. regions where the boundaryness is below a threshold). Both methods can also be combined, so that only minima below a threshold are returned. The particular seeding strategy is specified by the options
object (see SeedOptions).
The pixel type of the input image must be LessThanComparable
. The pixel type of the output image must be large enough to hold the labels for all seeds. (typically, you will use UInt32
). The function will label seeds by consecutive integers (starting from 1) and returns the largest label it used.
Pass IndirectNeighborhood or DirectNeighborhood (first form of the function) or vigra::EightNeighborCode or vigra::FourNeighborCode (second and third forms) to determine the neighborhood where pixel values are compared.
Declarations:
use arbitrary-dimensional arrays:
Usage:
#include <vigra/multi_watersheds.hxx> (MultiArray variant)
#include <vigra/watersheds.hxx> (deprecated variants)
Namespace: vigra
For detailed examples see watershedsMultiArray() and watershedsRegionGrowing().
unsigned int vigra::watershedsUnionFind | ( | ... | ) |
Region segmentation by means of the union-find watershed algorithm.
Note: This function is largely obsolete, watershedsMultiArray() should be preferred unless top speed is required.
This function implements the union-find version of the watershed algorithms described as algorithm 4.7 in
J. Roerdink, R. Meijster: "The watershed transform: definitions, algorithms, and parallelization strategies", Fundamenta Informaticae, 41:187-228, 2000
The source image is a boundary indicator such as the gaussianGradientMagnitude() or the trace of the boundaryTensor(). Local minima of the boundary indicator are used as region seeds, and all other pixels are recursively assigned to the same region as their lowest neighbor. Pass vigra::EightNeighborCode or vigra::FourNeighborCode to determine the neighborhood where pixel values are compared. The pixel type of the input image must be LessThanComparable
. The function uses accessors.
Note that VIGRA provides an alternative implementation of the watershed transform via watershedsRegionGrowing(). It is slower, but offers many more configuration options.
Declarations:
pass 2D array views:
Usage:
#include <vigra/watersheds.hxx>
Namespace: vigra
Example: watersheds of the gradient magnitude.
unsigned int vigra::watershedsRegionGrowing | ( | ... | ) |
Region segmentation by means of a flooding-based watershed algorithm.
Note: This function is largely obsolete, watershedsMultiArray() should be preferred unless top speed is required.
This function implements variants of the watershed algorithm described in
L. Vincent and P. Soille: "Watersheds in digital spaces: An efficient algorithm based on immersion simulations", IEEE Trans. Patt. Analysis Mach. Intell. 13(6):583-598, 1991
The source image is a boundary indicator such as the gaussianGradientMagnitude() or the trace of the boundaryTensor(), and the destination is a label image designating membership of each point in one of the regions. Plateaus in the boundary indicator (i.e. regions of constant gray value) are handled via a Euclidean distance transform by default.
By default, the destination image is assumed to hold seeds for a seeded watershed transform. Seeds may, for example, be created by means of generateWatershedSeeds(). Note that the seeds will be overridden with the final watershed segmentation.
Alternatively, you may provide SeedOptions in order to instruct watershedsRegionGrowing() to generate its own seeds (it will call generateWatershedSeeds() internally). In that case, the destination image should be zero-initialized.
You can specify the neighborhood system to be used by passing FourNeighborCode or EightNeighborCode (default).
Further options to be specified via WatershedOptions are:
[0, ..., bucket_count-1]
, where bucket_count
is specified in the options object), it only supports complete growing (no contour between regions is possible), and it handles plateaus in a simplistic way. It also saves some memory because it allocates less temporary storage. Note that VIGRA provides an alternative implementation of the watershed transform via watershedsUnionFind().
Declarations:
pass 2D array views:
Usage:
#include <vigra/watersheds.hxx>
Namespace: vigra
Example: watersheds of the gradient magnitude.
unsigned int vigra::watersheds3D | ( | ... | ) |
Region Segmentation by means of the watershed algorithm.
This function is deprecated, use watershedsMultiArray() instead.
Declarations:
This function implements the union-find version of the watershed algorithms as described in
J. Roerdink, R. Meijster: "The watershed transform: definitions, algorithms, and parallelization strategies", Fundamenta Informaticae, 41:187-228, 2000
The source volume is a boundary indicator such as the gradient magnitude of the trace of the boundaryTensor(). Local minima of the boundary indicator are used as region seeds, and all other voxels are recursively assigned to the same region as their lowest neighbor. Pass vigra::NeighborCode3DSix or vigra::NeighborCode3DTwentySix to determine the neighborhood where voxel values are compared. The voxel type of the input volume must be LessThanComparable
.
Usage:
#include <vigra/watersheds3D.hxx>
Namespace: vigra
Example: watersheds3D of the gradient magnitude.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |