1 #ifndef VTEC_CV_WRAPPER_IBG_CV_HEADER 2 #define VTEC_CV_WRAPPER_IBG_CV_HEADER 5 #include <homography_optimizer/ibg_interface.h> 6 #include <homography_optimizer/types.h> 27 virtual void initialize(
const int max_nb_iter,
const int max_nb_pyr_level,
const double sampling_rate) = 0;
40 bool setReferenceTemplate(
const cv::Mat& ref_image,
const int posx,
const int posy,
const int sizex,
const int sizey);
53 double optimize(
const cv::Mat& curr_image, cv::Mat& H,
float& alpha,
float& beta,
int predictor);
111 void initialize(
const int max_nb_iter,
const int max_nb_pyr_level,
const double sampling_rate)
113 optimizer =
new IBGFullHomographyOptimizer();
114 optimizer->initialize(max_nb_iter, max_nb_pyr_level, sampling_rate);
127 void initialize(
const int max_nb_iter,
const int max_nb_pyr_level,
const double sampling_rate)
129 optimizer =
new IBGAffineHomographyOptimizer();
130 optimizer->initialize(max_nb_iter, max_nb_pyr_level, sampling_rate);
143 void initialize(
const int max_nb_iter,
const int max_nb_pyr_level,
const double sampling_rate)
145 optimizer =
new IBGStretchHomographyOptimizer();
146 optimizer->initialize(max_nb_iter, max_nb_pyr_level, sampling_rate);
Class for FULL homography optimizer interface. 8 degrees of freedom in the homography.
void getCurrentTemplate(cv::Mat &img)
Gets the current template.
IBGStretchHomographyOptimizerCvWrapper()
IBGHomographyOptimizer * optimizer
virtual void initialize(const int max_nb_iter, const int max_nb_pyr_level, const double sampling_rate)=0
Initiliazation of the optimizer.
bool setReferenceTemplate(const cv::Mat &ref_image, const int posx, const int posy, const int sizex, const int sizey)
Sets the reference template.
void initialize(const int max_nb_iter, const int max_nb_pyr_level, const double sampling_rate)
Initiliazation of the optimizer.
IBGAffineHomographyOptimizerCvWrapper()
double optimize(const cv::Mat &curr_image, cv::Mat &H, float &alpha, float &beta, int predictor)
Optimization function.
IBGHomographyOptimizerCvWrapper()
Constructor.
void getReferenceTemplate(cv::Mat &img)
Gets the reference template.
void setHomography(const cv::Mat H)
Sets the homography.
IBGFullHomographyOptimizerCvWrapper()
void initialize(const int max_nb_iter, const int max_nb_pyr_level, const double sampling_rate)
Initiliazation of the optimizer.
std::vector< cv::Mat > getHomographySequence()
Gets the homography sequence.
void getHomography(cv::Mat &H)
Gets the homography.
std::vector< int > getNbIterations()
Gets the number of iterations.
void initialize(const int max_nb_iter, const int max_nb_pyr_level, const double sampling_rate)
Initiliazation of the optimizer.