24#ifndef _BASICALGORITHMS_CALCULATEOPTIMALROI_H
25#define _BASICALGORITHMS_CALCULATEOPTIMALROI_H
45 m_bestRect = vigra::Rect2D(0,0,0,0);
46 o_optimalSize = vigra::Size2D(0,0);
52 m_bestRect = vigra::Rect2D(0, 0, 0, 0);
53 o_optimalSize = vigra::Size2D(0,0);
66 return calcOptimalROI(o_panorama);
72 if (hasRunSuccessfully())
78 return vigra::Rect2D();
83 void setStacks(std::vector<UIntSet>
hdr_stacks);
93 std::map<unsigned int,PTools::Transform*>
transfMap;
99 bool imgPixel(
int i,
int j);
100 bool stackPixel(
int i,
int j,
UIntSet &stack);
105 bool CheckRectCoversPano(
const vigra::Rect2D&
rect);
123 return CalcOutsideCrop(o_panorama, getProgressDisplay());
127 virtual vigra::Rect2D getResultOptimalROI();
virtual bool runAlgorithm()
runs the outside crop finding algorithm
CalculateOptimalROIOutside(PanoramaData &panorama, AppBase::ProgressDisplay *progress)
constructor
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
std::map< unsigned int, PTools::Transform * > transfMap
virtual vigra::Rect2D getResultOptimalROI()
return the ROI structure?, for now area
vigra::Size2D o_optimalSize
CalculateOptimalROI(PanoramaData &panorama, AppBase::ProgressDisplay *progress, std::vector< UIntSet > hdr_stacks)
virtual ~CalculateOptimalROI()
destructor
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
std::vector< bool > pixels
CalculateOptimalROI(PanoramaData &panorama, AppBase::ProgressDisplay *progress, bool intersect=false)
constructor
virtual bool runAlgorithm()
implementation of the algorithm.
std::vector< bool > testedPixels
std::vector< UIntSet > stacks
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
std::set< unsigned int > UIntSet
void CleanUp(std::vector< InputImage * > &images)
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.