49 for (
unsigned int image1=0; image1<nrImg-1; image1++)
52 for (
unsigned int image2=image1+1; image2<nrImg; image2++)
55 if(img.YawisLinkedWith(pano.
getImage(image2)))
59 Images.insert(image1);
60 Images.insert(image2);
68 for (CPVector::const_iterator it = cpl.begin(); it != cpl.end(); ++it)
78 std::set<std::string> imgopt;
80 optvec.push_back(imgopt);
84 optvec.push_back(imgopt);
94 double limit = (sqrt(var) > mean) ? mean : (mean + n*sqrt(var));
98 unsigned int cpcounter=0;
99 for (CPVector::const_iterator it = allCP.begin(); it != allCP.end(); ++it)
102 if((it->image1Nr==image1 && it->image2Nr==image2) ||
103 (it->image1Nr==image2 && it->image2Nr==image1))
105 if (cpl[index].error>limit)
106 CPtoRemove.insert(cpcounter);
141 for (CPVector::const_iterator it = allCP.begin(); it != allCP.end(); ++it)
157 double limit = (sqrt(var) > mean) ? mean : (mean + n*sqrt(var));
160 unsigned int index=0;
161 for (CPVector::const_iterator it = allCP.begin(); it != allCP.end(); ++it)
163 if(it->error > limit)
169 CPtoRemove.insert(index);
176 CPtoRemove.insert(index);
192 for(
unsigned int i=0;i<cpList.size();i++)
198 bool insideMask=
false;
208 while((!insideMask) && (j<masks.size()))
221 while((!insideMask) && (j<masks.size()))
static void smartOptimize(PanoramaData &pano)
static void calcCtrlPntsErrorStats(const PanoramaData &pano, double &min, double &max, double &mean, double &var, const int &imgNr=-1, const bool onlyActive=false, const bool ignoreLineCp=false)
std::size_t getNrOfCtrlPoints() const
number of control points
Panorama getSubset(const UIntSet &imgs) const
get a subset of the panorama
const CPVector & getCtrlPoints() const
get all control point of this Panorama
bool isInside(vigra::Point2D p, bool ignoreMasks=false) const
check if a coordinate is inside the source image
represents a control point
void setOptimizeVector(const OptimizeVector &optvec)
set optimize setting
std::set< unsigned int > UIntSet
algorithms for remove control points by statistic method
std::size_t getNrOfImages() const
number of images.
UIntSet getCPoutsideLimit_pair(Panorama pano, AppBase::ProgressDisplay &progress, double n)
optimises images pairwise and removes for every image pair control points with error > mean+n*sigma ...
void setCtrlPoints(const CPVector &points)
set all control points (Ippei: Is this supposed to be 'add' method?)
std::vector< MaskPolygon > MaskPolygonVector
!! from PTOptimise.h 1951
const PanoramaOptions & getOptions() const
returns the options for this panorama
UIntSet getCPoutsideLimit(Panorama pano, double n, bool skipOptimisation, bool includeLineCp)
optimises the whole panorama and removes all control points with error > mean+n*sigma ...
std::vector< ControlPoint > CPVector
std::vector< std::set< std::string > > OptimizeVector
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
void setOptions(const PanoramaOptions &opt)
set new output settings This is not used directly for optimizing/stiching, but it can be feed into ru...
UIntSet getCPinMasks(HuginBase::Panorama pano)
returns these control points, which are in masks
All variables of a source image.
void setProjection(ProjectionFormat f)
set the Projection format and adjust the hfov/vfov if nessecary
bool updateDisplayValue()