-
Notifications
You must be signed in to change notification settings - Fork 3
/
disparity.h
50 lines (38 loc) · 1.04 KB
/
disparity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*#-------------------------------------------------
#
# Disparity and depth maps with OpenCV
#
# by AbsurdePhoton - www.absurdephoton.fr
#
# v1.3 - 2019/06/03
#
#-------------------------------------------------*/
#ifndef DISPARITY_H
#define DISPARITY_H
#include "opencv2/opencv.hpp"
#include <QDialog>
namespace Ui {
class Disparity;
}
class Disparity : public QDialog
{
Q_OBJECT
public:
explicit Disparity(QWidget *parent = 0);
~Disparity();
void setLeftImage(cv::Mat left_img);
void setRightImage(cv::Mat right_img);
int getBackgroundDisparity();
int getForegroundDisparity();
private slots:
void on_horizontalSlider_background_disparity_sliderMoved(int value);
void on_horizontalSlider_foreground_disparity_sliderMoved(int value);
void on_checkBox_fit_clicked();
private:
Ui::Disparity *ui;
cv::Mat left_image, right_image;
int background_disparity, foreground_disparity;
void DisplayShiftedBackground();
void DisplayShiftedForeground();
};
#endif // DISPARITY_H