Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
HuginBase Namespace Reference

mainly consists of wrapper around the pano tools library, to assist in ressource management and to provide a nicer interface. More...

Namespaces

 Color
 
 Exiv2Helper
 
 LensDB
 
 Nona
 
 Photometric
 
 PTools
 
 PTScriptParsing
 

Classes

class  CalculateCPStatistics
 just some common implementation; probably not so useful More...
 
class  CalculateCPStatisticsError
 
class  CalculateCPStatisticsRadial
 
class  CalculateMeanExposure
 
class  CalculateOptimalROI
 
class  CalculateOptimalROIOutside
 
class  CalculateOptimalScale
 
class  SetWidthOptimal
 
class  CalculateImageOverlap
 class for calculating overlap of images More...
 
struct  SortVectorByExposure
 
class  GraphVisitor
 
class  RotatePanorama
 
class  StraightenPanorama
 
class  TranslatePanorama
 
class  CalculateFOV
 
class  CenterHorizontally
 
class  ComputeImageROI
 
class  CalculateFitPanorama
 
class  FitPanorama
 
class  NonaFileOutputStitcher
 This class will use the stitchPanorama function of nona. More...
 
class  PhotometricOptimizer
 
class  SmartPhotometricOptimizer
 
class  OptVarSpec
 
class  PTOptEstimator
 Estimator for RANSAC based adjustment of pairwise parameters. More...
 
class  AutoOptimiseVisitor
 
class  PTOptimizer
 
class  RANSACOptimizer
 Pairwise ransac optimisation. More...
 
class  AutoOptimise
 
class  SmartOptimizerStub
 
class  SmartOptimise
 
class  PanoramaAlgorithm
 
class  TimeConsumingPanoramaAlgorithm
 
class  LimitIntensity
 class for storing the limits of an image used by the sampler to exclude too dark or too bright pixel More...
 
class  PointSampler
 
class  AllPointSampler
 
class  RandomPointSampler
 
class  StitcherAlgorithm
 Just a conceptual base class... More...
 
class  ImageStitcherAlgorithm
 stitch to file output More...
 
class  FileOutputStitcherAlgorithm
 stitch to file output More...
 
class  SmallRemappedImageCache
 class to cache remapped images, loaded from the hugin small image cache. More...
 
class  GetRange
 
class  ImageCache
 This is a cache for all the images we use. More...
 
class  ControlPoint
 represents a control point More...
 
class  ImageVariable
 An ImageVariable stores a value that can be linked to other ImageVariables of the same type. More...
 
class  ConstImageVariableGroup
 An ImageVariableGroup is a collection of image variables that can have some shared variable values. More...
 
class  ImageVariableGroup
 Same as above, but use a non const panorama. More...
 
class  PTOVariableConverterNoOp
 Parent class to anything that aids conversion between PTO file variables and the image variables of SrcPanoImg. More...
 
class  PTOVariableConverterSingle
 Object to group conversion functions for PTO format variables of up to three characters representing a single variable in SrcPanoImg. More...
 
class  PTOVariableConverterVectorChar
 Object to group conversion functions for PTO format variables representing a std::vector variable in SrcPanoImg, using an identifying first character. More...
 
class  PTOVariableConverterVector
 Object to group conversion functions for PTO format variables representing a std::vector variable in SrcPanoImg, using characters stating from 'a'. More...
 
class  PTOVariableConverterFDiff2D
 Object to group conversion functions for PTO format variables representing a hugin_utils::FDiff2D variable in SrcPanoImg. More...
 
class  Lens
 
class  MaskPolygon
 base class, which stores one mask polygon More...
 
class  PanoramaMemento
 Memento class for a Panorama object. More...
 
class  Panorama
 Model for a panorama. More...
 
class  PanoramaData
 Model for a panorama. More...
 
class  PanoramaObserver
 this handler class will receive change events from the Panorama. More...
 
class  PanoramaDataMemento
 Memento class for a PanoramaData object. More...
 
class  ManagedPanoramaData
 
class  PanoramaOptions
 Panorama image options. More...
 
class  Variable
 a variable has a value and a name. More...
 
class  LinkedVariable
 
class  LensVariable
 A lens variable can be linked. More...
 
struct  PrintVar
 functor to print a variable. More...
 
class  BaseSrcPanoImage
 Base class containing all the variables, but missing some of the other important functions and with some daft accessors. More...
 
class  SrcPanoImage
 All variables of a source image. More...
 
class  ConstStandardImageVariableGroups
 Make an ImageVariableGroup for lenses and other common concepts. More...
 
class  StandardImageVariableGroups
 

