Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Functions
PanoDetectorLogic.cpp File Reference
#include "ImageImport.h"
#include "PanoDetector.h"
#include <iostream>
#include <fstream>
#include <vigra/distancetransform.hxx>
#include "vigra_ext/impexalpha.hxx"
#include "vigra_ext/cms.h"
#include <localfeatures/Sieve.h>
#include <localfeatures/PointMatch.h>
#include <localfeatures/RansacFiltering.h>
#include <localfeatures/KeyPointIO.h>
#include <localfeatures/CircularKeyPointDescriptor.h>
#include "Utils.h"
#include "hugin_utils/stl_utils.h"
#include "Tracer.h"
#include <algorithms/nona/ComputeImageROI.h>
#include <algorithms/optimizer/PTOptimizer.h>
#include <nona/RemappedPanoImage.h>
#include <nona/ImageRemapper.h>
#include <time.h>
Include dependency graph for PanoDetectorLogic.cpp:

Go to the source code of this file.

Classes

class  KeyPointVectInsertor
 
class  SieveExtractorKP
 
class  SieveExtractorMatch
 
struct  ScaleFunctor< T >
 functor to scale image on the fly during other operations More...
 

Macros

#define TRACE_IMG(X)   {if (iPanoDetector.getVerbose() > 1) { TRACE_INFO("i" << ioImgInfo._number << " : " << X << std::endl);} }
 
#define TRACE_PAIR(X)
 

Functions

template<class SrcImageIterator , class SrcAccessor >
void applyMaskAndCrop (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > img, const HuginBase::SrcPanoImage &SrcImg)
 apply the mask and the crop of the given SrcImg to given mask image More...
 
template<class ImageType , class PixelTransform >
void RemapImage (const HuginBase::SrcPanoImage &srcImage, const HuginBase::PanoramaOptions &options, size_t detectWidth, size_t detectHeight, ImageType *&image, vigra::BImage *&mask, const PixelTransform &pixelTransform, ImageType *&finalImage, vigra::BImage *&finalMask)
 helper function to remap image to given projection, you can supply a pixelTransform, which will be applied during remapping, this is intended for scaling a image during remapping, but this means also, that no photometric corrections are applied, if this is wanted you need to supply a suitable pixelTransform More...
 
template<class ImageType >
void HandleDownscaleImage (const HuginBase::SrcPanoImage &srcImage, ImageType *&image, vigra::BImage *&mask, size_t detectWidth, size_t detectHeight, bool downscale, ImageType *&finalImage, vigra::BImage *&finalMask)
 downscale image if requested, optimized code for non-downscale version to prevent unnecessary copying the image data More...
 

Macro Definition Documentation

#define TRACE_IMG (   X)    {if (iPanoDetector.getVerbose() > 1) { TRACE_INFO("i" << ioImgInfo._number << " : " << X << std::endl);} }
#define TRACE_PAIR (   X)
Value:
{if (iPanoDetector.getVerbose() > 1){ TRACE_INFO("i" << ioMatchData._i1->_number << " <> " \
"i" << ioMatchData._i2->_number << " : " << X << std::endl)}}
double X
#define TRACE_INFO(x)
Definition: Tracer.h:26

Definition at line 53 of file PanoDetectorLogic.cpp.

Referenced by PanoDetector::FilterMatchesInPair(), PanoDetector::FindMatchesInPair(), PanoDetector::RansacMatchesInPairCam(), and PanoDetector::RansacMatchesInPairHomography().

Function Documentation

template<class SrcImageIterator , class SrcAccessor >
void applyMaskAndCrop ( vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor >  img,
const HuginBase::SrcPanoImage SrcImg 
)

apply the mask and the crop of the given SrcImg to given mask image

Definition at line 124 of file PanoDetectorLogic.cpp.

References HuginBase::SrcPanoImage::isInside().

Referenced by HandleDownscaleImage(), and RemapImage().

template<class ImageType >
void HandleDownscaleImage ( const HuginBase::SrcPanoImage srcImage,
ImageType *&  image,
vigra::BImage *&  mask,
size_t  detectWidth,
size_t  detectHeight,
bool  downscale,
ImageType *&  finalImage,
vigra::BImage *&  finalMask 
)

downscale image if requested, optimized code for non-downscale version to prevent unnecessary copying the image data

Definition at line 217 of file PanoDetectorLogic.cpp.

References applyMaskAndCrop(), vigra_ext::destImageRange(), HuginBase::SrcPanoImage::hasActiveMasks(), HuginBase::BaseSrcPanoImage::NO_CROP, and vigra_ext::srcImageRange().

Referenced by PanoDetector::AnalyzeImage().

template<class ImageType , class PixelTransform >
void RemapImage ( const HuginBase::SrcPanoImage srcImage,
const HuginBase::PanoramaOptions options,
size_t  detectWidth,
size_t  detectHeight,
ImageType *&  image,
vigra::BImage *&  mask,
const PixelTransform &  pixelTransform,
ImageType *&  finalImage,
vigra::BImage *&  finalMask 
)

helper function to remap image to given projection, you can supply a pixelTransform, which will be applied during remapping, this is intended for scaling a image during remapping, but this means also, that no photometric corrections are applied, if this is wanted you need to supply a suitable pixelTransform

Definition at line 178 of file PanoDetectorLogic.cpp.

References applyMaskAndCrop(), HuginBase::PTools::Transform::createTransform(), vigra_ext::destImage(), vigra_ext::destImageRange(), HuginBase::PanoramaOptions::getROI(), HuginBase::SrcPanoImage::hasActiveMasks(), vigra_ext::INTERP_CUBIC, HuginBase::BaseSrcPanoImage::NO_CROP, vigra_ext::srcImage(), vigra_ext::srcImageRange(), vigra_ext::transformImage(), and vigra_ext::transformImageAlpha().

Referenced by PanoDetector::AnalyzeImage().