Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Typedefs | Functions
utils.h File Reference

functions to manage ROI's More...

#include <hugin_math/hugin_math.h>
#include <vigra/rgbvalue.hxx>
#include <vigra/transformimage.hxx>
#include <vigra/codec.hxx>
#include <cmath>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vigra::PromoteTraits< RGBValue< T1, R, G, B >, T2 >
 
struct  vigra_ext::LUTTraits< T1 >
 
struct  vigra_ext::PointPairT< VALUE >
 
struct  vigra_ext::ValueTypeTraits< T1 >
 
class  vigra_ext::FindComponentsMinMax< VALUETYPE >
 
struct  vigra_ext::OverlapSizeCounter
 count pixels that are > 0 in both images More...
 
struct  vigra_ext::NestFunctor< F1, F2 >
 functor to combine two functors: result = f1( f2(v) ) More...
 
struct  vigra_ext::MaskPixelCounter
 count pixels that are > 0 in a single image More...
 
struct  vigra_ext::PassThroughFunctor< T >
 does nothing More...
 
struct  vigra_ext::LinearTransform< DestValueType >
 
struct  vigra_ext::ApplyLogFunctor
 
struct  vigra_ext::ApplyGammaFunctor< TIn, TOut >
 
struct  vigra_ext::ApplyGammaFunctor< vigra::UInt16, vigra::UInt8 >
 

Namespaces

 vigra
 Implementation of fast vector type with support of linear algebra operations Copyright (C) 2009 Lukáš Jirkovský l.jir.nosp@m.kovs.nosp@m.ky@gm.nosp@m.ail..nosp@m.com
 
 vigra_ext
 

Macros

#define LUT_TRAITS(T1, Smin, Smax)
 Traits to define the maximum value for all types. More...
 
#define VT_TRAITS_VEC(T1)
 
#define VT_TRAITS(T1)
 

Typedefs

typedef PointPairT< float > vigra_ext::PointPair
 
typedef PointPairT
< vigra::RGBValue< float > > 
vigra_ext::PointPairRGB
 

Functions

 vigra_ext::LUT_TRAITS (unsigned char, 0, UCHAR_MAX)
 
 vigra_ext::LUT_TRAITS (signed char, SCHAR_MIN, SCHAR_MAX)
 
 vigra_ext::LUT_TRAITS (unsigned short, 0, USHRT_MAX)
 
 vigra_ext::LUT_TRAITS (signed short, SHRT_MIN, SHRT_MAX)
 
 vigra_ext::LUT_TRAITS (unsigned int, 0, UINT_MAX)
 
 vigra_ext::LUT_TRAITS (signed int, INT_MIN, INT_MAX)
 
 vigra_ext::LUT_TRAITS (float, 0.0f, 1.0f)
 
 vigra_ext::LUT_TRAITS (double, 0.0, 1.0)
 
double vigra_ext::getMaxValForPixelType (const std::string &v)
 
 vigra_ext::VT_TRAITS (vigra::UInt8)
 
 vigra_ext::VT_TRAITS (vigra::Int16)
 
 vigra_ext::VT_TRAITS (vigra::UInt16)
 
 vigra_ext::VT_TRAITS (vigra::Int32)
 
 vigra_ext::VT_TRAITS (vigra::UInt32)
 
 vigra_ext::VT_TRAITS (float)
 
 vigra_ext::VT_TRAITS (double)
 
float vigra_ext::pow (float a, double b)
 
template<class T , unsigned int R, unsigned int G, unsigned int B>
vigra::RGBValue< T, R, G, B > vigra_ext::pow (vigra::RGBValue< T, R, G, B > const &v, double e)
 component-wise absolute value More...
 
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 >
vigra::RGBValue< V1, R, G, B > & vigra_ext::operator+= (vigra::RGBValue< V1, R, G, B > &l, V2 const &r)
 add a scalar to all components More...
 
template<class T , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
vigra::RGBValue< T, RIDX, GIDX,
BIDX > 
vigra_ext::log (vigra::RGBValue< T, RIDX, GIDX, BIDX > const &v)
 component-wise logarithm More...
 
template<class T , unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
vigra::RGBValue< T, RIDX, GIDX,
BIDX > 
vigra_ext::log10 (vigra::RGBValue< T, RIDX, GIDX, BIDX > const &v)
 component-wise logarithm More...
 
template<class V1 , unsigned int R, unsigned int G, unsigned int B, class V2 >
vigra::PromoteTraits
< vigra::RGBValue< V1, R, G, B >
, V2 >::Promote 
vigra_ext::operator+ (vigra::RGBValue< V1, R, G, B > const &r1, V2 const &r2)
 add a scalar to all components More...
 