Typedefs

typedef std::vector
< LimitIntensity
LimitIntensityVector
 
typedef std::vector< ControlPointCPVector
 
typedef std::pair< typename
CPVector::size_type,
ControlPoint
CPoint
 
typedef std::vector< CPointCPointVector
 
typedef PTOVariableConverterNoOp PTOVariableConverterForFilename
 
typedef PTOVariableConverterNoOp PTOVariableConverterForSize
 
typedef PTOVariableConverterNoOp PTOVariableConverterForProjection
 
typedef
PTOVariableConverterSingle<'v'> 
PTOVariableConverterForHFOV
 
typedef PTOVariableConverterNoOp PTOVariableConverterForCropFactor
 
typedef PTOVariableConverterNoOp PTOVariableConverterForResponseType
 
typedef
PTOVariableConverterVectorChar
<'R', float, 5 > 
PTOVariableConverterForEMoRParams
 
typedef
PTOVariableConverterSingle<'E',
'e', 'v'> 
PTOVariableConverterForExposureValue
 
typedef PTOVariableConverterNoOp PTOVariableConverterForGamma
 
typedef
PTOVariableConverterSingle<'E',
'r'> 
PTOVariableConverterForWhiteBalanceRed
 
typedef
PTOVariableConverterSingle<'E',
'b'> 
PTOVariableConverterForWhiteBalanceBlue
 
typedef
PTOVariableConverterSingle<'r'> 
PTOVariableConverterForRoll
 
typedef
PTOVariableConverterSingle<'p'> 
PTOVariableConverterForPitch
 
typedef
PTOVariableConverterSingle<'y'> 
PTOVariableConverterForYaw
 
typedef
PTOVariableConverterSingle<'T','r','X'> 
PTOVariableConverterForX
 
typedef
PTOVariableConverterSingle<'T','r','Y'> 
PTOVariableConverterForY
 
typedef
PTOVariableConverterSingle<'T','r','Z'> 
PTOVariableConverterForZ
 
typedef
PTOVariableConverterSingle<'T','p','y'> 
PTOVariableConverterForTranslationPlaneYaw
 
typedef
PTOVariableConverterSingle<'T','p','p'> 
PTOVariableConverterForTranslationPlanePitch
 
typedef
PTOVariableConverterSingle<'j'> 
PTOVariableConverterForStack
 
typedef
PTOVariableConverterVector
< double, 3 > 
PTOVariableConverterForRadialDistortion
 
typedef PTOVariableConverterNoOp PTOVariableConverterForRadialDistortionRed
 
typedef PTOVariableConverterNoOp PTOVariableConverterForRadialDistortionBlue
 
typedef
PTOVariableConverterFDiff2D<'d',
'e'> 
PTOVariableConverterForRadialDistortionCenterShift
 
typedef
PTOVariableConverterFDiff2D<'g',
't'> 
PTOVariableConverterForShear
 
typedef PTOVariableConverterNoOp PTOVariableConverterForCropMode
 
typedef PTOVariableConverterNoOp PTOVariableConverterForCropRect
 
typedef PTOVariableConverterNoOp PTOVariableConverterForAutoCenterCrop
 
typedef PTOVariableConverterNoOp PTOVariableConverterForFlatfieldFilename
 
typedef PTOVariableConverterNoOp PTOVariableConverterForVigCorrMode
 
typedef
PTOVariableConverterVectorChar
<'V', double, 4 > 
PTOVariableConverterForRadialVigCorrCoeff
 
typedef
PTOVariableConverterFDiff2D<'V','V',
'x','y'> 
PTOVariableConverterForRadialVigCorrCenterShift
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifModel
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifMake
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifLens
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifCropFactor
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifFocalLength
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifOrientation
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifAperture
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifISO
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifDistance
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifFocalLength35
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifExposureTime
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifDate
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifExposureMode
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifRedBalance
 
typedef PTOVariableConverterNoOp PTOVariableConverterForExifBlueBalance
 
typedef PTOVariableConverterNoOp PTOVariableConverterForFileMetadata
 
typedef PTOVariableConverterNoOp PTOVariableConverterForMasks
 
typedef PTOVariableConverterNoOp PTOVariableConverterForActiveMasks
 
typedef PTOVariableConverterNoOp PTOVariableConverterForActive
 
typedef PTOVariableConverterNoOp PTOVariableConverterForLensNr
 
typedef std::vector< LensLensVector
 
typedef std::vector
< hugin_utils::FDiff2D
VectorPolygon
 vector, which stores coordinates of one polygon More...
 
