HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage > Class Template Reference

struct to hold a image state for stitching More...

#include <RemappedPanoImage.h>

Inheritance diagram for HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef RemapImage::value_type image_value_type
typedef RemapImage::traverser image_traverser
typedef RemapImage::const_traverser const_image_traverser
typedef RemapImage::Accessor ImageAccessor
typedef RemapImage::ConstAccessor ConstImageAccessor
typedef AlphaImage::value_type mask_value_type
typedef AlphaImage::traverser mask_traverser
typedef AlphaImage::const_traverser const_mask_traverser
typedef AlphaImage::Accessor MaskAccessor
typedef AlphaImage::ConstAccessor ConstMaskAccessor
typedef vigra_ext::ValueTypeTraits<
image_value_type >::value_type 
component_type

Public Member Functions

 RemappedPanoImage ()
 create a remapped pano image
void setPanoImage (const SrcPanoImage &src, const PanoramaOptions &dest, vigra::Rect2D roi)
template<class DistImgType>
void calcSrcCoordImgs (DistImgType &imgX, DistImgType &imgY)
 calculate distance map.
void calcAlpha ()
 calculate only the alpha channel.
template<class ImgIter, class ImgAccessor>
void remapImage (vigra::triple< ImgIter, ImgIter, ImgAccessor > srcImg, vigra_ext::Interpolator interpol, AppBase::MultiProgressDisplay &progress)
 remap a image without alpha channel
template<class ImgIter, class ImgAccessor, class AlphaIter, class AlphaAccessor>
void remapImage (vigra::triple< ImgIter, ImgIter, ImgAccessor > srcImg, std::pair< AlphaIter, AlphaAccessor > alphaImg, vigra_ext::Interpolator interp, AppBase::MultiProgressDisplay &progress)
 remap a image, with alpha channel

Public Attributes

vigra::ImageImportInfo::ICCProfile m_ICCProfile

Protected Attributes

SrcPanoImage m_srcImg
PanoramaOptions m_destImg
PTools::Transform m_transf

Private Types

typedef vigra_ext::ROIImage<
RemapImage, AlphaImage > 
Base

Detailed Description

template<class RemapImage, class AlphaImage>
class HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >

struct to hold a image state for stitching

Definition at line 72 of file RemappedPanoImage.h.


Member Typedef Documentation

template<class RemapImage, class AlphaImage>
typedef vigra_ext::ROIImage<RemapImage, AlphaImage> HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::Base [private]

Definition at line 75 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef vigra_ext::ValueTypeTraits<image_value_type>::value_type HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::component_type

Definition at line 91 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef RemapImage::const_traverser HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::const_image_traverser

Definition at line 81 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef AlphaImage::const_traverser HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::const_mask_traverser

Definition at line 87 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef RemapImage::ConstAccessor HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::ConstImageAccessor

Definition at line 83 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef AlphaImage::ConstAccessor HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::ConstMaskAccessor

Definition at line 89 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef RemapImage::traverser HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::image_traverser

Reimplemented from vigra_ext::ROIImage< RemapImage, AlphaImage >.

Definition at line 80 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef RemapImage::value_type HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::image_value_type

Reimplemented from vigra_ext::ROIImage< RemapImage, AlphaImage >.

Definition at line 79 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef RemapImage::Accessor HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::ImageAccessor

Reimplemented from vigra_ext::ROIImage< RemapImage, AlphaImage >.

Definition at line 82 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef AlphaImage::traverser HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::mask_traverser

Reimplemented from vigra_ext::ROIImage< RemapImage, AlphaImage >.

Definition at line 86 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef AlphaImage::value_type HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::mask_value_type

Reimplemented from vigra_ext::ROIImage< RemapImage, AlphaImage >.

Definition at line 85 of file RemappedPanoImage.h.

template<class RemapImage, class AlphaImage>
typedef AlphaImage::Accessor HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::MaskAccessor

Reimplemented from vigra_ext::ROIImage< RemapImage, AlphaImage >.

Definition at line 88 of file RemappedPanoImage.h.


Constructor & Destructor Documentation

template<class RemapImage, class AlphaImage>
HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::RemappedPanoImage (  )  [inline]

create a remapped pano image

the actual remapping is done by the remapImage() function.

Definition at line 99 of file RemappedPanoImage.h.


Member Function Documentation

template<class RemapImage, class AlphaImage>
void HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcAlpha (  ) 

calculate only the alpha channel.

works for arbitrary transforms, with holes and so on, but is very crude and slow (remapps all image pixels...)

better transform all images, and get the alpha channel for free!

setPanoImage() should be called before.

Definition at line 380 of file RemappedPanoImage.h.

References vigra_ext::ROIImage< RemapImage, AlphaImage >::boundingBox(), HuginBase::SrcPanoImage::isInside(), vigra_ext::ROIImage< RemapImage, AlphaImage >::m_mask, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_srcImg, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_transf, hugin_utils::roundi(), HuginBase::PTools::Transform::transformImgCoord(), and vigra_ext::ROIImage< RemapImage, AlphaImage >::upperLeft().

Referenced by HuginBase::CalculateFOV::calcFOV(), HuginBase::CenterHorizontally::centerHorizontically(), and HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::saveRemapped().

template<class RemapImage, class AlphaImage>
template<class DistImgType>
void HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcSrcCoordImgs ( DistImgType &  imgX,
DistImgType &  imgY 
)

calculate distance map.

pixels contain distance from image center

setPanoImage() has to be called before!

Definition at line 339 of file RemappedPanoImage.h.

