本文整理汇总了C++中UIntSet::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ UIntSet::erase方法的具体用法?C++ UIntSet::erase怎么用?C++ UIntSet::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIntSet
的用法示例。
在下文中一共展示了UIntSet::erase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: overlap
vector<UIntSet> getHDRStacks(const PanoramaData & pano, UIntSet allImgs, PanoramaOptions opts)
{
vector<UIntSet> result;
// if no images are available, return empty result vector
if ( allImgs.empty() )
{
return result;
}
UIntSet stack;
CalculateImageOverlap overlap(&pano);
overlap.calculate(10); // we are testing 10*10=100 points
do {
unsigned srcImg = *(allImgs.begin());
stack.insert(srcImg);
allImgs.erase(srcImg);
// find all images that have a suitable overlap.
for (UIntSet::iterator it = allImgs.begin(); it != allImgs.end(); ) {
unsigned srcImg2 = *it;
++it;
if(overlap.getOverlap(srcImg,srcImg2)>opts.outputStacksMinOverlap)
{
stack.insert(srcImg2);
allImgs.erase(srcImg2);
}
}
result.push_back(stack);
stack.clear();
} while (allImgs.size() > 0);
return result;
}
示例2: getExposureLayers
vector<UIntSet> getExposureLayers(const PanoramaData & pano, UIntSet allImgs, PanoramaOptions opts)
{
vector<UIntSet> result;
// if no images are available, return empty result vector
if ( allImgs.empty() )
{
return result;
}
UIntSet stack;
do {
unsigned srcImg = *(allImgs.begin());
stack.insert(srcImg);
allImgs.erase(srcImg);
// find all images that have a suitable overlap.
SrcPanoImage simg = pano.getSrcImage(srcImg);
double maxEVDiff = opts.outputLayersExposureDiff;
for (UIntSet::iterator it = allImgs.begin(); it != allImgs.end(); ) {
unsigned srcImg2 = *it;
++it;
SrcPanoImage simg2 = pano.getSrcImage(srcImg2);
if ( fabs(simg.getExposureValue() - simg2.getExposureValue()) < maxEVDiff )
{
stack.insert(srcImg2);
allImgs.erase(srcImg2);
}
}
result.push_back(stack);
stack.clear();
} while (allImgs.size() > 0);
return result;
}