template<class V , int SIZE, class D1 , class D2 >
vigra::TinyVector< V, SIZE > vigra_ext::pow (vigra::TinyVector< V, SIZE > const &v, double e)
 Apply pow() function to each vector component. More...
 
template<class V , int SIZE, class D1 , class D2 >
vigra::TinyVector< V, SIZE > vigra_ext::log (vigra::TinyVector< V, SIZE > const &v, double e)
 Apply log() function to each vector component. More...
 
template<class V >
vigra_ext::getMaxComponent (vigra::RGBValue< V > const &v)
 get the maximum component of a vector (also works for single pixel types...) More...
 
template<class V >
vigra_ext::getMaxComponent (V v)
 get the maximum component of a vector (also works for single pixel types...) More...
 
template<class V >
vigra_ext::getMinComponent (vigra::RGBValue< V > const &v)
 get the maximum component of a vector (also works for single pixel types...) More...
 
template<class V >
vigra_ext::getMinComponent (V v)
 get the maximum component of a vector (also works for single pixel types...) More...
 
template<class ImgIter , class ImgAccessor , class AlphaIter , class AlphaAccessor >
void vigra_ext::applyExposureClipMask (vigra::triple< ImgIter, ImgIter, ImgAccessor > image, vigra::triple< AlphaIter, AlphaIter, AlphaAccessor > mask, double lowerLimit, double upperLimit)
 
template<class SrcImageIterator , class SrcAccessor >
void vigra_ext::circularCrop (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > img, hugin_utils::FDiff2D middle, double radius)
 Apply a circular crop to img. More...
 
template<class T >
vigra::NumericTraits< T >
::RealPromote 
vigra_ext::normalizeValue (T v, vigra::VigraTrueType)
 normalize a pixel to 0..1 Only has an effect on integer pixel types More...
 
template<class T >
vigra::NumericTraits< T >
::RealPromote 
vigra_ext::normalizeValue (T v, vigra::VigraFalseType)
 
template<class SrcIterator , class SrcAccessor , class DestIterator , class DestAccessor , class T >
void vigra_ext::applyMapping (vigra::triple< SrcIterator, SrcIterator, SrcAccessor > img, vigra::pair< DestIterator, DestAccessor > dest, T min, T max, int mapping)
 
template<class SrcImageIterator , class SrcAccessor , class DestImageIterator , class DestAccessor , class Functor >
void vigra_ext::transformImageSpatial (SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestAccessor da, Functor const &f, vigra::Diff2D ul)
 
template<class SrcImageIterator , class SrcAccessor , class DestImageIterator , class DestAccessor , class Functor >
void vigra_ext::transformImageSpatial (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > src, vigra::pair< DestImageIterator, DestAccessor > dest, Functor const &f, vigra::Diff2D ul)
 
template<class ImageType >
void vigra_ext::ConvertTo8Bit (ImageType &image)
 converts to given image to fit into 0..255 More...
 

Detailed Description

functions to manage ROI's

Author
Pablo d'Angelo pablo.nosp@m..dan.nosp@m.gelo@.nosp@m.web..nosp@m.de

$Id$

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License along with this software. If not, see http://www.gnu.org/licenses/.

Definition in file utils.h.

Macro Definition Documentation

#define LUT_TRAITS (   T1,
  Smin,
  Smax 
)
Value:
template<> \
struct LUTTraits<T1> \
{ \
static T1 max() \
{ \
return Smax; \
} \
static T1 min() \
{ \
return Smin; \
} \
}; \
template<> \
struct LUTTraits<vigra::RGBValue<T1> > \
{ \
static T1 max() \
{ \
return Smax; \
} \
static T1 min() \
{ \
return Smin; \
} \
};
static T max(T x, T y)
Definition: svm.cpp:65
static T min(T x, T y)
Definition: svm.cpp:62

Traits to define the maximum value for all types.

The case of float and double differs from vigra::NumericTraits::max()

Definition at line 49 of file utils.h.

#define VT_TRAITS (   T1)
Value:
template<> \
struct ValueTypeTraits<T1> \
{ \
typedef T1 value_type; \
};

Definition at line 143 of file utils.h.

#define VT_TRAITS_VEC (   T1)
Value:
template<> \
struct ValueTypeTraits<vigra::RGBValue<T1, 0u, 1u, 2u> > \
{ \
typedef vigra::RGBValue<T1, 0u, 1u, 2u>::value_type value_type; \
};

Definition at line 136 of file utils.h.