37 std::vector<UIntSet> result;
40 if ( allImgs.empty() )
52 std::vector<UIntSet> activeStacks;
53 for (
const auto& singleStack : allStacks)
57 std::set_intersection(singleStack.begin(), singleStack.end(), allImgs.begin(), allImgs.end(), std::inserter(activeImgsInStack, activeImgsInStack.begin()));
58 if (!activeImgsInStack.empty())
60 activeStacks.push_back(activeImgsInStack);
72 const unsigned srcImg = *(allImgs.begin());
74 allImgs.erase(srcImg);
77 for (UIntSet::const_iterator it = allImgs.begin(); it != allImgs.end(); ++it)
79 const unsigned srcImg2 = *it;
82 stack.insert(srcImg2);
85 for (UIntSet::const_iterator it = stack.begin(); it != stack.end(); ++it)
89 result.push_back(stack);
91 }
while (!allImgs.empty());
103 std::vector<UIntSet> result;
106 if ( allImgs.empty() )
115 const unsigned srcImg = *(allImgs.begin());
116 layer.insert(srcImg);
117 allImgs.erase(srcImg);
120 const double firstExposureValue = pano.
getImage(srcImg).getExposureValue();
121 for (UIntSet::const_iterator it = allImgs.begin(); it != allImgs.end(); ++it)
123 const unsigned srcImg2 = *it;
124 if ( fabs(firstExposureValue - pano.
getImage(srcImg2).getExposureValue()) < maxEVDiff )
126 layer.insert(srcImg2);
129 for (UIntSet::const_iterator it = layer.begin(); it != layer.end(); ++it)
133 result.push_back(layer);
135 }
while (!allImgs.empty());
150 for (UIntSet::const_iterator it = activeImages.begin(); it != activeImages.end(); ++it)
153 if (!(roi.isEmpty()))
174 std::vector<HuginBase::UIntVector> stacks;
182 for (
size_t imgGroup = 0; imgGroup < imageGroups.size(); ++imgGroup)
186 stacks.push_back(stackImages);
201 for (
size_t i = 0; i <
images.size(); ++i)
203 result[i] = translatedImgNumbers[
images[i]];
217 unsigned int refImage;
220 refImage = referenceImage;
224 refImage = *images.begin();
228 std::copy(images.begin(), images.end(), std::back_inserter(subpanoImages));
const HuginBase::Panorama * m_pano
std::vector< UIntSet > getHDRStacks(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output stacks
declaration of functions to handle stacks and layers
std::vector< UIntSet > UIntSetVector
std::vector< UIntSet > getExposureLayers(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output exposure layers
double getOverlap(unsigned int i, unsigned int j) const
returns the overlap for 2 images with number i and j
bool operator()(const size_t &img1, const size_t &img2)
ConstImageVariableGroup & getStacks()
Get the ImageVariableGroup representing the group of stack variables.
vigra::Rect2D estimateOutputROI(const PanoramaData &pano, const PanoramaOptions &opts, unsigned i, const double maxLength)
Somewhere to specify what variables belong to what.
UIntSet getImagesinROI(const PanoramaData &pano, const UIntSet activeImages)
returns set of images which are visible in output ROI
bool set_contains(const _Container &c, const typename _Container::key_type &key)
void calculate(unsigned int steps)
does the calculation, for each image steps*steps points are extracted and tested with all other image...
UIntVector getEstimatedBlendingOrder(const PanoramaData &pano, const UIntSet &images, const unsigned int referenceImage)
returns vector of image numbers for blending in approbiate order
virtual void Visit(const size_t vertex, const HuginBase::UIntSet &visitedNeighbors, const HuginBase::UIntSet &unvisitedNeighbors)
std::set< unsigned int > UIntSet
const vigra::Rect2D & getROI() const
UIntSetVector getPartsSet() const
return a vector which contains a HuginBase::UIntSet for each group with the corresponding images numb...
double outputLayersExposureDiff
std::size_t getNrOfImages() const
number of images.
std::vector< unsigned int > UIntVector
void VisitAllImages(const size_t startImg, bool forceAllComponents, BreadthFirstSearchVisitor *visitor)
visit all images via a breadth first search algorithm for each visited images, the functor visitor is...
double outputStacksMinOverlap
virtual const PanoramaOptions & getOptions() const =0
returns the options for this panorama
std::vector< HuginBase::UIntVector > getSortedStacks(const HuginBase::Panorama *pano)
returns vector of UIntVector with image numbers of each stack sorted by exposure
Make an ImageVariableGroup for lenses and other common concepts.
virtual const SrcPanoImage & getImage(std::size_t nr) const =0
get a panorama image, counting starts with 0
void setROI(const vigra::Rect2D &val)
definitions of classes to calculate overlap between different images
class for calculating overlap of images
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
UIntVector GetTranslatedImageNumbers(const UIntVector &translatedImgNumbers) const
SortVectorByExposure(const HuginBase::Panorama *pano)
abstract base functor for breadth first search in ImageGraph
virtual PanoramaData * getNewSubset(const UIntSet &imgs) const =0
class to work with images graphs created from a HuginBase::Panorama class it creates a graph based on...