typedef std::vector< MaskPolygonMaskPolygonVector
 
typedef std::set< unsigned int > UIntSet
 
typedef std::vector< unsigned int > UIntVector
 
typedef std::vector< UIntSetUIntSetVector
 
typedef std::map< std::string,
Variable
VariableMap
 
typedef std::vector< VariableMapVariableMapVector
 
typedef std::map< std::string,
LensVariable
LensVarMap
 
typedef std::vector< std::set
< std::string > > 
OptimizeVector
 
typedef std::map< std::string,
std::string > 
FileMetaData
 typedef for general map for storing metadata in files More...
 
typedef std::vector< SrcPanoImageImageVector
 

Enumerations

enum  clipSide { clipLeft =0, clipRight, clipTop, clipBottom }
 
enum  OptimizerSwitches {
  OPT_PAIR =0x0001, OPT_POSITION =0x0002, OPT_VIEW =0x0004, OPT_BARREL =0x0008,
  OPT_ALL =0x0010, OPT_TRANSLATION =0x0020, OPT_EXPOSURE =0x0001, OPT_WHITEBALANCE =0x0002,
  OPT_VIGNETTING =0x0004, OPT_VIGNETTING_CENTER =0x0008, OPT_RESPONSE =0x0010
}
 defines all optimizer switches, they can be combined with OR More...
 

Functions

vigra::Rect2D ModifyRect (const vigra::Rect2D &rect, long deltaLeft, long deltaTop, long deltaRight, long deltaBottom)
 
