Hugintrunk
0.1
|
Model for a panorama. More...
#include <PanoramaData.h>
Public Member Functions | |
virtual | ~PanoramaData () |
virtual PanoramaData * | getNewSubset (const UIntSet &imgs) const =0 |
virtual PanoramaData * | getNewCopy () const =0 |
virtual PanoramaData * | getUnlinkedSubset (UIntSetVector &imageGroups) const =0 |
virtual std::size_t | getNrOfImages () const =0 |
number of images. More... | |
virtual const SrcPanoImage & | getImage (std::size_t nr) const =0 |
get a panorama image, counting starts with 0 More... | |
virtual void | setImage (std::size_t nr, const SrcPanoImage &img)=0 |
set a panorama image, counting starts with 0 More... | |
virtual unsigned int | addImage (const SrcPanoImage &img)=0 |
the the number for a specific image More... | |
virtual void | removeImage (unsigned int nr)=0 |
creates an image, from filename, and a Lens, if needed More... | |
virtual void | swapImages (unsigned int img1, unsigned int img2)=0 |
swap images. More... | |
virtual void | moveImage (size_t img1, size_t img2)=0 |
moves images. More... | |
virtual SrcPanoImage | getSrcImage (unsigned imgNr) const =0 |
get a complete description of a source image More... | |
virtual void | setSrcImage (unsigned int nr, const SrcPanoImage &img)=0 |
set input image parameters TODO: Propagate changes to linked images. More... | |
virtual void | setImageFilename (unsigned int img, const std::string &fname)=0 |
set a new image filename More... | |
virtual void | activateImage (unsigned int imgNr, bool active=true)=0 |
mark an image as active or inactive. More... | |
virtual UIntSet | getActiveImages () const =0 |
get active images More... | |
virtual std::size_t | getNrOfCtrlPoints () const =0 |
number of control points More... | |
virtual const ControlPoint & | getCtrlPoint (std::size_t nr) const =0 |
get a control point, counting starts with 0 More... | |
virtual const CPVector & | getCtrlPoints () const =0 |
get all control point of this Panorama More... | |
virtual std::vector< unsigned int > | getCtrlPointsForImage (unsigned int imgNr) const =0 |
return all control points for a given image. More... | |
virtual void | setCtrlPoints (const CPVector &points)=0 |
set all control points (Ippei: Is this supposed to be 'add' method?) More... | |
virtual unsigned int | addCtrlPoint (const ControlPoint &point)=0 |
add a new control point. More... | |
virtual void | removeCtrlPoint (unsigned int pNr)=0 |
remove a control point. More... | |
virtual void | removeDuplicateCtrlPoints ()=0 |
removes duplicates control points More... | |
virtual void | changeControlPoint (unsigned int pNr, const ControlPoint &point)=0 |
change a control Point. More... | |
virtual int | getNextCPTypeLineNumber () const =0 |
get the number of a control point More... | |
virtual void | updateLineCtrlPoints ()=0 |
assign new mode line numbers, if required More... | |
virtual void | updateCtrlPointErrors (const CPVector &controlPoints)=0 |
update control points distances. More... | |
virtual void | updateCtrlPointErrors (const UIntSet &imgs, const CPVector &cps)=0 |
update control points for a subset of images. More... | |
virtual VariableMapVector | getVariables () const =0 |
get variables of this panorama More... | |
virtual const VariableMap | getImageVariables (unsigned int imgNr) const =0 |
get variables of an image More... | |
virtual void | updateVariables (const VariableMapVector &vars)=0 |
Set the variables. More... | |
virtual void | updateVariables (const UIntSet &imgs, const VariableMapVector &var)=0 |
update variables for some specific images More... | |
virtual void | updateVariables (unsigned int imgNr, const VariableMap &var)=0 |
Set variables for a single picture. More... | |
virtual void | updateVariable (unsigned int imgNr, const Variable &var)=0 |
update a single variable More... | |
virtual void | updateWhiteBalance (double redFactor, double blueFactor)=0 |
update the global white balace of the panorama by multiplying the red and blue factor of each image with given factors More... | |
virtual const OptimizeVector & | getOptimizeVector () const =0 |
return the optimize settings stored inside panorama More... | |
virtual void | setOptimizeVector (const OptimizeVector &optvec)=0 |
set optimize setting More... | |
virtual const int | getOptimizerSwitch () const =0 |
returns optimizer master switch More... | |
virtual void | setOptimizerSwitch (const int newSwitch)=0 |
set optimizer master switch More... | |
virtual const int | getPhotometricOptimizerSwitch () const =0 |
return the photometric optimizer master switch More... | |
virtual void | setPhotometricOptimizerSwitch (const int newSwitch)=0 |
sets the photometric optimizer master switch More... | |
virtual const PanoramaOptions & | getOptions () const =0 |
returns the options for this panorama More... | |
virtual void | setOptions (const PanoramaOptions &opt)=0 |
set new output settings This is not used directly for optimizing/stiching, but it can be feed into runOptimizer() and runStitcher(). More... | |
virtual void | printPanoramaScript (std::ostream &o, const OptimizeVector &optvars, const PanoramaOptions &options, const UIntSet &imgs, bool forPTOptimizer, const std::string &stripPrefix="") const =0 |
create an optimizer script More... | |
virtual void | printStitcherScript (std::ostream &o, const PanoramaOptions &target, const UIntSet &imgs) const =0 |
create the stitcher script More... | |
virtual void | changeFinished ()=0 |
tells the data container to perform some maintainance if neccesary More... | |
virtual void | imageChanged (unsigned int imgNr)=0 |
mark image change for maintainance More... | |
virtual void | updateMasksForImage (unsigned int imgNr, MaskPolygonVector newMasks)=0 |
set complete mask list for image with number More... | |
virtual void | updateMasks (bool convertPosMaskToNeg=false)=0 |
updates all active masks More... | |
virtual void | transferMask (MaskPolygon mask, unsigned int imgNr, const UIntSet &targetImgs)=0 |
transfers given mask from image imgNr to all targetImgs More... | |
virtual void | updateOptimizeVector ()=0 |
updates the optimize vector according to master switches More... | |
virtual std::set< size_t > | getRefImages ()=0 |
returns set of reference image and images linked with reference images More... | |
virtual void | checkRefOptStatus (bool &linkRefImgsYaw, bool &linkRefImgsPitch, bool &linkRefImgsRoll)=0 |
checks if yaw/pitch/roll of reference image can be check, it depends on number and type of control points More... | |
Model for a panorama.
This class contains the properties of a panorama That is:
view and controller classes can get information about these with the getXXX Functions.
Images and Control points are numbered, and const references are handed out. this means that all interaction will be based on image or control point numbers. The references are not stable, they might disappear when other functions of this class are called, so its best to get a new reference whenever you need the object.
This also means that the whole object is not threadsafe and concurrent access has to be synchronized from the outside.
Definition at line 81 of file PanoramaData.h.
|
inlinevirtual |
Definition at line 87 of file PanoramaData.h.
|
pure virtual |
mark an image as active or inactive.
This is only a flag, that can be turned on or off. If an image is marked active, then it should be used for optimizing and stitching.
However, this is not done automatically. One has to use getActiveImages() to get the numbers of the active images, and pass these to the respective functions that do the stitching or optimisation
Implemented in HuginBase::Panorama.
|
pure virtual |
add a new control point.
Implemented in HuginBase::Panorama.
|
pure virtual |
the the number for a specific image
add an Image to the panorama
The Image must be initialized, the Lens must exist.
Implemented in HuginBase::Panorama.
|
pure virtual |
change a control Point.
Implemented in HuginBase::Panorama.
|
pure virtual |
tells the data container to perform some maintainance if neccesary
Implemented in HuginBase::Panorama, and HuginBase::ManagedPanoramaData.
|
pure virtual |
checks if yaw/pitch/roll of reference image can be check, it depends on number and type of control points
Implemented in HuginBase::Panorama.
|
pure virtual |
get active images
Implemented in HuginBase::Panorama.
Referenced by HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), HuginBase::CalculateFOV::calcFOV(), HuginBase::CalculateOptimalROI::calcOptimalROI(), HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop(), HuginBase::CenterHorizontally::centerHorizontically(), and HuginBase::PhotometricOptimizer::photometricError().
|
pure virtual |
get a control point, counting starts with 0
Implemented in HuginBase::Panorama.
Referenced by optGetError().
|
pure virtual |
get all control point of this Panorama
Implemented in HuginBase::Panorama.
Referenced by HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), HuginBase::CalculateCPStatisticsRadial::calcCtrlPntsRadiStats(), HuginGraph::ImageGraph::ImageGraph(), HuginBase::PTOptEstimator::PTOptEstimator(), and HuginBase::SmartOptimise::smartOptimize().
|
pure virtual |
return all control points for a given image.
Implemented in HuginBase::Panorama.
|
pure virtual |
get a panorama image, counting starts with 0
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTOptEstimator::agree(), HuginBase::CalculateCPStatisticsRadial::calcCtrlPntsRadiStats(), HuginBase::CalculateMeanExposure::calcMeanExposure(), HuginBase::CalculateOptimalROI::calcOptimalROI(), HuginBase::StraightenPanorama::calcStraighteningRotation(), HuginBase::CalculateImageOverlap::calculate(), HuginBase::CenterHorizontally::centerHorizontically(), HuginBase::CheckStrangeWB(), HuginBase::Nona::SpaceTransform::createInvTransform(), HuginBase::PTools::Transform::createInvTransform(), HuginBase::SmartOptimizerStub::createOptVars(), HuginBase::Nona::SpaceTransform::createTransform(), HuginBase::PTools::Transform::createTransform(), HuginBase::getExposureLayers(), GetMinimumGuiLevel(), HuginBase::SmallRemappedImageCache::getRemapped(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginGraph::ImageGraph::ImageGraph(), HuginBase::PTOptEstimator::leastSquaresEstimate(), HuginBase::PhotometricOptimizer::OptimData::OptimData(), PanoDetector::RansacMatchesInPairCam(), HuginBase::RotatePanorama::rotatePano(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric(), HuginBase::CalculateOptimalROI::stackPixel(), HuginBase::Nona::MultiImageRemapper< ImageType, AlphaImageType >::stitch(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::stitchPanorama(), and HuginBase::TranslatePanorama::translatePano().
|
pure virtual |
get variables of an image
Depreciated: Please use SrcPanoImage objects for variable access.
Note: no longer returns a reference as the no variable map with the correct values exists, now we use individual member variables in SrcPanoImage.
Implemented in HuginBase::Panorama.
Referenced by HuginBase::AutoOptimise::autoOptimise(), HuginBase::StraightenPanorama::calcStraighteningRotation(), HuginBase::PTools::Transform::createInvTransform(), HuginBase::PTools::Transform::createTransform(), HuginBase::SmartOptimise::smartOptimize(), and HuginBase::AutoOptimiseVisitor::Visit().
|
pure virtual |
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PointSampler::sampleAndExtractPoints().
|
pure virtual |
Implemented in HuginBase::Panorama.
Referenced by HuginBase::getEstimatedBlendingOrder(), HuginBase::PTOptEstimator::PTOptEstimator(), and HuginBase::AutoOptimiseVisitor::Visit().
|
pure virtual |
get the number of a control point
get the next unused line number for t3, ... control point creation
Implemented in HuginBase::Panorama.
|
pure virtual |
number of control points
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTools::calcCtrlPointErrors(), optGetError(), and optimize_new().
|
pure virtual |
number of images.
Implemented in HuginBase::Panorama.
Referenced by HuginBase::AutoOptimise::autoOptimise(), HuginBase::PTools::calcCtrlPointErrors(), HuginBase::CalculateFOV::calcFOV(), HuginBase::CalculateMeanExposure::calcMeanExposure(), HuginBase::CalculateOptimalScale::calcOptimalScale(), HuginBase::StraightenPanorama::calcStraighteningRotation(), HuginBase::CalculateImageOverlap::CalculateImageOverlap(), HuginBase::CheckStrangeWB(), HuginBase::SmartOptimizerStub::createOptVars(), HuginBase::ConstStandardImageVariableGroups::getLens(), GetMinimumGuiLevel(), HuginBase::ConstImageVariableGroup::getPartNumber(), HuginGraph::ImageGraph::ImageGraph(), HuginBase::PhotometricOptimizer::OptimData::OptimData(), OptimData::OptimData(), HuginBase::PTools::optimize(), HuginBase::PhotometricOptimizer::optimizePhotometric(), HuginBase::PhotometricOptimizer::photometricError(), HuginBase::RotatePanorama::rotatePano(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::SmartOptimise::smartOptimize(), HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric(), HuginBase::Nona::stitchPanorama(), and HuginBase::TranslatePanorama::translatePano().
|
pure virtual |
returns optimizer master switch
Implemented in HuginBase::Panorama.
|
pure virtual |
return the optimize settings stored inside panorama
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTools::optimize().
|
pure virtual |
returns the options for this panorama
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTOptEstimator::agree(), HuginBase::AutoOptimise::autoOptimise(), HuginBase::PTools::calcCtrlPointErrors(), HuginBase::CalculateFOV::calcFOV(), HuginBase::CalculateOptimalROI::calcOptimalROI(), HuginBase::CalculateOptimalScale::calcOptimalScale(), HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop(), HuginBase::CalculateImageOverlap::CalculateImageOverlap(), HuginBase::CalculateFitPanorama::fitPano(), HuginBase::getImagesinROI(), HuginBase::Panorama::getUnlinkedSubset(), HuginBase::PTools::optimize(), HuginBase::PhotometricOptimizer::photometricError(), HuginBase::FitPanorama::runAlgorithm(), HuginBase::SetWidthOptimal::runAlgorithm(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), HuginBase::SmartOptimise::smartOptimize(), and HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric().
|
pure virtual |
return the photometric optimizer master switch
Implemented in HuginBase::Panorama.
|
pure virtual |
returns set of reference image and images linked with reference images
Implemented in HuginBase::Panorama.
|
pure virtual |
get a complete description of a source image
Implemented in HuginBase::Panorama.
Referenced by HuginBase::CalculateFOV::calcFOV(), HuginBase::CalculateOptimalScale::calcOptimalScale(), HuginBase::StraightenPanorama::calcStraighteningRotation(), HuginBase::CenterHorizontally::centerHorizontically(), HuginBase::estimateOutputROI(), HuginBase::SmallRemappedImageCache::getRemapped(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), OptimData::LoadFromImgs(), HuginBase::PhotometricOptimizer::OptimData::OptimData(), HuginBase::PointSampler::sampleAndExtractPoints(), OptimData::SaveToImgs(), and HuginBase::Nona::stitchPanorama().
|
pure virtual |
Implemented in HuginBase::Panorama.
Referenced by HuginBase::AutoOptimise::autoOptimise().
|
pure virtual |
get variables of this panorama
Implemented in HuginBase::Panorama.
Referenced by HuginBase::SmartOptimise::smartOptimize(), and HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric().
|
pure virtual |
mark image change for maintainance
Implemented in HuginBase::Panorama, and HuginBase::ManagedPanoramaData.
Referenced by HuginBase::RotatePanorama::rotatePano(), and HuginBase::TranslatePanorama::translatePano().
|
pure virtual |
|
pure virtual |
create an optimizer script
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTools::calcCtrlPointErrors(), HuginBase::PTools::optimize(), and HuginBase::PhotometricOptimizer::photometricError().
|
pure virtual |
create the stitcher script
Implemented in HuginBase::Panorama.
|
pure virtual |
remove a control point.
Implemented in HuginBase::Panorama.
|
pure virtual |
removes duplicates control points
Implemented in HuginBase::Panorama.
|
pure virtual |
creates an image, from filename, and a Lens, if needed
add an Image to the panorama
also deletes/updates all associated control points.
Implemented in HuginBase::Panorama.
|
pure virtual |
set all control points (Ippei: Is this supposed to be 'add' method?)
Implemented in HuginBase::Panorama.
Referenced by HuginBase::Panorama::getUnlinkedSubset(), HuginBase::PTOptEstimator::leastSquaresEstimate(), PanoDetector::RansacMatchesInPairCam(), and HuginBase::SmartOptimise::smartOptimize().
|
pure virtual |
set a panorama image, counting starts with 0
Implemented in HuginBase::Panorama.
Referenced by HuginBase::RotatePanorama::rotatePano(), and HuginBase::TranslatePanorama::translatePano().
|
pure virtual |
set a new image filename
It is assumed that it is of the same size as the old image.
Implemented in HuginBase::Panorama.
|
pure virtual |
set optimizer master switch
Implemented in HuginBase::Panorama.
|
pure virtual |
set optimize setting
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTOptEstimator::leastSquaresEstimate(), HuginBase::SmartOptimise::smartOptimize(), and HuginBase::AutoOptimiseVisitor::Visit().
|
pure virtual |
set new output settings This is not used directly for optimizing/stiching, but it can be feed into runOptimizer() and runStitcher().
Implemented in HuginBase::Panorama.
Referenced by HuginBase::Panorama::getUnlinkedSubset(), HuginBase::FitPanorama::runAlgorithm(), HuginBase::SetWidthOptimal::runAlgorithm(), HuginBase::PointSampler::sampleAndExtractPoints(), and HuginBase::SmartOptimise::smartOptimize().
|
pure virtual |
sets the photometric optimizer master switch
Implemented in HuginBase::Panorama.
|
pure virtual |
set input image parameters TODO: Propagate changes to linked images.
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PhotometricOptimizer::optimizePhotometric(), HuginBase::PointSampler::sampleAndExtractPoints(), and OptimData::SaveToImgs().
|
pure virtual |
swap images.
swaps the images, image img1
becomes img2
and the other way round
Implemented in HuginBase::Panorama.
|
pure virtual |
transfers given mask from image imgNr to all targetImgs
Implemented in HuginBase::Panorama.
|
pure virtual |
update control points distances.
updates control distances and position in final panorama usually used to set the changes from the optimization. The control points must be the same as in
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTools::calcCtrlPointErrors(), optGetError(), and HuginBase::PTools::optimize().
|
pure virtual |
update control points for a subset of images.
Usually, the control point subset is created using subset() The number and ordering and control points must not be changed between the call to subset() and this function.
Implemented in HuginBase::Panorama.
|
pure virtual |
assign new mode line numbers, if required
Implemented in HuginBase::Panorama.
|
pure virtual |
updates all active masks
this is necessary after variables of one image has changed, because positive masks have to be updated
Implemented in HuginBase::Panorama.
|
pure virtual |
set complete mask list for image with number
Implemented in HuginBase::Panorama.
|
pure virtual |
updates the optimize vector according to master switches
Implemented in HuginBase::Panorama.
|
pure virtual |
update a single variable
It updates other images when the variable is linked
Implemented in HuginBase::Panorama.
Referenced by HuginBase::RANSACOptimizer::findInliers(), and HuginBase::OptVarSpec::set().
|
pure virtual |
Set the variables.
Usually used when the optimizer results should be applied.
Implemented in HuginBase::Panorama.
Referenced by HuginBase::AutoOptimise::autoOptimise(), HuginBase::PTools::optimize(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::SmartOptimise::smartOptimize(), HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric(), and HuginBase::AutoOptimiseVisitor::Visit().
|
pure virtual |
update variables for some specific images
Implemented in HuginBase::Panorama.
|
pure virtual |
Set variables for a single picture.
Implemented in HuginBase::Panorama.
|
pure virtual |
update the global white balace of the panorama by multiplying the red and blue factor of each image with given factors
Implemented in HuginBase::Panorama.