HuginBase::PointSampler Class Reference

#include <PointSampler.h>

Inheritance diagram for HuginBase::PointSampler:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< vigra_ext::PointPairRGBPointPairs

Public Member Functions

virtual ~PointSampler ()
virtual bool modifiesPanoramaData () const
 returns true if the algorithm changes the PanoramaData.
virtual bool runAlgorithm ()
 implementation of the algorithm.
PointSamplerexecute ()
PointPairs getResultPoints ()

Static Public Member Functions

void extractPoints (PanoramaData &pano, std::vector< vigra::FRGBImage * > images, int nPoints, bool randomPoints, AppBase::ProgressReporter &progress, std::vector< vigra_ext::PointPairRGB > &points)
 for compatibility deprecated

Protected Types

typedef vigra_ext::ImageInterpolator<
vigra::FRGBImage::const_traverser,
vigra::FRGBImage::ConstAccessor,
vigra_ext::interp_cubic
InterpolImg

Protected Member Functions

 PointSampler (PanoramaData &panorama, AppBase::ProgressDisplay *progressDisplay, std::vector< vigra::FRGBImage * > images, int nPoints)
void sampleAndExtractPoints (AppBase::ProgressReporter &progress)
virtual void samplePoints (const std::vector< InterpolImg > &imgs, const std::vector< vigra::FImage * > &voteImgs, const std::vector< SrcPanoImage > &src, const PanoramaOptions &dest, float minI, float maxI, std::vector< std::multimap< double, vigra_ext::PointPairRGB > > &radiusHist, unsigned &nGoodPoints, unsigned &nBadPoints, AppBase::ProgressReporter &progress)=0

Static Protected Member Functions

template<class PointPairClass>
void sampleRadiusUniform (const std::vector< std::multimap< double, PointPairClass > > &radiusHist, unsigned nPoints, std::vector< PointPairClass > &selectedPoints, AppBase::ProgressReporter &progress)
 extract some random points out of the bins.

Protected Attributes

std::vector< vigra::FRGBImage * > o_images
int o_numPoints
PointPairs o_resultPoints

Member Typedef Documentation

typedef vigra_ext::ImageInterpolator<vigra::FRGBImage::const_traverser, vigra::FRGBImage::ConstAccessor, vigra_ext::interp_cubic > HuginBase::PointSampler::InterpolImg [protected]
 

Definition at line 68 of file PointSampler.h.

Referenced by sampleAndExtractPoints().

typedef std::vector<vigra_ext::PointPairRGB> HuginBase::PointSampler::PointPairs
 

Definition at line 111 of file PointSampler.h.


Constructor & Destructor Documentation

HuginBase::PointSampler::PointSampler PanoramaData panorama,
AppBase::ProgressDisplay progressDisplay,
std::vector< vigra::FRGBImage * >  images,
int  nPoints
[inline, protected]
 

Definition at line 46 of file PointSampler.h.

virtual HuginBase::PointSampler::~PointSampler  )  [inline, virtual]
 

Definition at line 55 of file PointSampler.h.


Member Function Documentation

PointSampler& HuginBase::PointSampler::execute  )  [inline]
 

Definition at line 103 of file PointSampler.h.

References HuginBase::PanoramaAlgorithm::run().

void HuginBase::PointSampler::extractPoints PanoramaData pano,
std::vector< vigra::FRGBImage * >  images,
int  nPoints,
bool  randomPoints,
AppBase::ProgressReporter progress,
std::vector< vigra_ext::PointPairRGB > &  points
[static]
 

for compatibility deprecated

Definition at line 149 of file PointSampler.cpp.

References getResultPoints(), and sampleAndExtractPoints().

Referenced by PT::extractPoints(), and PT::loadImgsAndExtractPoints().

PointPairs HuginBase::PointSampler::getResultPoints  )  [inline]
 

Definition at line 114 of file PointSampler.h.

Referenced by extractPoints().

virtual bool HuginBase::PointSampler::modifiesPanoramaData  )  const [inline, virtual]
 

returns true if the algorithm changes the PanoramaData.

Implements HuginBase::PanoramaAlgorithm.

Definition at line 97 of file PointSampler.h.

bool HuginBase::PointSampler::runAlgorithm  )  [virtual]
 

implementation of the algorithm.

You should override with your algorithm's implementiation.

Implements HuginBase::PanoramaAlgorithm.

Definition at line 33 of file PointSampler.cpp.

References HuginBase::TimeConsumingPanoramaAlgorithm::cancelAlgorithm(), HuginBase::TimeConsumingPanoramaAlgorithm::getProgressDisplay(), HuginBase::TimeConsumingPanoramaAlgorithm::hasProgressDisplay(), AppBase::ProgressReporterAdaptor::newProgressReporter(), sampleAndExtractPoints(), HuginBase::TimeConsumingPanoramaAlgorithm::wasCancelled(), and AppBase::ProgressDisplay::wasCancelled().

void HuginBase::PointSampler::sampleAndExtractPoints AppBase::ProgressReporter progress  )  [protected]
 

Definition at line 54 of file PointSampler.cpp.

References vigra_ext::destImage(), HuginBase::PanoramaData::getNewCopy(), HuginBase::PanoramaData::getNrOfImages(), HuginBase::PanoramaData::getOptions(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaData::getSrcImage(), InterpolImg, HuginBase::SrcPanoImage::resize(), hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), samplePoints(), sampleRadiusUniform(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), AppBase::ProgressReporter::setMessage(), HuginBase::PanoramaData::setOptions(), HuginBase::PanoramaData::setSrcImage(), and vigra_ext::srcImageRange().

Referenced by extractPoints(), and runAlgorithm().

virtual void HuginBase::PointSampler::samplePoints const std::vector< InterpolImg > &  imgs,
const std::vector< vigra::FImage * > &  voteImgs,
const std::vector< SrcPanoImage > &  src,
const PanoramaOptions dest,
float  minI,
float  maxI,
std::vector< std::multimap< double, vigra_ext::PointPairRGB > > &  radiusHist,
unsigned &  nGoodPoints,
unsigned &  nBadPoints,
AppBase::ProgressReporter progress
[protected, pure virtual]
 

Implemented in HuginBase::AllPointSampler, and HuginBase::RandomPointSampler.

Referenced by sampleAndExtractPoints().

template<class PointPairClass>
void HuginBase::PointSampler::sampleRadiusUniform const std::vector< std::multimap< double, PointPairClass > > &  radiusHist,
unsigned  nPoints,
std::vector< PointPairClass > &  selectedPoints,
AppBase::ProgressReporter progress
[static, protected]
 

extract some random points out of the bins.

This should ensure that the radius distribution is roughly uniform

Definition at line 269 of file PointSampler.h.

References AppBase::ProgressReporter::increaseProgress().

Referenced by sampleAndExtractPoints().


Member Data Documentation

std::vector<vigra::FRGBImage*> HuginBase::PointSampler::o_images [protected]
 

Definition at line 123 of file PointSampler.h.

int HuginBase::PointSampler::o_numPoints [protected]
 

Definition at line 124 of file PointSampler.h.

PointPairs HuginBase::PointSampler::o_resultPoints [protected]
 

Definition at line 125 of file PointSampler.h.


The documentation for this class was generated from the following files:
Generated on Wed Jul 16 01:25:50 2014 for Hugintrunk by  doxygen 1.3.9.1