std::vector< UIntSetgetHDRStacks (const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
 returns vector of set of output stacks More...
 
std::vector< UIntSetgetExposureLayers (const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
 returns vector of set of output exposure layers More...
 
std::vector< UIntSetgetExposureLayers (const PanoramaData &pano, UIntSet allImgs, const double maxEVDiff)
 
UIntSet getImagesinROI (const PanoramaData &pano, const UIntSet activeImages)
 returns set of images which are visible in output ROI More...
 
UIntSet getImagesinROI (const PanoramaData &pano, const UIntSet activeImages, const vigra::Rect2D panoROI)
 returns set of images which are visible in given ROI More...
 
std::vector
< HuginBase::UIntVector
getSortedStacks (const HuginBase::Panorama *pano)
 returns vector of UIntVector with image numbers of each stack sorted by exposure More...
 
UIntVector getEstimatedBlendingOrder (const PanoramaData &pano, const UIntSet &images, const unsigned int referenceImage)
 returns vector of image numbers for blending in approbiate order More...
 
UIntSet getCPoutsideLimit_pair (Panorama pano, AppBase::ProgressDisplay &progress, double n=2.0)
 optimises images pairwise and removes for every image pair control points with error > mean+n*sigma More...
 
UIntSet getCPoutsideLimit (Panorama pano, double n=2.0, bool skipOptimisation=false, bool includeLineCp=false)
 optimises the whole panorama and removes all control points with error > mean+n*sigma More...
 
UIntSet getCPinMasks (Panorama pano)
 returns these control points, which are in masks More...
 
template<class TRANSFORM >
void estimateImageAlpha (const SrcPanoImage &src, const PanoramaOptions &dest, TRANSFORM &transf, vigra::Rect2D &imgRect, vigra::BImage &alpha, double &scale, double maxLength=180.0)
 calculate the outline of the image More...
 
template<class TRANSFORM >
void estimateImageRect (const SrcPanoImage &src, const PanoramaOptions &dest, TRANSFORM &transf, vigra::Rect2D &imgRect, double maxLength=180.0)
 calculate the outline of the image More...
 
vigra::Rect2D estimateOutputROI (const PanoramaData &pano, const PanoramaOptions &opts, unsigned i, const double maxLength)
 
double weightHuber (double x, double sigma)
 expects the abs(error) values More...
 
bool IsHighVignetting (std::vector< double > vigCorr)
 
bool CheckStrangeWB (PanoramaData &pano)
 
 VIGRA_EXT_GETRANGE (vigra::UInt8, 0, 255)
 
 VIGRA_EXT_GETRANGE (vigra::Int16, 0, 32767)
 
 VIGRA_EXT_GETRANGE (vigra::UInt16, 0, 65535)
 
 VIGRA_EXT_GETRANGE (vigra::Int32, 0, 2147483647)
 
 VIGRA_EXT_GETRANGE (vigra::UInt32, 0, 4294967295u)
 
 VIGRA_EXT_GETRANGE (float, 0, 1.0f)
 
 VIGRA_EXT_GETRANGE (double, 0, 1.0)
 
template<class SrcIMG >
void convertTo8Bit (SrcIMG &src, const std::string &origType, vigra::BRGBImage &dest)
 
bool clip_isSide (const hugin_utils::FDiff2D p, const vigra::Rect2D r, const clipSide side)
 
hugin_utils::FDiff2D clip_getIntersection (const hugin_utils::FDiff2D p, const hugin_utils::FDiff2D q, const vigra::Rect2D r, const clipSide side)
 
VectorPolygon clip_onPlane (const VectorPolygon &polygon, const vigra::Rect2D r, const clipSide side)
 
bool clip_insideCircle (const hugin_utils::FDiff2D p, const hugin_utils::FDiff2D center, const double radius)
 check if point is inside circle More...
 
std::vector< hugin_utils::FDiff2Dclip_getIntersectionCircle (const hugin_utils::FDiff2D p, const hugin_utils::FDiff2D s, const hugin_utils::FDiff2D center, const double radius)
 returns intersection of line and circle More...
 
double angle_between (const hugin_utils::FDiff2D a, const hugin_utils::FDiff2D b)
 calculates angle between vector a and b in radians More...
 
void generateArc (VectorPolygon &poly, const hugin_utils::FDiff2D s, const hugin_utils::FDiff2D center, const double radius, const bool clockwise)
 adds an arc with given radius at the end of the polygon, the point is not added to the arc More...
 
void LoadMaskFromStream (std::istream &stream, vigra::Size2D &imageSize, MaskPolygonVector &newMasks, size_t imgNr)
 load the mask from stream More...
 
void SaveMaskToStream (std::ostream &stream, vigra::Size2D imageSize, MaskPolygon &maskToWrite, size_t imgNr)
 save the mask into stream More...
 
void UpdateOptVectorSet (std::set< std::string > &imgVar, const std::string &var, const bool opt)
 
int FindStackNumberForImage (const std::vector< UIntSet > &imageGroups, const unsigned int imgNr)
 
void fillVariableMap (VariableMap &vars)
 fill map with all image & lens variables More...
 
void fillLensVarMap (LensVarMap &vars)
 just lens variables More...
 
void printVariableMap (std::ostream &o, const VariableMap &vars)
 print a variable map to o More...
 
bool isFisheye (const BaseSrcPanoImage::Projection &proj)
 

Variables

const int maskOffset =100
 polygon can exceed the image maximal maskOffset pixels in each direction bigger polygons will be clipped after loading More...
 
const
ConstImageVariableGroup::ImageVariableEnum 
lens_variables_array []
 The image variables that are specific to lenses. More...
 
const std::set
< ConstImageVariableGroup::ImageVariableEnum
lens_variables_set
 A set containing the lens image variables. More...
 
const
ConstImageVariableGroup::ImageVariableEnum 
stack_variables_array []
 The image variables that are specific to stack. More...
 
const std::set
< ConstImageVariableGroup::ImageVariableEnum
stack_variables_set
 A set containing the stack image variables. More...
 

Detailed Description

mainly consists of wrapper around the pano tools library, to assist in ressource management and to provide a nicer interface.

It can be used to feed data from our model directly into the panotools library

Typedef Documentation

typedef std::pair<typename CPVector::size_type, ControlPoint> HuginBase::CPoint

Definition at line 101 of file ControlPoint.h.

typedef std::vector<CPoint> HuginBase::CPointVector

Definition at line 102 of file ControlPoint.h.

typedef std::vector<ControlPoint> HuginBase::CPVector

Definition at line 99 of file ControlPoint.h.

typedef std::map<std::string, std::string> HuginBase::FileMetaData

typedef for general map for storing metadata in files

Definition at line 55 of file SrcPanoImage.h.

typedef std::vector<SrcPanoImage> HuginBase::ImageVector

Definition at line 426 of file SrcPanoImage.h.

typedef std::map<std::string,LensVariable> HuginBase::LensVarMap

Definition at line 187 of file PanoramaVariable.h.

typedef std::vector<Lens> HuginBase::LensVector

Definition at line 125 of file Lens.h.

Definition at line 65 of file PointSampler.h.

Definition at line 147 of file Mask.h.

typedef std::vector<std::set<std::string> > HuginBase::OptimizeVector

Definition at line 194 of file PanoramaVariable.h.

Definition at line 347 of file ImageVariableTranslate.h.

Definition at line 346 of file ImageVariableTranslate.h.

Definition at line 314 of file ImageVariableTranslate.h.

Definition at line 284 of file ImageVariableTranslate.h.

Definition at line 311 of file ImageVariableTranslate.h.

Todo:
This could be S, but it is 4 integers in the form a,b,c,d -hence not a double.

Definition at line 313 of file ImageVariableTranslate.h.

Definition at line 287 of file ImageVariableTranslate.h.

Definition at line 329 of file ImageVariableTranslate.h.

Definition at line 337 of file ImageVariableTranslate.h.

Definition at line 326 of file ImageVariableTranslate.h.

Definition at line 334 of file ImageVariableTranslate.h.

Definition at line 331 of file ImageVariableTranslate.h.

Definition at line 335 of file ImageVariableTranslate.h.

Definition at line 333 of file ImageVariableTranslate.h.

Definition at line 327 of file ImageVariableTranslate.h.

Definition at line 332 of file ImageVariableTranslate.h.

Definition at line 330 of file ImageVariableTranslate.h.

Definition at line 325 of file ImageVariableTranslate.h.

Definition at line 324 of file ImageVariableTranslate.h.

Definition at line 323 of file ImageVariableTranslate.h.

Definition at line 328 of file ImageVariableTranslate.h.

Definition at line 336 of file ImageVariableTranslate.h.

Definition at line 288 of file ImageVariableTranslate.h.

Definition at line 338 of file ImageVariableTranslate.h.

See Also
image_variables.h
Todo:
This could be n, but it is a string, not a double.

Definition at line 279 of file ImageVariableTranslate.h.

Todo:
This could be Vf, but it is a string, not a double.

Definition at line 317 of file ImageVariableTranslate.h.

Definition at line 289 of file ImageVariableTranslate.h.

Definition at line 283 of file ImageVariableTranslate.h.

Definition at line 348 of file ImageVariableTranslate.h.

Definition at line 345 of file ImageVariableTranslate.h.

Definition at line 294 of file ImageVariableTranslate.h.

Definition at line 282 of file ImageVariableTranslate.h.

Definition at line 305 of file ImageVariableTranslate.h.

Definition at line 307 of file ImageVariableTranslate.h.

Definition at line 308 of file ImageVariableTranslate.h.

Definition at line 306 of file ImageVariableTranslate.h.

Definition at line 321 of file ImageVariableTranslate.h.

Definition at line 320 of file ImageVariableTranslate.h.

Definition at line 286 of file ImageVariableTranslate.h.

Definition at line 293 of file ImageVariableTranslate.h.

Definition at line 309 of file ImageVariableTranslate.h.

Definition at line 280 of file ImageVariableTranslate.h.

Definition at line 303 of file ImageVariableTranslate.h.

Definition at line 301 of file ImageVariableTranslate.h.

Definition at line 300 of file ImageVariableTranslate.h.

Definition at line 319 of file ImageVariableTranslate.h.

Definition at line 291 of file ImageVariableTranslate.h.

Definition at line 290 of file ImageVariableTranslate.h.

Definition at line 297 of file ImageVariableTranslate.h.

Definition at line 298 of file ImageVariableTranslate.h.

Definition at line 295 of file ImageVariableTranslate.h.

Definition at line 299 of file ImageVariableTranslate.h.

typedef std::set<unsigned int> HuginBase::UIntSet

Definition at line 51 of file PanoramaData.h.

typedef std::vector<UIntSet> HuginBase::UIntSetVector

Definition at line 56 of file PanoramaData.h.

typedef std::vector<unsigned int> HuginBase::UIntVector

Definition at line 54 of file PanoramaData.h.

typedef std::map<std::string,Variable> HuginBase::VariableMap

Definition at line 174 of file PanoramaVariable.h.

Definition at line 183 of file PanoramaVariable.h.

vector, which stores coordinates of one polygon

Definition at line 39 of file Mask.h.

Enumeration Type Documentation

Enumerator
clipLeft 
clipRight 
clipTop 
clipBottom 

Definition at line 226 of file Mask.cpp.

defines all optimizer switches, they can be combined with OR

Enumerator
OPT_PAIR 
OPT_POSITION 
OPT_VIEW 
OPT_BARREL 
OPT_ALL 
OPT_TRANSLATION 
OPT_EXPOSURE 
OPT_WHITEBALANCE 
OPT_VIGNETTING 
OPT_VIGNETTING_CENTER 
OPT_RESPONSE 

Definition at line 31 of file OptimizerSwitches.h.

Function Documentation

double HuginBase::angle_between ( const hugin_utils::FDiff2D  a,
const hugin_utils::FDiff2D  b 
)

calculates angle between vector a and b in radians

Definition at line 391 of file Mask.cpp.

References hugin_utils::TDiff2D< T >::squareLength(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by HuginBase::MaskPolygon::clipPolygon().

bool HuginBase::CheckStrangeWB ( PanoramaData &  pano)
hugin_utils::FDiff2D HuginBase::clip_getIntersection ( const hugin_utils::FDiff2D  p,
const hugin_utils::FDiff2D  q,
const vigra::Rect2D  r,
const clipSide  side 
)
std::vector<hugin_utils::FDiff2D> HuginBase::clip_getIntersectionCircle ( const hugin_utils::FDiff2D  p,
const hugin_utils::FDiff2D  s,
const hugin_utils::FDiff2D  center,
const double  radius 
)

returns intersection of line and circle

Parameters
pfist point of line segment
sseconst point of line segment
centercenter of circle
radiusradius of circle
Returns
vector with all intersection of line between p and s and given circle

Definition at line 355 of file Mask.cpp.

References hugin_utils::TDiff2D< T >::squareLength(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by HuginBase::MaskPolygon::clipPolygon().

bool HuginBase::clip_insideCircle ( const hugin_utils::FDiff2D  p,
const hugin_utils::FDiff2D  center,
const double  radius 
)

check if point is inside circle

Returns
true, if point p is inside circle given by center and radius
Parameters
ppoint to test
centercenter point of circle test
radiusradius of circle to test

Definition at line 343 of file Mask.cpp.

References hugin_utils::TDiff2D< T >::squareDistance().

Referenced by HuginBase::MaskPolygon::clipPolygon().

bool HuginBase::clip_isSide ( const hugin_utils::FDiff2D  p,
const vigra::Rect2D  r,
const clipSide  side 
)
VectorPolygon HuginBase::clip_onPlane ( const VectorPolygon &  polygon,
const vigra::Rect2D  r,
const clipSide  side 
)

Definition at line 293 of file Mask.cpp.

References clip_getIntersection(), and clip_isSide().

Referenced by HuginBase::MaskPolygon::clipPolygon().

template<class SrcIMG >
void HuginBase::convertTo8Bit ( SrcIMG &  src,
const std::string &  origType,
vigra::BRGBImage &  dest 
)
template<class TRANSFORM >
void HuginBase::estimateImageAlpha ( const SrcPanoImage &  src,
const PanoramaOptions &  dest,
TRANSFORM &  transf,
vigra::Rect2D &  imgRect,
vigra::BImage &  alpha,
double &  scale,
double  maxLength = 180.0 
)
template<class TRANSFORM >
void HuginBase::estimateImageRect ( const SrcPanoImage &  src,
const PanoramaOptions &  dest,
TRANSFORM &  transf,
vigra::Rect2D &  imgRect,
double  maxLength = 180.0 
)

calculate the outline of the image

Parameters
srcdescription of source picture
destdescription of output picture (panorama)
imgRectoutput: position of image in panorama.

Definition at line 207 of file ComputeImageROI.cpp.

References estimateImageAlpha().

Referenced by estimateOutputROI().

IMPEX vigra::Rect2D HuginBase::estimateOutputROI ( const PanoramaData &  pano,
const PanoramaOptions &  opts,
unsigned  i,
const double  maxLength 
)
IMPEX void HuginBase::fillLensVarMap ( LensVarMap &  variables)

just lens variables

Definition at line 93 of file PanoramaVariable.cpp.

Referenced by HuginBase::Lens::Lens().

IMPEX void HuginBase::fillVariableMap ( VariableMap &  vars)

fill map with all image & lens variables

Definition at line 48 of file PanoramaVariable.cpp.

int HuginBase::FindStackNumberForImage ( const std::vector< UIntSet > &  imageGroups,
const unsigned int  imgNr 
)

Definition at line 1778 of file Panorama.cpp.

References set_contains().

Referenced by HuginBase::Panorama::getUnlinkedSubset().

void HuginBase::generateArc ( VectorPolygon &  poly,
const hugin_utils::FDiff2D  s,
const hugin_utils::FDiff2D  center,
const double  radius,
const bool  clockwise 
)

adds an arc with given radius at the end of the polygon, the point is not added to the arc

Parameters
polypolygon to which the arc should added
spoint to which the arc should go
centercenter of arc
radiusradius of arc
clockwisetrue, if arc should go clockwise; else it goes anti-clockwise

Definition at line 403 of file Mask.cpp.

References PI, hugin_utils::TDiff2D< T >::squareDistance(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by HuginBase::MaskPolygon::clipPolygon().

IMPEX UIntSet HuginBase::getCPinMasks ( HuginBase::Panorama  pano)
IMPEX UIntSet HuginBase::getCPoutsideLimit ( Panorama  pano,
double  n = 2.0,
bool  skipOptimisation = false,
bool  includeLineCp = false 
)

optimises the whole panorama and removes all control points with error > mean+n*sigma

Parameters
panopanorama which should be used
ndetermines, how big the deviation from mean should be to determine wrong control points, default 2.0
skipOptimisationskips the optimisation step, the current position of the images is used
includeLineCpinclude also line control points when calculating mean and check them also for limit
Returns
set which contains control points with error > mean+n*sigma

Definition at line 123 of file CleanCP.cpp.

References HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), HuginBase::PTools::calcCtrlPointErrors(), HuginBase::Panorama::getCtrlPoints(), celeste::max(), celeste::min(), HuginBase::Panorama::setCtrlPoints(), HuginBase::SmartOptimise::smartOptimize(), and HuginBase::ControlPoint::X_Y.

Referenced by PanoOperation::CleanControlPointsOperation::GetInternalCommand(), main(), and GLPreviewFrame::OnCreateCP().

IMPEX UIntSet HuginBase::getCPoutsideLimit_pair ( Panorama  pano,
AppBase::ProgressDisplay progress,
double  n = 2.0 
)
IMPEX UIntVector HuginBase::getEstimatedBlendingOrder ( const PanoramaData &  pano,
const UIntSet &  images,
const unsigned int  referenceImage 
)
IMPEX UIntSetVector HuginBase::getExposureLayers ( const PanoramaData &  pano,
UIntSet  allImgs,
PanoramaOptions  opts 
)
IMPEX UIntSetVector HuginBase::getExposureLayers ( const PanoramaData &  pano,
UIntSet  allImgs,
const double  maxEVDiff 
)

Definition at line 101 of file LayerStacks.cpp.

References HuginBase::PanoramaData::getImage().

IMPEX UIntSetVector HuginBase::getHDRStacks ( const PanoramaData &  pano,
UIntSet  allImgs,
PanoramaOptions  opts 
)
IMPEX UIntSet HuginBase::getImagesinROI ( const PanoramaData &  pano,
const UIntSet  activeImages 
)
IMPEX UIntSet HuginBase::getImagesinROI ( const PanoramaData &  pano,
const UIntSet  activeImages,
vigra::Rect2D  panoROI 
)

returns set of images which are visible in given ROI

Definition at line 145 of file LayerStacks.cpp.

References estimateOutputROI(), HuginBase::PanoramaData::getOptions(), and HuginBase::PanoramaOptions::setROI().

IMPEX std::vector< HuginBase::UIntVector > HuginBase::getSortedStacks ( const HuginBase::Panorama pano)

returns vector of UIntVector with image numbers of each stack sorted by exposure

Definition at line 172 of file LayerStacks.cpp.

References HuginBase::Panorama::getNrOfImages(), HuginBase::ConstImageVariableGroup::getPartsSet(), and HuginBase::ConstStandardImageVariableGroups::getStacks().

Referenced by PanoDetector::buildMultiRowImageSets(), and GLPreviewFrame::OnShowAll().

bool HuginBase::isFisheye ( const BaseSrcPanoImage::Projection proj)
bool HuginBase::IsHighVignetting ( std::vector< double >  vigCorr)
IMPEX void HuginBase::LoadMaskFromStream ( std::istream &  stream,
vigra::Size2D &  imageSize,
MaskPolygonVector &  newMasks,
size_t  imgNr 
)
vigra::Rect2D HuginBase::ModifyRect ( const vigra::Rect2D &  rect,
long  deltaLeft,
long  deltaTop,
long  deltaRight,
long  deltaBottom 
)
IMPEX void HuginBase::printVariableMap ( std::ostream &  o,
const VariableMap &  vars 
)

print a variable map to o

Definition at line 126 of file PanoramaVariable.cpp.

IMPEX void HuginBase::SaveMaskToStream ( std::ostream &  stream,
vigra::Size2D  imageSize,
MaskPolygon &  maskToWrite,
size_t  imgNr 
)

save the mask into stream

Definition at line 685 of file Mask.cpp.

References HuginBase::MaskPolygon::printPolygonLine().

Referenced by MaskEditorPanel::OnMaskCopy(), and MaskEditorPanel::OnMaskSave().

void HuginBase::UpdateOptVectorSet ( std::set< std::string > &  imgVar,
const std::string &  var,
const bool  opt 
)

Definition at line 1223 of file Panorama.cpp.

Referenced by HuginBase::Panorama::updateOptimizeVector().

HuginBase::VIGRA_EXT_GETRANGE ( vigra::UInt8  ,
,
255   
)
HuginBase::VIGRA_EXT_GETRANGE ( vigra::Int16  ,
,
32767   
)
HuginBase::VIGRA_EXT_GETRANGE ( vigra::UInt16  ,
,
65535   
)
HuginBase::VIGRA_EXT_GETRANGE ( vigra::Int32  ,
,
2147483647   
)
HuginBase::VIGRA_EXT_GETRANGE ( vigra::UInt32  ,
,
4294967295u   
)
HuginBase::VIGRA_EXT_GETRANGE ( float  ,
,
1.  0f 
)
HuginBase::VIGRA_EXT_GETRANGE ( double  ,
,
1.  0 
)
double HuginBase::weightHuber ( double  x,
double  sigma 
)
inline

expects the abs(error) values

Definition at line 39 of file PhotometricOptimizer.cpp.

Referenced by HuginBase::PhotometricOptimizer::photometricError().

Variable Documentation

const ConstImageVariableGroup::ImageVariableEnum HuginBase::lens_variables_array[]
Initial value:
= {ImageVariableGroup::IVE_Size,
ImageVariableGroup::IVE_Projection,
ImageVariableGroup::IVE_HFOV,
ImageVariableGroup::IVE_ResponseType,
ImageVariableGroup::IVE_EMoRParams,
ImageVariableGroup::IVE_Gamma,
ImageVariableGroup::IVE_RadialDistortion,
ImageVariableGroup::IVE_RadialDistortionRed,
ImageVariableGroup::IVE_RadialDistortionBlue,
ImageVariableGroup::IVE_RadialDistortionCenterShift,
ImageVariableGroup::IVE_Shear,
ImageVariableGroup::IVE_VigCorrMode,
ImageVariableGroup::IVE_FlatfieldFilename,
ImageVariableGroup::IVE_RadialVigCorrCoeff,
ImageVariableGroup::IVE_RadialVigCorrCenterShift
}

The image variables that are specific to lenses.

These are by default linked across images in the same lens.

If you wish to change this, you'll need to set the ending offset in lens_variables_set below.

Definition at line 39 of file StandardImageVariableGroups.cpp.

const std::set<ConstImageVariableGroup::ImageVariableEnum> HuginBase::lens_variables_set
Initial value:
=
std::set<ConstImageVariableGroup::ImageVariableEnum>(lens_variables_array,
lens_variables_array + 15)
const ConstImageVariableGroup::ImageVariableEnum lens_variables_array[]
The image variables that are specific to lenses.

A set containing the lens image variables.

the offset on the second construtor argument is the size of the array.

Definition at line 60 of file StandardImageVariableGroups.cpp.

Referenced by HuginBase::ConstStandardImageVariableGroups::getLensVariables().

const int HuginBase::maskOffset =100

polygon can exceed the image maximal maskOffset pixels in each direction bigger polygons will be clipped after loading

Definition at line 44 of file Mask.h.

Referenced by MaskImageCtrl::invtransform(), main(), MaskImageCtrl::OnDraw(), MaskLoadDialog::ProcessMask(), MaskImageCtrl::rescaleImage(), HuginBase::Panorama::transferMask(), and MaskImageCtrl::transform().

const ConstImageVariableGroup::ImageVariableEnum HuginBase::stack_variables_array[]
Initial value:
= {ImageVariableGroup::IVE_Yaw,
ImageVariableGroup::IVE_Pitch,
ImageVariableGroup::IVE_Roll,
ImageVariableGroup::IVE_Stack,
ImageVariableGroup::IVE_X,
ImageVariableGroup::IVE_Y,
ImageVariableGroup::IVE_Z,
ImageVariableGroup::IVE_TranslationPlaneYaw,
ImageVariableGroup::IVE_TranslationPlanePitch
}

The image variables that are specific to stack.

These are by default linked across images in the same stack.

If you wish to change this, you'll need to set the ending offset in stack_variables_set below.

Definition at line 72 of file StandardImageVariableGroups.cpp.

const std::set<ConstImageVariableGroup::ImageVariableEnum> HuginBase::stack_variables_set
Initial value:
=
std::set<ConstImageVariableGroup::ImageVariableEnum>(stack_variables_array,
stack_variables_array + 9)
const ConstImageVariableGroup::ImageVariableEnum stack_variables_array[]
The image variables that are specific to stack.

A set containing the stack image variables.

the offset on the second construtor argument is the size of the array.

Definition at line 87 of file StandardImageVariableGroups.cpp.

Referenced by HuginBase::ConstStandardImageVariableGroups::getStackVariables().