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

static void extractPoints (PanoramaData &pano, std::vector< vigra::FRGBImage * > images, int nPoints, bool randomPoints, AppBase::ProgressDisplay *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::ProgressDisplay *progress)
virtual void samplePoints (const std::vector< InterpolImg > &imgs, const std::vector< vigra::FImage * > &voteImgs, const PanoramaData &pano, float minI, float maxI, std::vector< std::multimap< double, vigra_ext::PointPairRGB > > &radiusHist, unsigned &nGoodPoints, unsigned &nBadPoints, AppBase::ProgressDisplay *)=0

Static Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 47 of file PointSampler.h.


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 73 of file PointSampler.h.

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

Definition at line 115 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 51 of file PointSampler.h.

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

Definition at line 60 of file PointSampler.h.


Member Function Documentation

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

Definition at line 107 of file PointSampler.h.

void HuginBase::PointSampler::extractPoints ( PanoramaData pano,
std::vector< vigra::FRGBImage * >  images,
int  nPoints,
bool  randomPoints,
AppBase::ProgressDisplay 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(), PT::loadImgsAndExtractPoints(), and OptimizePhotometricPanel::runOptimizer().

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

Definition at line 118 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 101 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 34 of file PointSampler.cpp.

References HuginBase::TimeConsumingPanoramaAlgorithm::cancelAlgorithm(), HuginBase::TimeConsumingPanoramaAlgorithm::getProgressDisplay(), sampleAndExtractPoints(), and HuginBase::TimeConsumingPanoramaAlgorithm::wasCancelled().

void HuginBase::PointSampler::sampleAndExtractPoints ( AppBase::ProgressDisplay progress  )  [protected]

Definition at line 49 of file PointSampler.cpp.

References vigra_ext::destImage(), HuginBase::PanoramaData::getNewCopy(), HuginBase::PanoramaData::getNrOfImages(), HuginBase::PanoramaData::getOptions(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getSize(), HuginBase::PanoramaData::getSrcImage(), o_images, o_numPoints, HuginBase::PanoramaAlgorithm::o_panorama, o_resultPoints, HuginBase::SrcPanoImage::resize(), hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), samplePoints(), sampleRadiusUniform(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), AppBase::ProgressDisplay::setMessage(), HuginBase::PanoramaData::setOptions(), HuginBase::PanoramaOptions::setROI(), 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 PanoramaData pano,
float  minI,
float  maxI,
std::vector< std::multimap< double, vigra_ext::PointPairRGB > > &  radiusHist,
unsigned &  nGoodPoints,
unsigned &  nBadPoints,
AppBase::ProgressDisplay  
) [protected, pure virtual]

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::ProgressDisplay  
) [static, protected]

extract some random points out of the bins.

This should ensure that the radius distribution is roughly uniform

Definition at line 263 of file PointSampler.h.

Referenced by sampleAndExtractPoints().


Member Data Documentation

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

Definition at line 127 of file PointSampler.h.

Referenced by sampleAndExtractPoints().

int HuginBase::PointSampler::o_numPoints [protected]

Definition at line 128 of file PointSampler.h.

Referenced by sampleAndExtractPoints(), HuginBase::RandomPointSampler::samplePoints(), and HuginBase::AllPointSampler::samplePoints().

PointPairs HuginBase::PointSampler::o_resultPoints [protected]

Definition at line 129 of file PointSampler.h.

Referenced by sampleAndExtractPoints().


The documentation for this class was generated from the following files:
Generated on 11 Feb 2016 for Hugintrunk by  doxygen 1.4.7