Hugin trunk 0.1
Loading...
Searching...
No Matches
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
 
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
 
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
 

Macro Definition Documentation

◆ TRACE_IMG

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

Definition at line 52 of file PanoDetectorLogic.cpp.

◆ TRACE_PAIR

#define TRACE_PAIR (   X)
Value:
{if (iPanoDetector.getVerbose() > 1){ TRACE_INFO("i" << ioMatchData._i1->_number << " <> " \
"i" << ioMatchData._i2->_number << " : " << X << std::endl)}}
#define TRACE_INFO(x)
Definition Tracer.h:26
double X
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41

Definition at line 53 of file PanoDetectorLogic.cpp.

Function Documentation

◆ applyMaskAndCrop()

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 threshold().

Referenced by HandleDownscaleImage(), and RemapImage().

◆ HandleDownscaleImage()

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(), HuginBase::BaseSrcPanoImage::NO_CROP, and threshold().

Referenced by PanoDetector::AnalyzeImage().

◆ RemapImage()

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(), HuginBase::PanoramaOptions::getROI(), vigra_ext::INTERP_CUBIC, HuginBase::BaseSrcPanoImage::NO_CROP, threshold(), vigra_ext::transformImage(), and vigra_ext::transformImageAlpha().

Referenced by PanoDetector::AnalyzeImage().