|
Hugin trunk 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. | |
| virtual const SrcPanoImage & | getImage (std::size_t nr) const =0 |
| get a panorama image, counting starts with 0 | |
| virtual void | setImage (std::size_t nr, const SrcPanoImage &img)=0 |
| set a panorama image, counting starts with 0 | |
| virtual unsigned int | addImage (const SrcPanoImage &img)=0 |
| the the number for a specific image | |
| virtual void | removeImage (unsigned int nr)=0 |
| creates an image, from filename, and a Lens, if needed | |
| virtual void | swapImages (unsigned int img1, unsigned int img2)=0 |
| swap images. | |
| virtual void | moveImage (size_t img1, size_t img2)=0 |
| moves images. | |
| virtual SrcPanoImage | getSrcImage (unsigned imgNr) const =0 |
| get a complete description of a source image | |
| virtual void | setSrcImage (unsigned int nr, const SrcPanoImage &img)=0 |
| set input image parameters TODO: Propagate changes to linked images. | |
| virtual void | setImageFilename (unsigned int img, const std::string &fname)=0 |
| set a new image filename | |
| virtual void | activateImage (unsigned int imgNr, bool active=true)=0 |
| mark an image as active or inactive. | |
| virtual UIntSet | getActiveImages () const =0 |
| get active images | |
| virtual std::size_t | getNrOfCtrlPoints () const =0 |
| number of control points | |
| virtual const ControlPoint & | getCtrlPoint (std::size_t nr) const =0 |
| get a control point, counting starts with 0 | |
| virtual const CPVector & | getCtrlPoints () const =0 |
| get all control point of this Panorama | |
| virtual std::vector< unsigned int > | getCtrlPointsForImage (unsigned int imgNr) const =0 |
| return all control points for a given image. | |
| virtual void | setCtrlPoints (const CPVector &points)=0 |
| set all control points (Ippei: Is this supposed to be 'add' method?) | |
| virtual unsigned int | addCtrlPoint (const ControlPoint &point)=0 |
| add a new control point. | |
| virtual void | removeCtrlPoint (unsigned int pNr)=0 |
| remove a control point. | |
| virtual void | removeDuplicateCtrlPoints ()=0 |
| removes duplicates control points | |
| virtual void | changeControlPoint (unsigned int pNr, const ControlPoint &point)=0 |
| change a control Point. | |
| virtual int | getNextCPTypeLineNumber () const =0 |
| get the number of a control point | |
| virtual void | updateLineCtrlPoints ()=0 |
| assign new mode line numbers, if required | |
| virtual void | updateCtrlPointErrors (const CPVector &controlPoints)=0 |
| update control points distances. | |
| virtual void | updateCtrlPointErrors (const UIntSet &imgs, const CPVector &cps)=0 |
| update control points for a subset of images. | |
| virtual VariableMapVector | getVariables () const =0 |
| get variables of this panorama | |
| virtual const VariableMap | getImageVariables (unsigned int imgNr) const =0 |
| get variables of an image | |
| virtual void | updateVariables (const VariableMapVector &vars)=0 |
| Set the variables. | |
| virtual void | updateVariables (const UIntSet &imgs, const VariableMapVector &var)=0 |
| update variables for some specific images | |
| virtual void | updateVariables (unsigned int imgNr, const VariableMap &var)=0 |
| Set variables for a single picture. | |
| virtual void | updateVariable (unsigned int imgNr, const Variable &var)=0 |
| update a single variable | |
| 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 | |
| virtual const OptimizeVector & | getOptimizeVector () const =0 |
| return the optimize settings stored inside panorama | |
| virtual void | setOptimizeVector (const OptimizeVector &optvec)=0 |
| set optimize setting | |
| virtual const int | getOptimizerSwitch () const =0 |
| returns optimizer master switch | |
| virtual void | setOptimizerSwitch (const int newSwitch)=0 |
| set optimizer master switch | |
| virtual const int | getPhotometricOptimizerSwitch () const =0 |
| return the photometric optimizer master switch | |
| virtual void | setPhotometricOptimizerSwitch (const int newSwitch)=0 |
| sets the photometric optimizer master switch | |
| virtual const PanoramaOptions & | getOptions () const =0 |
| returns the options for this panorama | |
| 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(). | |
| 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 | |
| virtual void | printStitcherScript (std::ostream &o, const PanoramaOptions &target, const UIntSet &imgs) const =0 |
| create the stitcher script | |
| virtual void | changeFinished ()=0 |
| tells the data container to perform some maintainance if neccesary | |
| virtual void | imageChanged (unsigned int imgNr)=0 |
| mark image change for maintainance | |
| virtual void | updateMasksForImage (unsigned int imgNr, MaskPolygonVector newMasks)=0 |
| set complete mask list for image with number | |
| virtual void | updateMasks (bool convertPosMaskToNeg=false)=0 |
| updates all active masks | |
| virtual void | transferMask (MaskPolygon mask, unsigned int imgNr, const UIntSet &targetImgs)=0 |
| transfers given mask from image imgNr to all targetImgs | |
| virtual void | updateOptimizeVector ()=0 |
| updates the optimize vector according to master switches | |
| virtual std::set< size_t > | getRefImages ()=0 |
| returns set of reference image and images linked with reference images | |
| 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 | |
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.
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.
get active images
Implemented in HuginBase::Panorama.
Referenced by HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), and HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop().
|
pure virtual |
get a control point, counting starts with 0
Implemented in HuginBase::Panorama.
get all control point of this Panorama
Implemented in HuginBase::Panorama.
Referenced by HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), HuginBase::CalculateCPStatisticsRadial::calcCtrlPntsRadiStats(), HuginGraph::ImageGraph::ImageGraph(), and HuginBase::PTOptEstimator::PTOptEstimator().
|
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::CalculateImageOverlap::calculate(), HuginBase::CheckStrangeWB(), HuginBase::Nona::SpaceTransform::createInvTransform(), HuginBase::PTools::Transform::createInvTransform(), HuginBase::Nona::SpaceTransform::createTransform(), HuginBase::PTools::Transform::createTransform(), HuginBase::OptVarSpec::get(), HuginBase::getExposureLayers(), HuginBase::ConstStandardImageVariableGroups::getLensForImage(), GetMinimumGuiLevel(), HuginBase::SmallRemappedImageCache::getRemapped(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginGraph::ImageGraph::ImageGraph(), HuginBase::PTOptEstimator::leastSquaresEstimate(), HuginBase::PhotometricOptimizer::OptimData::OptimData(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric(), HuginBase::CalculateOptimalROI::stackPixel(), HuginBase::Nona::MultiImageRemapper< ImageType, AlphaType >::stitch(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::stitchPanorama().
|
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::PTools::Transform::createInvTransform(), and HuginBase::PTools::Transform::createTransform().
|
pure virtual |
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PointSampler::sampleAndExtractPoints().
|
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(), and optimize_new().
|
pure virtual |
number of images.
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTools::calcCtrlPointErrors(), HuginBase::CalculateMeanExposure::calcMeanExposure(), HuginBase::CalculateImageOverlap::CalculateImageOverlap(), HuginBase::CheckStrangeWB(), HuginBase::ConstStandardImageVariableGroups::getLens(), GetMinimumGuiLevel(), HuginBase::ConstImageVariableGroup::getPartNumber(), HuginGraph::ImageGraph::ImageGraph(), HuginBase::PhotometricOptimizer::OptimData::OptimData(), OptimData::OptimData(), HuginBase::PTools::optimize(), HuginBase::PhotometricOptimizer::optimizePhotometric(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::ConstImageVariableGroup::setPartNumbers(), HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric(), and HuginBase::Nona::stitchPanorama().
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::PTools::calcCtrlPointErrors(), HuginBase::CalculateOptimalROIOutside::CalcOutsideCrop(), HuginBase::CalculateImageOverlap::CalculateImageOverlap(), HuginBase::getImagesinROI(), HuginBase::getImagesinROI(), HuginBase::PTools::optimize(), HuginBase::SetWidthOptimal::runAlgorithm(), HuginBase::FitPanorama::runAlgorithm(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), and HuginBase::SmartPhotometricOptimizer::smartOptimizePhotometric().
return the photometric optimizer master switch
Implemented in HuginBase::Panorama.
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::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::SmartPhotometricOptimizer::smartOptimizePhotometric().
mark image change for maintainance
Implemented in HuginBase::Panorama, and HuginBase::ManagedPanoramaData.
Referenced by HuginBase::ImageVariableGroup::switchParts().
|
pure virtual |
create an optimizer script
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTools::calcCtrlPointErrors(), and HuginBase::PTools::optimize().
|
pure virtual |
create the stitcher script
Implemented in HuginBase::Panorama.
remove a control point.
Implemented in HuginBase::Panorama.
removes duplicates control points
Implemented in HuginBase::Panorama.
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.
set all control points (Ippei: Is this supposed to be 'add' method?)
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTOptEstimator::leastSquaresEstimate().
|
pure virtual |
set a panorama image, counting starts with 0
Implemented in HuginBase::Panorama.
|
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.
set optimizer master switch
Implemented in HuginBase::Panorama.
|
pure virtual |
set optimize setting
Implemented in HuginBase::Panorama.
Referenced by HuginBase::PTOptEstimator::leastSquaresEstimate().
|
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::SetWidthOptimal::runAlgorithm(), HuginBase::FitPanorama::runAlgorithm(), and HuginBase::PointSampler::sampleAndExtractPoints().
|
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(), 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.
assign new mode line numbers, if required
Implemented in HuginBase::Panorama.
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.
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 |
update variables for some specific images
Implemented in HuginBase::Panorama.
|
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::SmartPhotometricOptimizer::smartOptimizePhotometric(), and HuginBase::AutoOptimiseVisitor::Visit().
|
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.