References vigra_ext::ROIImage< RemapImage, AlphaImage >::boundingBox(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_transf, and HuginBase::PTools::Transform::transformImgCoord().

Referenced by HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::saveRemapped().

template<class RemapImage, class AlphaImage>
template<class ImgIter, class ImgAccessor, class AlphaIter, class AlphaAccessor>
void HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage ( vigra::triple< ImgIter, ImgIter, ImgAccessor >  srcImg,
std::pair< AlphaIter, AlphaAccessor >  alphaImg,
vigra_ext::Interpolator  interp,
AppBase::MultiProgressDisplay progress 
)

remap a image, with alpha channel

Definition at line 607 of file RemappedPanoImage.h.

References vigra_ext::applyMask(), vigra_ext::ROIImage< RemapImage, AlphaImage >::boundingBox(), vigra_ext::circularCrop(), vigra_ext::EMoR::createEMoRLUT(), HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, vigra_ext::destImage(), vigra_ext::destImageRange(), vigra_ext::enforceMonotonicity(), vigra_ext::getMaxValForPixelType(), HuginBase::SrcPanoImage::hasActiveMasks(), HuginBase::SrcPanoImage::horizontalWarpNeeded(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_destImg, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_image, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_mask, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_srcImg, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_transf, celeste::max(), celeste::min(), HuginBase::BaseSrcPanoImage::NO_CROP, HuginBase::PanoramaOptions::OUTPUT_LDR, HuginBase::PanoramaOptions::outputEMoRParams, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, HuginBase::PanoramaOptions::outputPixelType, vigra_ext::pow(), HuginBase::PanoramaOptions::remapUsingGPU, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput(), vigra_ext::srcImage(), vigra_ext::transformImageAlpha(), vigra_ext::transformImageAlphaGPU(), and vigra_ext::ROIImage< RemapImage, AlphaImage >::upperLeft().

template<class RemapImage, class AlphaImage>
template<class ImgIter, class ImgAccessor>
void HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage ( vigra::triple< ImgIter, ImgIter, ImgAccessor >  srcImg,
vigra_ext::Interpolator  interpol,
AppBase::MultiProgressDisplay progress 
)

remap a image without alpha channel

Definition at line 426 of file RemappedPanoImage.h.

References vigra_ext::applyMask(), vigra_ext::ROIImage< RemapImage, AlphaImage >::boundingBox(), vigra_ext::circularCrop(), vigra_ext::EMoR::createEMoRLUT(), HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, DEBUG_DEBUG, vigra_ext::destImage(), vigra_ext::destImageRange(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::enforceMonotonicity(), vigra_ext::getMaxValForPixelType(), HuginBase::SrcPanoImage::hasActiveMasks(), HuginBase::SrcPanoImage::horizontalWarpNeeded(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_destImg, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_image, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_mask, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_srcImg, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_transf, celeste::max(), celeste::min(), HuginBase::BaseSrcPanoImage::NO_CROP, HuginBase::PanoramaOptions::OUTPUT_LDR, HuginBase::PanoramaOptions::outputEMoRParams, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, HuginBase::PanoramaOptions::outputPixelType, vigra_ext::pow(), HuginBase::PanoramaOptions::remapUsingGPU, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput(), vigra_ext::srcImage(), vigra_ext::transformImage(), vigra_ext::transformImageAlpha(), vigra_ext::transformImageAlphaGPU(), vigra_ext::transformImageGPU(), and vigra_ext::ROIImage< RemapImage, AlphaImage >::upperLeft().

Referenced by HuginLines::_getVerticalLines(), PanoDetector::AnalyzeImage(), and HuginBase::Nona::remapImage().

template<class RemapImage, class AlphaImage>
void HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::setPanoImage ( const SrcPanoImage src,
const PanoramaOptions dest,
vigra::Rect2D  roi 
)

Definition at line 219 of file RemappedPanoImage.h.

References HuginBase::PTools::Transform::createTransform(), DEBUG_DEBUG, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_destImg, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_region, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_srcImg, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_transf, HuginBase::PanoramaOptions::remapUsingGPU, and HuginBase::Nona::resize().

Referenced by HuginLines::_getVerticalLines(), PanoDetector::AnalyzeImage(), HuginBase::CalculateFOV::calcFOV(), HuginBase::CenterHorizontally::centerHorizontically(), and HuginBase::Nona::remapImage().


Member Data Documentation

template<class RemapImage, class AlphaImage>
PanoramaOptions HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_destImg [protected]

Definition at line 168 of file RemappedPanoImage.h.

Referenced by HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), and HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::setPanoImage().

template<class RemapImage, class AlphaImage>
vigra::ImageImportInfo::ICCProfile HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_ICCProfile

Definition at line 164 of file RemappedPanoImage.h.

Referenced by HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::saveRemapped(), HuginBase::Nona::MultiImageRemapper< vigra::FRGBImage, AlphaImageType >::saveRemapped(), and HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch().

template<class RemapImage, class AlphaImage>
SrcPanoImage HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_srcImg [protected]

Definition at line 167 of file RemappedPanoImage.h.

Referenced by HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcAlpha(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), and HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::setPanoImage().

template<class RemapImage, class AlphaImage>
PTools::Transform HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::m_transf [protected]

Definition at line 169 of file RemappedPanoImage.h.

Referenced by HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcAlpha(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcSrcCoordImgs(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), and HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::setPanoImage().


The documentation for this class was generated from the following file:
Generated on 26 Nov 2014 for Hugintrunk by  doxygen 1.4.7