Hugin trunk 0.1
Loading...
Searching...
No Matches
ComputeImageROI.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
26#ifndef _COMPUTE_IMAGE_ROI_H
27#define _COMPUTE_IMAGE_ROI_H
28
29#include <hugin_shared.h>
30#include <vigra/diff2d.hxx>
32#include <panodata/Panorama.h>
34
35
36
37namespace HuginBase {
38
39IMPEX vigra::Rect2D estimateOutputROI(const PanoramaData & pano, const PanoramaOptions & opts, unsigned i, const double maxLength = 180.0);
40
42{
43
44 public:
47 : PanoramaAlgorithm(panorama), m_images(images)
48 {};
49
51 virtual ~ComputeImageROI() {};
52
53 public:
55 virtual bool modifiesPanoramaData() const
56 { return false; }
58 virtual bool runAlgorithm()
59 {
60 m_rois = computeROIS(o_panorama, o_panorama.getOptions(), m_images);
61 return true; // let's hope so.
62 }
63
64 virtual std::vector<vigra::Rect2D> getROIS()
65 {
66 return m_rois;
67 }
68
69 public:
71 static std::vector<vigra::Rect2D> computeROIS(const PanoramaData& panorama,
72 const PanoramaOptions & opts,
73 const UIntSet & images);
74
75 protected:
77 std::vector<vigra::Rect2D> m_rois;
78};
79
80
81} // namespace
82#endif // _COMPUTE_IMAGE_ROI_H
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
virtual bool runAlgorithm()
implementation of the algorithm.
virtual std::vector< vigra::Rect2D > getROIS()
ComputeImageROI(PanoramaData &panorama, const UIntSet &images)
std::vector< vigra::Rect2D > m_rois
Model for a panorama.
Panorama image options.
#define IMPEX
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
Definition wxcms.cpp:39
vigra::Rect2D estimateOutputROI(const PanoramaData &pano, const PanoramaOptions &opts, unsigned i, const double maxLength)
std::set< unsigned int > UIntSet
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.
Definition threshold.h:41