Hugin trunk 0.1
Loading...
Searching...
No Matches
deghosting.h
Go to the documentation of this file.
1
21#ifndef DEGHOSTING_H_
22#define DEGHOSTING_H_
23
24#include <exception>
25#include <vector>
26#include <string>
27#include <stdint.h>
28
29#include <memory>
30#include <vigra/stdimage.hxx>
31#include <vigra/imageinfo.hxx>
32
33namespace deghosting {
34
37 class NoImages : public std::exception {
38 public:
39 NoImages() : std::exception() {};
40 virtual const char * what() const throw() {
41 return "You must specify images";
42 }
43 };
44
45 typedef std::shared_ptr<vigra::BImage> BImagePtr;
46 typedef std::shared_ptr<vigra::FImage> FImagePtr;
47 // type for camera response
48 typedef std::vector<float> EMoR;
49
50 // constants for advanced modes
54
55 // constants for debug modes
57
59 {
60 public:
62
66 virtual std::vector<FImagePtr> createWeightMasks() = 0;
67
71 virtual void loadImages(std::vector<std::string>& inputFiles);
72
77 virtual void setFlags(const uint16_t flags);
78
82 virtual void setDebugFlags(const uint16_t debugFlags);
83
86 virtual void setIterationNum(const int iterations);
87
92 virtual void setCameraResponse(EMoR response);
93
97 virtual void setVerbosity(int verbosity);
98 virtual ~Deghosting() {}
99
100 vigra::Rect2D getOutputROI() const;
101 std::vector<vigra::Rect2D> getInputROIs() const;
102
103 protected:
104 std::vector<vigra::ImageImportInfo> inputFiles;
105 std::vector<vigra::Rect2D> m_inputROI;
111 vigra::Rect2D m_outputROI;
112 };
113
114}
115
116#endif /* DEGHOSTING_H_ */
virtual void setVerbosity(int verbosity)
set verbosity level
virtual void setDebugFlags(const uint16_t debugFlags)
set flags for debugging purposes
virtual std::vector< FImagePtr > createWeightMasks()=0
create weight masks create weight masks for masking out ghosting regions
std::vector< vigra::Rect2D > m_inputROI
Definition deghosting.h:105
vigra::Rect2D m_outputROI
Definition deghosting.h:111
virtual void setCameraResponse(EMoR response)
set camera response function set camera response function in EMoR format
virtual void setIterationNum(const int iterations)
set number of iterations
virtual void setFlags(const uint16_t flags)
set advanced flags Allows to change behavior of used algorithm
vigra::Rect2D getOutputROI() const
virtual void loadImages(std::vector< std::string > &inputFiles)
load images for processing
std::vector< vigra::ImageImportInfo > inputFiles
Definition deghosting.h:104
std::vector< vigra::Rect2D > getInputROIs() const
exception called when there are no input images
Definition deghosting.h:37
virtual const char * what() const
Definition deghosting.h:40
Implementation of basic routines for deghosting algorithms Copyright (C) 2009 Lukáš Jirkovský l....
std::vector< float > EMoR
Definition deghosting.h:48
const uint16_t ADV_ONLYP
Definition deghosting.h:52
const uint16_t ADV_MULTIRES
Definition deghosting.h:53
std::shared_ptr< vigra::FImage > FImagePtr
Definition deghosting.h:46
std::shared_ptr< vigra::BImage > BImagePtr
Definition deghosting.h:45
const uint16_t ADV_GAMMA
Definition deghosting.h:51
const uint16_t SAVE_INITWEIGHTS
Definition deghosting.h:56
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