stereo-vision
All Data Structures Namespaces Functions Modules Pages
elasWrapper.h
1 /*
2  * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
3  * Author: Sean Ryan Fanello, Giulia Pasquale
4  * email: sean.fanello@iit.it giulia.pasquale@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17 */
18 
25 #ifndef ELASWRAPPER_H_
26 #define ELASWRAPPER_H_
27 
28 #include <stdio.h>
29 #include <stdlib.h>
30 
31 #include <iostream>
32 #include <string>
33 #include <sstream>
34 #include <iomanip>
35 #include <stdexcept>
36 
37 // OpenCV
38 #include <opencv2/opencv.hpp>
39 
40 #include "elas/elas.h"
41 
42 using namespace cv;
43 using namespace std;
44 
45 class elasWrapper : public Elas {
46 
47  double io_scaling_factor;
48 
49 public:
50 
51  int64 workBegin();
52  double workEnd(int64 work_begin);
53 
54  elasWrapper();
55  elasWrapper(double scaling_factor, string elas_setting);
56 
57  bool compute_disparity(const cv::Mat &imL, const cv::Mat &imR, cv::Mat &dispL, int num_disparities);
58 
59  int get_disp_min();
60  int get_disp_max();
61  float get_support_threshold();
62  int get_support_texture();
63  int get_candidate_stepsize();
64  int get_incon_window_size();
65  int get_incon_threshold();
66  int get_incon_min_support();
67  bool get_add_corners();
68  int get_grid_size();
69  float get_beta();
70  float get_gamma();
71  float get_sigma();
72  float get_sradius();
73  int get_match_texture();
74  int get_lr_threshold();
75  float get_speckle_sim_threshold();
76  int get_speckle_size();
77  int get_ipol_gap_width();
78  bool get_filter_median();
79  bool get_filter_adaptive_mean();
80  bool get_postprocess_only_left();
81  bool get_subsampling();
82 
83  void set_disp_min(int param_value);
84  void set_disp_max(int param_value);
85  void set_support_threshold(float param_value);
86  void set_support_texture(int param_value);
87  void set_candidate_stepsize(int param_value);
88  void set_incon_window_size(int param_value);
89  void set_incon_threshold(int param_value);
90  void set_incon_min_support(int param_value);
91  void set_add_corners(bool param_value);
92  void set_grid_size(int param_value);
93  void set_beta(float param_value);
94  void set_gamma(float param_value);
95  void set_sigma(float param_value);
96  void set_sradius(float param_value);
97  void set_match_texture(int param_value);
98  void set_lr_threshold(int param_value);
99  void set_speckle_sim_threshold(float param_value);
100  void set_speckle_size(int param_value);
101  void set_ipol_gap_width(int param_value);
102  void set_filter_median(bool param_value);
103  void set_filter_adaptive_mean(bool param_value);
104  void set_postprocess_only_left(bool param_value);
105  void set_subsampling(bool param_value);
106 };
107 
108 #endif /* ELASWRAPPER_H_ */